From 17c554b7dd5cc3a63e7fb9db035718e619ee7653 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Thu, 8 Feb 2024 00:55:46 +0300 Subject: [PATCH] feat: add `vm.stopExpectSafeMemory` cheatcode (#507) --- src/Vm.sol | 3 +++ test/Vm.t.sol | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Vm.sol b/src/Vm.sol index cbb3e4ac..12bef981 100644 --- a/src/Vm.sol +++ b/src/Vm.sol @@ -1111,4 +1111,7 @@ interface Vm is VmSafe { /// Marks a test as skipped. Must be called at the top of the test. function skip(bool skipTest) external; + + /// Stops all safe memory expectation in the current subcontext. + function stopExpectSafeMemory() external; } diff --git a/test/Vm.t.sol b/test/Vm.t.sol index 95d61450..460ca48e 100644 --- a/test/Vm.t.sol +++ b/test/Vm.t.sol @@ -10,6 +10,6 @@ contract VmTest is Test { // added to or removed from Vm or VmSafe. function test_interfaceId() public { assertEq(type(VmSafe).interfaceId, bytes4(0x01ec102d), "VmSafe"); - assertEq(type(Vm).interfaceId, bytes4(0xa63eed6b), "Vm"); + assertEq(type(Vm).interfaceId, bytes4(0xaf68a970), "Vm"); } }