Skip to content

Commit 58a2729

Browse files
authored
fix(docs): minor typos and updates (#4937)
* fix(docs): minor typos and updates * fix: remove unnecessary cast
1 parent 4236ba1 commit 58a2729

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/dev/cheatcodes.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ as test for specific reverts and events, Foundry is shipped with a set of cheat
99
## `revm` `Inspector`
1010

1111
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
1313
hooks to be notified at certain stages of EVM execution.
1414

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:
1616

1717
```rust
1818
fn call(
1919
&mut self,
2020
_data: &mut EVMData<'_, DB>,
2121
_inputs: &mut CallInputs,
2222
_is_static: bool
23-
) -> (Return, Gas, Bytes) { ... }
23+
) -> (InstructionResult, Gas, Bytes) { ... }
2424
```
2525

2626
## [Foundry Inspectors](../../evm/src/executor/inspector)
@@ -38,7 +38,7 @@ The concept of cheat codes and cheat code inspector is very simple.
3838

3939
In solidity cheat codes are calls to a specific address, the cheat code handler address:
4040

41-
`keccak(address(bytes20(uint160(uint256(keccak256('hevm cheat code'))))))`: 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D
41+
`address(uint160(uint256(keccak256('hevm cheat code'))))`: 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D
4242

4343
which can be initialized like `Cheats constant cheats = Cheats(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);`, when
4444
inheriting from `forge-std/Test.sol` it can be accessed via `vm.<cheatcode>` directly.

0 commit comments

Comments
 (0)