-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat!(forge script): add --interactive flag for deploying with a single keypair
#12608
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!(forge script): add --interactive flag for deploying with a single keypair
#12608
Conversation
Co-authored-by: Dipanshu Singh <58115782+dipanshuhappy@users.noreply.github.com>
| signers.extend(mnemonics); | ||
| } | ||
| if self.interactive { | ||
| pending.push(PendingSigner::Interactive); |
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.
We simply push this in the same pending queue that interactives uses and re-use the existing flow
| default_value = "0", | ||
| value_name = "NUM" | ||
| )] | ||
| #[arg(long, help_heading = "Wallet options - raw", default_value = "0", value_name = "NUM")] |
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.
Note the removal of short, breaking change in favor of interactive carrying the short flag
I think this is worth it for UX consistency, https://github.com/search?q=%22forge+script%22+-i+&type=code shows a few very minor examples in unmaintained repos
forge script): add --interactive flagforge script): add --interactive flag
forge script): add --interactive flagforge script): add --interactive flag for deploying with a single keypair
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.
yep, makes sense
Motivation
Adds
--interactiveflag mirroring current use inRawWalletOptspreventing the user from having to pass--interactives 1 --sender <SENDER_ADDRESS>Difficult to test due to the interactive nature but tested manually
Solution
Closes: #12601
Added @dipanshuhappy as co-author as it was originally assigned to them, took over to unblock myself
PR Checklist
Breaking changes
Uses the
-ishorthand for--interactiveflag mirroring behavior ofRawWalletOptsthat people are used to.Existing users will be faced with error: