Skip to content

Commit

Permalink
refactor(cli): separate address command to tool
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFluffy committed Nov 12, 2024
1 parent c1ce512 commit ee01a01
Show file tree
Hide file tree
Showing 11 changed files with 731 additions and 61 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,38 @@ jobs:
run: |
cargo nextest run --package astria-bridge-withdrawer -- --include-ignored
# Specifically for tools other than the protobuf and solidity compilers which
# are run as part of other steps. (only `tools/astria-address` for now).
rust-tools:
runs-on: buildjet-8vcpu-ubuntu-2204
needs: run_checker
if: needs.run_checker.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2.7.3
with:
cache-provider: "buildjet"
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Build tests
run: |
cargo nextest archive \
--manifest-path tools/astria-address/Cargo.toml \
--archive-file=archive.tar.zst \
--release \
--all-features \
--all-targets \
- name: Run tests
timeout-minutes: 20
run: |
cargo nextest run --archive-file=archive.tar.zst
doctest:
runs-on: buildjet-8vcpu-ubuntu-2204
needs: run_checker
Expand Down Expand Up @@ -280,7 +312,7 @@ jobs:
test:
if: ${{ always() && !cancelled() }}
needs: [compiles, protos-compiled, solidity-contracts-compiled, rust, doctest, clippy, lockfile, custom-lints]
needs: [compiles, protos-compiled, solidity-contracts-compiled, rust, rust-tools, doctest, clippy, lockfile, custom-lints]
uses: ./.github/workflows/reusable-success.yml
with:
success: ${{ !contains(needs.*.result, 'failure') }}
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[workspace]
exclude = ["tools/protobuf-compiler", "tools/solidity-compiler"]
exclude = [
"tools/protobuf-compiler",
"tools/solidity-compiler",
"tools/astria-address",
]

members = [
"crates/astria-bridge-contracts",
Expand Down
4 changes: 4 additions & 0 deletions crates/astria-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ 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)

### Removed

- Removed `sequeuncer address` subcommand [#1803](https://github.com/astriaorg/astria/pull/1803)

## [0.5.1] - 2024-10-23

### Added
Expand Down
55 changes: 0 additions & 55 deletions crates/astria-cli/src/sequencer/address.rs

This file was deleted.

4 changes: 0 additions & 4 deletions crates/astria-cli/src/sequencer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use clap::Subcommand;
use color_eyre::eyre;

mod account;
mod address;
mod balance;
mod block_height;
mod bridge_account;
Expand All @@ -26,7 +25,6 @@ impl Command {
pub(super) async fn run(self) -> eyre::Result<()> {
match self.command {
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,
Expand All @@ -48,8 +46,6 @@ impl Command {
enum SubCommand {
/// Commands for interacting with Sequencer accounts
Account(account::Command),
/// Utilities for constructing and inspecting sequencer addresses
Address(address::Command),
/// Commands for interacting with Sequencer balances
Balance(balance::Command),
/// Commands for interacting with Sequencer block heights
Expand Down
14 changes: 14 additions & 0 deletions tools/astria-address/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- markdownlint-disable no-duplicate-heading -->

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Initial release [#1803](https://github.com/astriaorg/astria/pull/1803)
Loading

0 comments on commit ee01a01

Please sign in to comment.