Skip to content

Commit badd6c3

Browse files
committed
chore(10027-cheatcode-mutability-tags): create checklist for cheatcodes that need a mutability modifier
1 parent cc3a3f8 commit badd6c3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Cheatcode Mutability Review (`view` / `pure`)
2+
3+
This document tracks the Foundry cheatcodes that are currently marked `external` with no `view` or `pure` mutability modifier.
4+
5+
## Review Criteria
6+
7+
From issue [#10027](https://github.com/foundry-rs/foundry/issues/10027):
8+
9+
- If a cheatcode **modifies observable state for later cheatcode calls** (EVM, interpreter, filesystem), it is neither `view` nor `pure`
10+
- If a cheatcode **depends on prior cheatcode calls or reads test environment state**, it is `view`
11+
- If a cheatcode **has no side effects and doesn’t depend on test state**, it is `pure`
12+
13+
## Checklist
14+
15+
| Cheatcode ID | Function Signature | Proposed Mutability |
16+
|--------------|--------------------|----------------------|
17+
| `createWallet_1` | `function createWallet(uint256)` | `TBD` |
18+
| `sign_0` | `function sign(...)` | `TBD` |
19+
| ... | ... | ... |

0 commit comments

Comments
 (0)