-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(cheats): support arrays + rename read + resolve env vars
#11302
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
Conversation
…oundry into rusowsky/extend-fork-cheats
…oundry into rusowsky/extend-fork-cheats
mattsse
left a comment
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.
I'd like to prefix all of these with read or parse, read is prob better,
so that these can be mistaken for the exxisting actual fork related cheatcodes
read + resolve env vars
| ($struct:ident, $sol_type:expr,stateful) => { | ||
| impl Cheatcode for $struct { | ||
| fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { | ||
| let chain = get_active_fork_chain_id(ccx)?; |
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.
pls use the let Self {...} = self syntax to not miss arguments
grandizzy
left a comment
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.
lgtm!
- update of read fork cheatcodes: foundry-rs/foundry#11302 - `getStorageAccesses` cheatcode: foundry-rs/foundry#11296 --------- Co-authored-by: grandizzy <[email protected]>
…dry-rs#11302) * feat(cheats): add fork cheats to load array vars * add more tests * refactor to reduce duplicate code * fix: test spacing * style: clippy * fix: test spacing * style: rename to `readFork..` * docs: improve cheat comments * style: rename missing cheats * docs: update cmnts * fix: use existing toml and json parsing helper fns * feat: resolve env vars in 'fork' config * fix: test spacing * fix: expected test logs * fix: use `let Self { .. } = self` syntax --------- Co-authored-by: grandizzy <[email protected]>
- update of read fork cheatcodes: foundry-rs/foundry#11302 - `getStorageAccesses` cheatcode: foundry-rs/foundry#11296 --------- Co-authored-by: grandizzy <[email protected]>
- update of read fork cheatcodes: foundry-rs/foundry#11302 - `getStorageAccesses` cheatcode: foundry-rs/foundry#11296 --------- Co-authored-by: grandizzy <[email protected]>
Motivation
foundry.toml, so that they also support arrays.readForkto be more idiomatic.refs:
example usage:
PR Checklist