Skip to content

Commit

Permalink
overlooked renames
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFluffy committed Oct 2, 2024
1 parent 0e14a19 commit 174b5fc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions crates/astria-cli/src/bridge/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use tracing::{
use super::ActionsByRollupHeight;

#[derive(clap::Args, Debug)]
pub(super) struct Args {
pub(super) struct Command {
/// The websocket endpoint of a geth compatible rollup.
#[arg(long)]
rollup_endpoint: String,
Expand Down Expand Up @@ -81,7 +81,7 @@ pub(super) struct Args {
force: bool,
}

impl Args {
impl Command {
pub(super) async fn run(self) -> eyre::Result<()> {
let Self {
rollup_endpoint,
Expand Down
16 changes: 8 additions & 8 deletions crates/astria-cli/src/bridge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ use tracing::instrument;

/// Interact with a Sequencer node
#[derive(Debug, clap::Args)]
pub(super) struct Args {
pub(super) struct Command {
#[command(subcommand)]
command: Command,
command: SubCommand,
}

impl Args {
impl Command {
pub(super) async fn run(self) -> eyre::Result<()> {
match self.command {
Command::CollectWithdrawals(args) => args.run().await,
Command::SubmitWithdrawals(args) => args.run().await,
SubCommand::CollectWithdrawals(args) => args.run().await,
SubCommand::SubmitWithdrawals(args) => args.run().await,
}
}
}

#[derive(Debug, Subcommand)]
enum Command {
enum SubCommand {
/// Commands for interacting with Sequencer accounts
CollectWithdrawals(collect::Args),
SubmitWithdrawals(submit::Args),
CollectWithdrawals(collect::Command),
SubmitWithdrawals(submit::Command),
}

#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-cli/src/bridge/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use tracing::{
};

#[derive(clap::Args, Debug)]
pub(crate) struct Args {
pub(crate) struct Command {
#[arg(long, short)]
input: PathBuf,
#[arg(long)]
Expand All @@ -42,7 +42,7 @@ pub(crate) struct Args {
sequencer_url: String,
}

impl Args {
impl Command {
pub(crate) async fn run(self) -> eyre::Result<()> {
let signing_key = read_signing_key(&self.signing_key).wrap_err_with(|| {
format!(
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 @@ -47,7 +47,7 @@ impl Cli {
#[derive(Debug, Subcommand)]
enum Command {
/// Collect events from a rollup and submit to Sequencer.
Bridge(bridge::Args),
Bridge(bridge::Command),
/// Interact with Sequencer.
Sequencer(sequencer::Args),
Sequencer(sequencer::Command),
}
24 changes: 12 additions & 12 deletions crates/astria-cli/src/sequencer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ mod sudo;
mod transfer;

#[derive(Debug, clap::Args)]
pub(super) struct Args {
pub(super) struct Command {
#[command(subcommand)]
command: Command,
command: SubCommand,
}

impl Args {
impl Command {
pub(super) async fn run(self) -> eyre::Result<()> {
match self.command {
Command::Account(account) => account.run().await,
Command::Address(address) => address.run(),
Command::Balance(balance) => balance.run().await,
Command::BlockHeight(block_height) => block_height.run().await,
Command::BridgeLock(bridge_lock) => bridge_lock.run().await,
Command::InitBridgeAccount(init_bridge_account) => init_bridge_account.run().await,
Command::Sudo(sudo) => sudo.run().await,
Command::Transfer(transfer) => transfer.run().await,
SubCommand::Account(account) => account.run().await,
SubCommand::Address(address) => address.run(),
SubCommand::Balance(balance) => balance.run().await,
SubCommand::BlockHeight(block_height) => block_height.run().await,
SubCommand::BridgeLock(bridge_lock) => bridge_lock.run().await,
SubCommand::InitBridgeAccount(init_bridge_account) => init_bridge_account.run().await,
SubCommand::Sudo(sudo) => sudo.run().await,
SubCommand::Transfer(transfer) => transfer.run().await,
}
}
}

/// Interact with a Sequencer node
#[derive(Debug, Subcommand)]
enum Command {
enum SubCommand {
/// Commands for interacting with Sequencer accounts
Account(account::Command),
/// Utilities for constructing and inspecting sequencer addresses
Expand Down

0 comments on commit 174b5fc

Please sign in to comment.