@@ -9,18 +9,18 @@ as test for specific reverts and events, Foundry is shipped with a set of cheat
9
9
## ` revm ` ` Inspector `
10
10
11
11
To understand how cheat codes are implemented, we first need to look
12
- at [ ` revm::Inspector ` ] (https://docs.rs/revm/latest/revm/trait.Inspector.html ), a trait that provides a set of event
12
+ at [ ` revm::Inspector ` ] ( https://docs.rs/revm/latest/revm/trait.Inspector.html ) , a trait that provides a set of event
13
13
hooks to be notified at certain stages of EVM execution.
14
14
15
- For example ` Inspector::call ` is called wen the EVM is about to execute a call:
15
+ For example [ ` Inspector::call ` ] ( https://docs.rs/revm/latest/revm/trait.Inspector.html#method.call ) is called wen the EVM is about to execute a call:
16
16
17
17
``` rust
18
18
fn call (
19
19
& mut self ,
20
20
_data : & mut EVMData <'_ , DB >,
21
21
_inputs : & mut CallInputs ,
22
22
_is_static : bool
23
- ) -> (Return , Gas , Bytes ) { ... }
23
+ ) -> (InstructionResult , Gas , Bytes ) { ... }
24
24
```
25
25
26
26
## [ Foundry Inspectors] ( ../../evm/src/executor/inspector )
@@ -38,7 +38,7 @@ The concept of cheat codes and cheat code inspector is very simple.
38
38
39
39
In solidity cheat codes are calls to a specific address, the cheat code handler address:
40
40
41
- ` keccak( address(bytes20( uint160(uint256(keccak256('hevm cheat code')) ))))` : 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D
41
+ ` address(uint160(uint256(keccak256('hevm cheat code')))) ` : 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D
42
42
43
43
which can be initialized like ` Cheats constant cheats = Cheats(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); ` , when
44
44
inheriting from ` forge-std/Test.sol ` it can be accessed via ` vm.<cheatcode> ` directly.
0 commit comments