-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(cheats): setup config env vars #11236
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
|
I am thinking that a nicer devex is to not add the additional |
|
good point, i think this could be better devex! some questions though, how would that work in practice? 🤔
|
I think here we should just error to avoid any confusion.
Ah, I see, then makes sense to have such. Maybe then we should just stick with the initial impl you proposed and gather feedback from community re the fork aware cheatcodes I suggested... @zerosnacks wdyt? |
|
I prefer the newly added cheatcodes as well — these make the fork scripting pattern more intentional. Currently, users would Impl is looking good. |
yash-atreya
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! Needs a forge-std PR for the new cheatcodes
…cheat-script-vars
…cheat-script-vars
…undry into rusowsky/cheat-script-vars
support the new cheatcodes added in foundry-rs/foundry#11236 support new nonce diffs added in foundry-rs/foundry#11215 --------- Co-authored-by: grandizzy <[email protected]>
support the new cheatcodes added in foundry-rs/foundry#11236 support new nonce diffs added in foundry-rs/foundry#11215 --------- Co-authored-by: grandizzy <[email protected]>
support the new cheatcodes added in foundry-rs/foundry#11236 support new nonce diffs added in foundry-rs/foundry#11215 --------- Co-authored-by: grandizzy <[email protected]>
Motivation
ref: #11078
Solution
this PR introduces a new
[fork]section infoundry.tomlto configure all the necessary variables to easily deal with multi-chain tests and scripts.this configuration is then made available at runtime with a new set of cheatcodes:
PS: these already available cheatcodes are also useful to convert between chain ids and chain names: