@@ -5,12 +5,12 @@ import {Constants} from "./Constants.sol";
55
66/**
77 * @dev Available cheat codes for Medusa.
8- * Documentation: https://github.com/crytic/medusa/tree/dev/mdbook/ docs/src/cheatcodes
9- * Usage: https://github.com/crytic/medusa/blob/dev/mdbook/ docs/src/cheatcodes_overview.md
8+ * Documentation: https://github.com/crytic/medusa/blob/master/ docs/src/cheatcodes/cheatcodes_overview.md
9+ * Usage: https://github.com/crytic/medusa/blob/master/ docs/src/cheatcodes/ cheatcodes_overview.md#cheatcode-interface
1010 * @author Perimeter <info@perimetersec.io>
1111 */
1212interface IStdCheats {
13- /**
13+ /**
1414 * @dev Set block.timestamp
1515 */
1616 function warp (uint256 x ) external ;
@@ -23,20 +23,25 @@ interface IStdCheats {
2323 /**
2424 * @dev Set block.basefee
2525 */
26- function fee (uint256 x ) external ;
26+ function fee (uint256 fee ) external ;
27+
28+ /**
29+ * @dev Set block.difficulty (deprecated in `medusa`)
30+ */
31+ function difficulty (uint256 difficulty ) external ;
2732
2833 /**
29- * @dev Set block.difficulty and block. prevrandao
34+ * @dev Set block.prevrandao
3035 */
31- function difficulty ( uint256 x ) external ;
36+ function prevrandao ( bytes32 x ) external ;
3237
3338 /**
3439 * @dev Set block.chainid
3540 */
3641 function chainId (uint256 x ) external ;
3742
3843 /**
39- * @dev Sets the block.coinbase
44+ * @dev Set block.coinbase
4045 */
4146 function coinbase (address x ) external ;
4247
@@ -55,6 +60,16 @@ interface IStdCheats {
5560 */
5661 function prank (address sender ) external ;
5762
63+ /**
64+ * @dev Sets all subsequent call's msg.sender (until stopPrank is called) to be the input address
65+ */
66+ function startPrank (address sender ) external ;
67+
68+ /**
69+ * @dev Stops a previously called startPrank
70+ */
71+ function stopPrank () external ;
72+
5873 /**
5974 * @dev Set msg.sender to the input address until the current call exits
6075 */
@@ -70,6 +85,11 @@ interface IStdCheats {
7085 */
7186 function etch (address who , bytes calldata code ) external ;
7287
88+ /**
89+ * @dev Sets a label for an address (for debugging purposes)
90+ */
91+ function label (address account , string calldata label ) external ;
92+
7393 /**
7494 * @dev Signs data
7595 */
@@ -80,6 +100,11 @@ interface IStdCheats {
80100 */
81101 function addr (uint256 privateKey ) external returns (address );
82102
103+ /**
104+ * @dev Gets the creation bytecode of a contract
105+ */
106+ function getCode (string calldata ) external returns (bytes memory );
107+
83108 /**
84109 * @dev Gets the nonce of an account
85110 */
@@ -96,6 +121,16 @@ interface IStdCheats {
96121 */
97122 function ffi (string [] calldata ) external returns (bytes memory );
98123
124+ /**
125+ * @dev Take a snapshot of the current state of the EVM
126+ */
127+ function snapshot () external returns (uint256 );
128+
129+ /**
130+ * @dev Revert state back to a snapshot
131+ */
132+ function revertTo (uint256 ) external returns (bool );
133+
99134 /**
100135 * @dev Convert Solidity types to strings
101136 */
0 commit comments