-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cheatcodes): Record Account and Storage Access Cheatcodes #6310
Merged
mattsse
merged 19 commits into
foundry-rs:master
from
ethereum-optimism:inphi/cheat-records
Nov 17, 2023
Merged
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4d1f96c
Record storage and account access cheatcodes
refcell b7da13f
expand record access cheatcode interface
Inphi 349469e
fix small doc comment nit
refcell 924d700
fix(cheatcodes): account access doc comment
refcell 5684e20
fix(cheatcodes): clarify reverted account access status
refcell f10b03d
fix(cheatcodes): clarify balance doc comments
refcell 7d2d0c2
fix(cheatcodes): clarify initialized account access field in doc comment
refcell 03ab22f
update Access kind to include Resumed account access
Inphi b1798d4
cleanup Resume logic
Inphi 8f5cb9b
fmt
Inphi 5a63bba
remove unused Resume access kind
Inphi 055d3d9
add chain_id to AccountAccess
Inphi 9748aff
Update crates/cheatcodes/spec/src/vm.rs
Inphi f34ebe5
add ChainInfo struct; address PR comments
Inphi c454b3b
avoid old skool ref mut
Inphi 5aff57d
tidy code per pr review
Inphi 95f0326
rmeove unused import
Inphi ca03ab0
address nits
Inphi d032d9f
selfdesutrct on record ctx check
Inphi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we include the enum definition in this file and that instead of
uint256 kind
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup will do. Though currently running into an abigen issue where it fails to generate proper bindings for an AccountAccess with too many fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah interesting, should be ok if we can't use the enum here since we can still use in
Vm.sol
in forge-std, so will defer to you + @mattsse / @Evalir here about the abigen issueThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it working by replacing both chainId and forkId with a struct h/t @refcell . Good to do anyways if we'll be adding this info to the rest of the cheatcode interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't worry about it, crates/abi is deprecated and will be removed soon. It's currently only used for trace/log decoding