Skip to content

Commit 98ae17c

Browse files
committed
chore(10027-cheatcode-mutability-tags): accesses() confirmed to not have side effect logic
1 parent 8c6227d commit 98ae17c

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
@@ -410,7 +410,7 @@ interface Vm {
410410

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

415415
/// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order,
416416
/// 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)