Skip to content

Commit

Permalink
chore(cli)!: remove unmaintained rollup subcommand (#1235)
Browse files Browse the repository at this point in the history
## Summary
Removes the `rollup` subcommand from `astria-cli`.

## Background
Deployment related logic has been moved from the monorepo's `astria-cli`
to https://github.com/astriaorg/astria-cli-go. The current functionality
is unmtained and likely broken.

## Changes
- Remove the `rollup` subcommand from `astria-cli` and all related
modules.

## Breaking Changelist
Marked as a breaking change because functionality was removed. In
practice this should not matter because nobody should be actively using
the tool (no promise of maintenance, likely broken on HEAD).
  • Loading branch information
SuperFluffy authored Jul 3, 2024
1 parent ca05ee3 commit 9c969a3
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 1,177 deletions.
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions crates/astria-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,3 @@ which = { workspace = true }
package = "astria-sequencer-client"
path = "../astria-sequencer-client"
features = ["http"]

[dev-dependencies]
assert_cmd = "2.0.12"
test-utils = { path = "./test-utils" }
48 changes: 2 additions & 46 deletions crates/astria-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
# Astria CLI

Astria CLI is a command line tool for interacting with the Sequencer network
and for managing your own rollup deployments. You can create a
Sequencer account, check balances, generate rollup deployment configurations,
deploy rollups, and more.
Astria CLI is a command line tool for interacting with the Sequencer network.
You can create a Sequencer account, check balances, and more.

## Dependencies

* rust - <https://www.rust-lang.org/tools/install>
* docker - <https://docs.docker.com/get-docker/>
* kubectl - <https://kubernetes.io/docs/tasks/tools/>
* kind - <https://kind.sigs.k8s.io/docs/user/quick-start/#installation>
* helm - <https://helm.sh/docs/intro/install/>

## Setup

Expand All @@ -32,44 +26,6 @@ cargo build --release
# create account on Sequencer
./target/release/astria-cli sequencer account create

# create a rollup config
./target/release/astria-cli rollup config create \
--use-tty \
--log-level DEBUG \
--rollup.name steezechain \
--rollup.network-id 42 \
--rollup.genesis-accounts 0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30:100000000000000000000

# edit config
./target/release/astria-cli rollup config edit \
--config somerollupname-rollup-config.yaml
<KEY> <VALUE>

# delete config
./target/release/astria-cli rollup config delete \
--config somerollupname-rollup-config.yaml

# create deployment from config
# FAUCET_PRIVATE_KEY - 64 character hex string. private key of account used to
# fund the faucet. This will often be the private key of an address used in
# the `rollup.genesis-accounts` argument for `rollup config create` above.
# SEQUENCER_PRIVATE_KEY - 64 character hex string. private key of account used
# to wrap transactions for submission to the sequencer.
./target/release/astria-cli rollup deployment create \
--config somerollupname-rollup-config.yaml \
--faucet-private-key <FAUCET_PRIVATE_KEY> \
--sequencer-private-key <SEQUENCER_PRIVATE_KEY>

# NOTE - you can also run `deployment create` with `--dry-run` to see the
# generated k8s yaml without actually creating the deployment

# list deployments
./target/release/astria-cli rollup deployment list

# delete deployment
./target/release/astria-cli rollup deployment delete \
--config somerollupname-rollup-config.yaml

# get balance of account on Sequencer
./target/release/astria-cli sequencer balance get <ADDRESS> \
--sequencer_url <SEQUENCER_URL>
Expand Down
11 changes: 0 additions & 11 deletions crates/astria-cli/justfile

This file was deleted.

10 changes: 1 addition & 9 deletions crates/astria-cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub(crate) mod rollup;
pub(crate) mod sequencer;

use clap::{
Expand All @@ -7,10 +6,7 @@ use clap::{
};
use color_eyre::eyre;

use crate::cli::{
rollup::Command as RollupCommand,
sequencer::Command as SequencerCommand,
};
use crate::cli::sequencer::Command as SequencerCommand;

const DEFAULT_SEQUENCER_RPC: &str = "https://rpc.sequencer.dusk-7.devnet.astria.org";
const DEFAULT_SEQUENCER_CHAIN_ID: &str = "astria-dusk-7";
Expand Down Expand Up @@ -38,10 +34,6 @@ impl Cli {
/// Commands that can be run
#[derive(Debug, Subcommand)]
pub enum Command {
Rollup {
#[command(subcommand)]
command: RollupCommand,
},
Sequencer {
#[command(subcommand)]
command: SequencerCommand,
Expand Down
24 changes: 0 additions & 24 deletions crates/astria-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod rollup;
mod sequencer;

use color_eyre::{
Expand All @@ -8,11 +7,6 @@ use color_eyre::{
use tracing::instrument;

use crate::cli::{
rollup::{
Command as RollupCommand,
ConfigCommand,
DeploymentCommand,
},
sequencer::{
AccountCommand,
AddressCommand,
Expand Down Expand Up @@ -44,24 +38,6 @@ use crate::cli::{
pub async fn run(cli: Cli) -> eyre::Result<()> {
if let Some(command) = cli.command {
match command {
Command::Rollup {
command,
} => match command {
RollupCommand::Config {
command,
} => match command {
ConfigCommand::Create(args) => rollup::create_config(&args).await?,
ConfigCommand::Edit(args) => rollup::edit_config(&args)?,
ConfigCommand::Delete(args) => rollup::delete_config(&args)?,
},
RollupCommand::Deployment {
command,
} => match command {
DeploymentCommand::Create(args) => rollup::create_deployment(&args)?,
DeploymentCommand::Delete(args) => rollup::delete_deployment(&args)?,
DeploymentCommand::List => rollup::list_deployments(),
},
},
Command::Sequencer {
command,
} => match command {
Expand Down
Loading

0 comments on commit 9c969a3

Please sign in to comment.