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

refactor(cli)!: break address tool out of cli #1803

Open
wants to merge 4 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
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') }}
15 changes: 14 additions & 1 deletion Cargo.lock

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

10 changes: 9 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 All @@ -10,6 +14,8 @@ members = [
"crates/astria-conductor",
"crates/astria-config",
"crates/astria-core",
"crates/astria-core-address",
"crates/astria-core-consts",
"crates/astria-eyre",
"crates/astria-grpc-mock",
"crates/astria-grpc-mock-test",
Expand All @@ -34,6 +40,8 @@ default-members = [
"crates/astria-conductor",
"crates/astria-config",
"crates/astria-core",
"crates/astria-core-address",
"crates/astria-core-consts",
"crates/astria-grpc-mock",
"crates/astria-grpc-mock-test",
"crates/astria-grpc-mock-test-codegen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use astria_core::{
Action,
TransactionBody,
},
Protobuf as _,
};
use astria_eyre::eyre::{
self,
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 crates/astria-core-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.
14 changes: 14 additions & 0 deletions crates/astria-core-address/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "astria-core-address"
version = "0.1.0"
edition = "2021"

[dependencies]
astria-core-consts = { path = "../astria-core-consts" }

thiserror = { workspace = true }

bech32 = "0.11.0"

[features]
unchecked-constructor = []
Loading
Loading