Skip to content

Commit

Permalink
add missing doc comments, bump dusk rpc url
Browse files Browse the repository at this point in the history
  • Loading branch information
sambukowski committed Nov 5, 2024
1 parent 3c6e456 commit bf594e8
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 11 deletions.
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: 2 additions & 2 deletions crates/astria-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
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(
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(
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(
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(
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(
Expand Down
3 changes: 2 additions & 1 deletion crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs
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(
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

0 comments on commit bf594e8

Please sign in to comment.