diff --git a/crates/astria-cli/src/bridge/mod.rs b/crates/astria-cli/src/bridge/mod.rs index cfa4aaaa81..fa65c0bd5a 100644 --- a/crates/astria-cli/src/bridge/mod.rs +++ b/crates/astria-cli/src/bridge/mod.rs @@ -36,8 +36,9 @@ impl Command { #[derive(Debug, Subcommand)] enum SubCommand { - /// Commands for interacting with Sequencer accounts + /// Collect withdrawals actions CollectWithdrawals(collect::Command), + /// Submit collected withdrawal actions SubmitWithdrawals(submit::Command), } diff --git a/crates/astria-cli/src/bridge/submit.rs b/crates/astria-cli/src/bridge/submit.rs index f7753b5bca..e387fce2b6 100644 --- a/crates/astria-cli/src/bridge/submit.rs +++ b/crates/astria-cli/src/bridge/submit.rs @@ -30,14 +30,19 @@ use tracing::{ #[derive(clap::Args, Debug)] pub(crate) struct Command { + /// Path to the file containing the actions to submit #[arg(long, short)] input: PathBuf, + /// Path to the file containing the signing key #[arg(long)] signing_key: PathBuf, + /// The address prefix for the sequencer account #[arg(long, default_value = "astria")] sequencer_address_prefix: String, + /// The chain ID of the sequencer #[arg(long)] sequencer_chain_id: String, + /// The URL of the sequencer rpc #[arg(long)] sequencer_url: String, } diff --git a/crates/astria-cli/src/sequencer/bridge_lock.rs b/crates/astria-cli/src/sequencer/bridge_lock.rs index a629192752..7049d9f11b 100644 --- a/crates/astria-cli/src/sequencer/bridge_lock.rs +++ b/crates/astria-cli/src/sequencer/bridge_lock.rs @@ -22,16 +22,18 @@ pub(super) struct Command { /// The amount being locked #[arg(long)] amount: u128, + /// The address on the destination chain #[arg(long)] destination_chain_address: String, /// The prefix to construct a bech32m address given the private key. #[arg(long, default_value = "astria")] prefix: String, + /// The private key of the account locking the funds + #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] // TODO: https://github.com/astriaorg/astria/issues/594 // Don't use a plain text private, prefer wrapper like from // the secrecy crate with specialized `Debug` and `Drop` implementations // that overwrite the key on drop and don't reveal it when printing. - #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] private_key: String, /// The url of the Sequencer node #[arg(long, env = "SEQUENCER_URL")] diff --git a/crates/astria-cli/src/sequencer/ics20_withdrawal.rs b/crates/astria-cli/src/sequencer/ics20_withdrawal.rs index 68ec8c1d72..81086f3887 100644 --- a/crates/astria-cli/src/sequencer/ics20_withdrawal.rs +++ b/crates/astria-cli/src/sequencer/ics20_withdrawal.rs @@ -60,11 +60,12 @@ pub(super) struct Command { /// The prefix to construct a bech32m address given the private key #[arg(long, default_value = "astria")] prefix: String, + /// The private key of the account withdrawing the funds + #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] // TODO: https://github.com/astriaorg/astria/issues/594 // Don't use a plain text private, prefer wrapper like from // the secrecy crate with specialized `Debug` and `Drop` implementations // that overwrite the key on drop and don't reveal it when printing. - #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] private_key: String, /// The url of the Sequencer node #[arg(long, env = "SEQUENCER_URL")] diff --git a/crates/astria-cli/src/sequencer/init_bridge_account.rs b/crates/astria-cli/src/sequencer/init_bridge_account.rs index 41085bc53d..34a351ca06 100644 --- a/crates/astria-cli/src/sequencer/init_bridge_account.rs +++ b/crates/astria-cli/src/sequencer/init_bridge_account.rs @@ -15,11 +15,12 @@ pub(super) struct Command { /// The bech32m prefix that will be used for constructing addresses using the private key #[arg(long, default_value = "astria")] prefix: String, + /// The private key of the account initializing the bridge account + #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] // TODO: https://github.com/astriaorg/astria/issues/594 // Don't use a plain text private, prefer wrapper like from // the secrecy crate with specialized `Debug` and `Drop` implementations // that overwrite the key on drop and don't reveal it when printing. - #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] private_key: String, /// The url of the Sequencer node #[arg(long, env = "SEQUENCER_URL")] diff --git a/crates/astria-cli/src/sequencer/sudo/fee_asset.rs b/crates/astria-cli/src/sequencer/sudo/fee_asset.rs index dd9a021f19..a04ff1d90a 100644 --- a/crates/astria-cli/src/sequencer/sudo/fee_asset.rs +++ b/crates/astria-cli/src/sequencer/sudo/fee_asset.rs @@ -91,11 +91,12 @@ struct ArgsInner { /// The bech32m prefix that will be used for constructing addresses using the private key #[arg(long, default_value = "astria")] prefix: String, + /// The private key of the sudo account authorizing change + #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] // TODO: https://github.com/astriaorg/astria/issues/594 // Don't use a plain text private, prefer wrapper like from // the secrecy crate with specialized `Debug` and `Drop` implementations // that overwrite the key on drop and don't reveal it when printing. - #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] private_key: String, /// The url of the Sequencer node #[arg(long, env = "SEQUENCER_URL")] diff --git a/crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs b/crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs index 263bb22597..8c546701e0 100644 --- a/crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs +++ b/crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs @@ -88,11 +88,12 @@ struct ArgsInner { /// The prefix to construct a bech32m address given the private key. #[arg(long, default_value = "astria")] prefix: String, + /// The private key of the account authorizing the change + #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] // TODO: https://github.com/astriaorg/astria/issues/594 // Don't use a plain text private, prefer wrapper like from // the secrecy crate with specialized `Debug` and `Drop` implementations // that overwrite the key on drop and don't reveal it when printing. - #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] private_key: String, /// The url of the Sequencer node #[arg(long, env = "SEQUENCER_URL")] diff --git a/crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs b/crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs index 147dc0afc2..d37104ba06 100644 --- a/crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs +++ b/crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs @@ -17,11 +17,12 @@ pub(super) struct Command { /// The bech32m prefix that will be used for constructing addresses using the private key #[arg(long, default_value = "astria")] prefix: String, + /// The private key of account authorizing the change + #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] // TODO: https://github.com/astriaorg/astria/issues/594 // Don't use a plain text private, prefer wrapper like from // the secrecy crate with specialized `Debug` and `Drop` implementations // that overwrite the key on drop and don't reveal it when printing. - #[arg(long, env = "SEQUENCER_PRIVATE_KEY")] private_key: String, /// The url of the Sequencer node #[arg(long, env = "SEQUENCER_URL")] diff --git a/crates/astria-cli/src/sequencer/threshold/dkg.rs b/crates/astria-cli/src/sequencer/threshold/dkg.rs index 8ea7295c1d..8469bbfded 100644 --- a/crates/astria-cli/src/sequencer/threshold/dkg.rs +++ b/crates/astria-cli/src/sequencer/threshold/dkg.rs @@ -48,6 +48,7 @@ pub(super) struct Command { #[arg(long)] public_key_package_path: String, + /// The address prefix for the generated address. #[arg(long, default_value = "astria")] prefix: String, } diff --git a/crates/astria-cli/src/sequencer/transfer.rs b/crates/astria-cli/src/sequencer/transfer.rs index b80c46812f..69a5036f88 100644 --- a/crates/astria-cli/src/sequencer/transfer.rs +++ b/crates/astria-cli/src/sequencer/transfer.rs @@ -17,9 +17,9 @@ use crate::utils::submit_transaction; #[derive(clap::Args, Debug)] pub(super) struct Command { - // The address of the Sequencer account to send amount to + /// The address of the Sequencer account to send amount to to_address: Address, - // The amount being sent + /// The amount being sent #[arg(long)] amount: u128, /// The bech32m prefix that will be used for constructing addresses using the private key