forked from crytic/properties
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hevm.sol
35 lines (26 loc) · 1.12 KB
/
Hevm.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
interface IHevm {
// Set block.timestamp to newTimestamp
function warp(uint256 newTimestamp) external;
// Set block.number to newNumber
function roll(uint256 newNumber) external;
// Loads a storage slot from an address
function load(address where, bytes32 slot) external returns (bytes32);
// Stores a value to an address' storage slot
function store(address where, bytes32 slot, bytes32 value) external;
// Signs data (privateKey, digest) => (r, v, s)
function sign(
uint256 privateKey,
bytes32 digest
) external returns (uint8 r, bytes32 v, bytes32 s);
// Gets address for a given private key
function addr(uint256 privateKey) external returns (address addr);
// Performs a foreign function call via terminal
function ffi(
string[] calldata inputs
) external returns (bytes memory result);
// Performs the next smart contract call with specified `msg.sender`
function prank(address newSender) external;
}
IHevm constant hevm = IHevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);