Skip to content

Conversation

@zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Nov 19, 2025

Motivation

Adds --interactive flag mirroring current use in RawWalletOpts preventing 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

  • Added Tests
  • Added Documentation
  • Breaking changes

Breaking changes

Uses the -i shorthand for --interactive flag mirroring behavior of RawWalletOpts that people are used to.

Existing users will be faced with error:

[⠊] Compiling...
No files changed, compilation skipped
Error: encode length mismatch: expected 0 types, got 1

Co-authored-by: Dipanshu Singh <58115782+dipanshuhappy@users.noreply.github.com>
signers.extend(mnemonics);
}
if self.interactive {
pending.push(PendingSigner::Interactive);
Copy link
Member Author

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")]
Copy link
Member Author

@zerosnacks zerosnacks Nov 19, 2025

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

@zerosnacks zerosnacks changed the title feat!(forge script): add --interactive flag feat!(forge script): add --interactive flag Nov 19, 2025
@zerosnacks zerosnacks changed the title feat!(forge script): add --interactive flag feat!(forge script): add --interactive flag for deploying with a single keypair Nov 19, 2025
@zerosnacks zerosnacks marked this pull request as ready for review November 19, 2025 11:33
@zerosnacks zerosnacks moved this to Ready For Review in Foundry Nov 19, 2025
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, makes sense

@zerosnacks zerosnacks enabled auto-merge November 19, 2025 11:50
@zerosnacks zerosnacks added this pull request to the merge queue Nov 19, 2025
Merged via the queue into master with commit 1c7dcfa Nov 19, 2025
15 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/add-interactive-flag-forge-script branch November 19, 2025 12:07
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Foundry Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat(forge script): add --interactive flag

3 participants