Skip to content

Commit

Permalink
Merge pull request #610 from DaniPopes/update-vm
Browse files Browse the repository at this point in the history
feat(Vm): add new cheatcodes
  • Loading branch information
mattsse authored Sep 26, 2024
2 parents 7bd2d22 + a652c65 commit 0a26e6d
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 13 deletions.
68 changes: 61 additions & 7 deletions src/Vm.sol

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

15 changes: 9 additions & 6 deletions test/Vm.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ pragma solidity >=0.8.0 <0.9.0;
import {Test} from "../src/Test.sol";
import {Vm, VmSafe} from "../src/Vm.sol";

// These tests ensure that functions are never accidentally removed from a Vm interface, or
// inadvertently moved between Vm and VmSafe. These tests must be updated each time a function is
// added to or removed from Vm or VmSafe.
contract VmTest is Test {
// This test ensures that functions are never accidentally removed from a Vm interface, or
// 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 pure {
assertEq(type(VmSafe).interfaceId, bytes4(0x74d42398), "VmSafe");
assertEq(type(Vm).interfaceId, bytes4(0xaf15a283), "Vm");
function test_VmInterfaceId() public pure {
assertEq(type(Vm).interfaceId, bytes4(0xa561dbe8), "Vm");
}

function test_VmSafeInterfaceId() public pure {
assertEq(type(VmSafe).interfaceId, bytes4(0x681d10d4), "VmSafe");
}
}

0 comments on commit 0a26e6d

Please sign in to comment.