Skip to content

Commit 1c7dcfa

Browse files
feat!(forge script): add --interactive flag for deploying with a single keypair (#12608)
* add --interactive flag Co-authored-by: Dipanshu Singh <[email protected]> * fix incomplete list command --------- Co-authored-by: Dipanshu Singh <[email protected]>
1 parent 9568eb6 commit 1c7dcfa

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

crates/cast/src/cmd/wallet/list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ impl ListArgs {
7777
.gcp(self.gcp || (self.all && gcp_env_vars_set()))
7878
.turnkey(self.turnkey || self.all)
7979
.interactives(0)
80+
.interactive(false)
8081
.build()
8182
.expect("build multi wallet");
8283

crates/wallets/src/wallet_multi/mod.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,13 @@ pub struct MultiWalletOpts {
9393
/// Open an interactive prompt to enter your private key.
9494
///
9595
/// Takes a value for the number of keys to enter.
96-
#[arg(
97-
long,
98-
short,
99-
help_heading = "Wallet options - raw",
100-
default_value = "0",
101-
value_name = "NUM"
102-
)]
96+
#[arg(long, help_heading = "Wallet options - raw", default_value = "0", value_name = "NUM")]
10397
pub interactives: u32,
10498

99+
/// Open an interactive prompt to enter your private key.
100+
#[arg(long, short, help_heading = "Wallet options - raw", conflicts_with = "interactives")]
101+
pub interactive: bool,
102+
105103
/// Use the provided private keys.
106104
#[arg(long, help_heading = "Wallet options - raw", value_name = "RAW_PRIVATE_KEYS")]
107105
#[builder(default = "None")]
@@ -264,6 +262,9 @@ impl MultiWalletOpts {
264262
if let Some(mnemonics) = self.mnemonics()? {
265263
signers.extend(mnemonics);
266264
}
265+
if self.interactive {
266+
pending.push(PendingSigner::Interactive);
267+
}
267268
if self.interactives > 0 {
268269
pending.extend(std::iter::repeat_n(
269270
PendingSigner::Interactive,

0 commit comments

Comments
 (0)