diff --git a/src/Vm.sol b/src/Vm.sol index e8ad712a..362bd739 100644 --- a/src/Vm.sol +++ b/src/Vm.sol @@ -279,6 +279,9 @@ interface VmSafe { pure returns (uint256 privateKey); + /// Derives secp256r1 public key from the provided `privateKey`. + function publicKeyP256(uint256 privateKey) external pure returns (uint256 publicKeyX, uint256 publicKeyY); + /// Adds a private key to the local forge wallet and returns the address. function rememberKey(uint256 privateKey) external returns (address keyAddr); @@ -1549,6 +1552,10 @@ interface VmSafe { /// Labels an address in call traces. function label(address account, string calldata newLabel) external; + /// Pauses collection of call traces. Useful in cases when you want to skip tracing of + /// complex calls which are not useful for debugging. + function pauseTracing() external view; + /// Returns a random `address`. function randomAddress() external returns (address); @@ -1558,6 +1565,9 @@ interface VmSafe { /// Returns random uin256 value between the provided range (=min..=max). function randomUint(uint256 min, uint256 max) external returns (uint256); + /// Unpauses collection of call traces. + function resumeTracing() external view; + /// Encodes a `bytes` value to a base64url string. function toBase64URL(bytes calldata data) external pure returns (string memory); diff --git a/test/Vm.t.sol b/test/Vm.t.sol index 46b6c8c0..04786372 100644 --- a/test/Vm.t.sol +++ b/test/Vm.t.sol @@ -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 pure { - assertEq(type(VmSafe).interfaceId, bytes4(0x5c59cbde), "VmSafe"); + assertEq(type(VmSafe).interfaceId, bytes4(0x23e7dc1b), "VmSafe"); assertEq(type(Vm).interfaceId, bytes4(0x1316b43e), "Vm"); } }