Consensys / sol-dbg

Solidity source debugger built around EthereumJS
Apache License 2.0
23 stars 3 forks source link

Expect revert #25

Closed cd1m0 closed 1 year ago

cd1m0 commented 1 year ago

This PR adds support for expectRevert. The semantics should match the foundry semantics, with the exception that upon a failing expectRevert the exception bytes are empty.

I tried to test this exhaustively, but note that the interposed implementaions of CALLCODE and DELEGATECALL are not exercised by the tests unfortunately. As they are very similar to CALL/STATICCALL, I think they should work

codecov-commenter commented 1 year ago

Codecov Report

Merging #25 (09fc8ae) into main (ffe8ee8) will decrease coverage by 0.54%. The diff coverage is 63.88%.

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   78.05%   77.52%   -0.54%     
==========================================
  Files          21       21              
  Lines        1900     2042     +142     
  Branches      377      409      +32     
==========================================
+ Hits         1483     1583     +100     
- Misses        252      281      +29     
- Partials      165      178      +13     
Impacted Files Coverage Δ
src/debug/opcode_interposing.ts 66.94% <62.37%> (-18.78%) :arrow_down:
src/debug/foundry_cheatcodes.ts 83.07% <66.66%> (-3.29%) :arrow_down:
src/utils/test_runner.ts 98.50% <100.00%> (+0.02%) :arrow_up:

... and 3 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more