From bf594e8c86a8fd504329e16e229ac050ca25cdd9 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Tue, 5 Nov 2024 13:15:01 -0700 Subject: [PATCH] add missing doc comments, bump dusk rpc url --- crates/astria-cli/src/bridge/mod.rs | 3 ++- crates/astria-cli/src/bridge/submit.rs | 5 +++++ crates/astria-cli/src/lib.rs | 4 ++-- crates/astria-cli/src/sequencer/bridge_lock.rs | 4 +++- crates/astria-cli/src/sequencer/ics20_withdrawal.rs | 3 ++- crates/astria-cli/src/sequencer/init_bridge_account.rs | 3 ++- crates/astria-cli/src/sequencer/sudo/fee_asset.rs | 3 ++- crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs | 3 ++- crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs | 3 ++- crates/astria-cli/src/sequencer/threshold/dkg.rs | 1 + crates/astria-cli/src/sequencer/transfer.rs | 4 ++-- 11 files changed, 25 insertions(+), 11 deletions(-) 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/lib.rs b/crates/astria-cli/src/lib.rs index e4d7a90ba8..fad98a0c01 100644 --- a/crates/astria-cli/src/lib.rs +++ b/crates/astria-cli/src/lib.rs @@ -15,8 +15,8 @@ use clap::{ }; use color_eyre::eyre; -const DEFAULT_SEQUENCER_RPC: &str = "https://rpc.sequencer.dusk-10.devnet.astria.org"; -const DEFAULT_SEQUENCER_CHAIN_ID: &str = "astria-dusk-10"; +const DEFAULT_SEQUENCER_RPC: &str = "https://rpc.sequencer.dusk-11.devnet.astria.org"; +const DEFAULT_SEQUENCER_CHAIN_ID: &str = "astria-dusk-11"; /// Run commands against the Astria network. #[derive(Debug, Parser)] diff --git a/crates/astria-cli/src/sequencer/bridge_lock.rs b/crates/astria-cli/src/sequencer/bridge_lock.rs index 884064a3bd..3f5245fd06 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( diff --git a/crates/astria-cli/src/sequencer/ics20_withdrawal.rs b/crates/astria-cli/src/sequencer/ics20_withdrawal.rs index c1053f9881..77c64cf540 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( diff --git a/crates/astria-cli/src/sequencer/init_bridge_account.rs b/crates/astria-cli/src/sequencer/init_bridge_account.rs index 9a7e806d05..e3be37bbae 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( diff --git a/crates/astria-cli/src/sequencer/sudo/fee_asset.rs b/crates/astria-cli/src/sequencer/sudo/fee_asset.rs index dff0b8ddee..8f64661054 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( diff --git a/crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs b/crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs index 1e3d735899..2676232410 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( 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 9591fb5fa7..2c4037de9e 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( 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 885a9a4e2f..9591d6f952 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