Skip to content

Commit

Permalink
vm: add dumpState cheatcode (#499)
Browse files Browse the repository at this point in the history
* vm: add dumpState cheatcode

Adds a new cheatcode `dumpState(string)` that was implemented
in foundry in foundry-rs/foundry#6827.
This cheatcode will write a JSON file to disk that contains the
current state of the EVM.

* chore: regenerate Vm.sol

* test: update interface ID

---------

Co-authored-by: Matt Solomon <[email protected]>
  • Loading branch information
tynes and mds1 authored Jan 17, 2024
1 parent 36f27c1 commit 1fd874f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
23 changes: 15 additions & 8 deletions src/Vm.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/Vm.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contract VmTest is Test {
// inadvertently moved between Vm and VmSafe. This test must be updated each time a function is
// added to or removed from Vm or VmSafe.
function test_interfaceId() public {
assertEq(type(VmSafe).interfaceId, bytes4(0x90569756), "VmSafe");
assertEq(type(Vm).interfaceId, bytes4(0xd6a02054), "Vm");
assertEq(type(VmSafe).interfaceId, bytes4(0x01ec102d), "VmSafe");
assertEq(type(Vm).interfaceId, bytes4(0xa63eed6b), "Vm");
}
}

0 comments on commit 1fd874f

Please sign in to comment.