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

feat(cli)!: remove default chain ID, endpoint URL #1792

Open
wants to merge 2 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
5 changes: 5 additions & 0 deletions crates/astria-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed ICS20 withdrawal source when using channel with more than one
port/channel combo. [#1768](https://github.com/astriaorg/astria/pull/1768)

### Changed

- Removed default values from `--sequencer.chain-id` and `--sequencer-url` arguments
[#1792](https://github.com/astriaorg/astria/pull/1792)

## [0.5.1] - 2024-10-23

### Added
Expand Down
3 changes: 0 additions & 3 deletions crates/astria-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ 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";

/// Run commands against the Astria network.
#[derive(Debug, Parser)]
#[command(name = "astria-cli", version, about)]
Expand Down
6 changes: 1 addition & 5 deletions crates/astria-cli/src/sequencer/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,7 @@ impl Nonce {
#[derive(clap::Args, Debug)]
struct ArgsInner {
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The address of the Sequencer account
address: Address,
Expand Down
6 changes: 1 addition & 5 deletions crates/astria-cli/src/sequencer/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ enum SubCommand {
#[derive(clap::Args, Debug)]
struct Get {
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The address of the Sequencer account
address: Address,
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/block_height.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,10 @@ enum SubCommand {
#[derive(clap::Args, Debug)]
struct Get {
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
}

Expand Down
6 changes: 1 addition & 5 deletions crates/astria-cli/src/sequencer/bridge_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ enum SubCommand {
#[derive(Debug, clap::Args)]
struct Get {
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
pub(crate) sequencer_url: String,
/// The bridge account address on the Sequencer
pub(crate) address: Address,
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/bridge_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,10 @@ pub(super) struct Command {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// The asset to lock.
#[arg(long, default_value = "nria")]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/bridge_sudo_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,10 @@ pub(crate) struct Command {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
pub(crate) private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
pub(crate) sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
pub(crate) sequencer_chain_id: String,
/// The asset to pay the transfer fees with.
#[arg(long, default_value = "nria")]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/ics20_withdrawal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,10 @@ pub(super) struct Command {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// The asset to withdraw
#[arg(long, default_value = "nria")]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/init_bridge_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ pub(super) struct Command {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// Plaintext rollup name (to be hashed into a rollup ID)
/// to initialize the bridge account with.
Expand Down
6 changes: 1 addition & 5 deletions crates/astria-cli/src/sequencer/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ use color_eyre::eyre::{
#[derive(clap::Args, Debug)]
pub(super) struct Command {
/// The URL at which the Sequencer node is listening for ABCI commands.
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The source to read the pbjson formatted astra.protocol.transaction.v1.Transaction (use `-`
/// to pass via STDIN).
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/sudo/fee_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,10 @@ struct ArgsInner {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// Asset's denomination string
#[arg(long)]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/sudo/ibc_relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,10 @@ struct ArgsInner {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// The address to add or remove as an IBC relayer
#[arg(long)]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/sudo/ibc_sudo_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ pub(super) struct Command {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// The new address to take over sudo privileges
#[arg(long)]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/sudo/sudo_address_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ pub(super) struct Command {
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// The new address to take over sudo privileges
#[arg(long)]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/sudo/validator_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@ use crate::utils::submit_transaction;
#[derive(clap::Args, Debug)]
pub(super) struct Command {
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// The bech32m prefix that will be used for constructing addresses using the private key
#[arg(long, default_value = "astria")]
Expand Down
12 changes: 2 additions & 10 deletions crates/astria-cli/src/sequencer/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,10 @@ pub(super) struct Command {
// that overwrite the key on drop and don't reveal it when printing.
private_key: String,
/// The url of the Sequencer node
#[arg(
long,
env = "SEQUENCER_URL",
default_value = crate::DEFAULT_SEQUENCER_RPC
)]
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(
long = "sequencer.chain-id",
env = "ROLLUP_SEQUENCER_CHAIN_ID",
default_value = crate::DEFAULT_SEQUENCER_CHAIN_ID
)]
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,
/// The asset to transer.
#[arg(long, default_value = "nria")]
Expand Down
Loading