Skip to content

Commit 1daac99

Browse files
committed
chore(10027-cheatcode-mutability-tags): accesses() confirmed to not have side effect logic
1 parent 35c8254 commit 1daac99

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

crates/cheatcodes/assets/cheatcodes.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cheatcodes/spec/src/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ interface Vm {
405405

406406
/// Gets all accessed reads and write slot from a `vm.record` session, for a given address.
407407
#[cheatcode(group = Evm, safety = Safe)]
408-
function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);
408+
function accesses(address target) external view returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);
409409

410410
/// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order,
411411
/// along with the context of the calls

docs/dev/cheatcode-mutability-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Mark `pure`:
4141
Mark `view`:
4242

4343
- [x] `accessList`: `accessList(address,bytes32[])` _resolved: not view, keep as is due to test coverage indicating stateful behavior_
44-
- [ ] `accesses`: `accesses(address)`
44+
- [x] `accesses`: `accesses(address)` _suggested: `view`_
4545
- [ ] `eth_getLogs`: `eth_getLogs(uint256,uint256,address,bytes32[])`
4646
- [ ] `getMappingKeyAndParentOf`: `getMappingKeyAndParentOf(address,bytes32)`
4747
- [ ] `getMappingLength`: `getMappingLength(address,bytes32)`

0 commit comments

Comments
 (0)