Skip to content
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

Chore(cli): Update Command Information #1789

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/astria-cli/src/bridge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand Down
5 changes: 5 additions & 0 deletions crates/astria-cli/src/bridge/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
4 changes: 3 additions & 1 deletion crates/astria-cli/src/sequencer/bridge_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
3 changes: 2 additions & 1 deletion crates/astria-cli/src/sequencer/ics20_withdrawal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
3 changes: 2 additions & 1 deletion crates/astria-cli/src/sequencer/init_bridge_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
3 changes: 2 additions & 1 deletion crates/astria-cli/src/sequencer/sudo/fee_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
3 changes: 2 additions & 1 deletion crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
1 change: 1 addition & 0 deletions crates/astria-cli/src/sequencer/threshold/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-cli/src/sequencer/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading