Skip to content

Commit

Permalink
Clean up sov-cli usage
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-stig committed Sep 1, 2023
1 parent 41f80a7 commit 4b963bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions examples/demo-rollup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ license = { workspace = true }
homepage = "sovereign.xyz"
publish = false
resolver = "2"
default-run = "sov-demo-rollup"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ else
endif

build-sov-cli:
cd ../demo-stf && cargo build --bin sov-cli --features=native
cargo build --bin sov-cli

test-generate-create-token-tx: check-container-running build-sov-cli
$(SOV_CLI_REL_PATH) transactions import from-file bank --path ../test-data/requests/create_token.json
Expand Down
11 changes: 4 additions & 7 deletions examples/demo-rollup/src/sov-cli/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#[cfg(feature = "native")]
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
demo_stf::cli::run::<celestia::CelestiaService::Spec>().await
}

#[cfg(not(feature = "native"))]
fn main() -> Result<(), anyhow::Error> {
Err(anyhow::format_err!("CLI support is only available when the app is compiled with the 'native' flag. You can recompile with 'cargo build --features=native' to use the CLI"))
demo_stf::cli::run::<
<celestia::CelestiaService as sov_rollup_interface::services::da::DaService>::Spec,
>()
.await
}

0 comments on commit 4b963bf

Please sign in to comment.