From ece52b485e55b4d62f76dca0ee4ea38f0504243f Mon Sep 17 00:00:00 2001 From: clearloop <26088946+clearloop@users.noreply.github.com> Date: Fri, 20 Oct 2023 07:54:39 -0500 Subject: [PATCH] chore(gcli): move vara-runtime to dev-dependencies (#3428) --- gcli/Cargo.toml | 2 +- gcli/bin/gcli.rs | 2 +- gcli/src/lib.rs | 3 +++ gcli/tests/gear.rs | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcli/Cargo.toml b/gcli/Cargo.toml index 16f0dc1850a..ba5b8806ba1 100644 --- a/gcli/Cargo.toml +++ b/gcli/Cargo.toml @@ -46,7 +46,6 @@ reqwest = { workspace = true, default-features = false, features = [ "json", "ru etc.workspace = true sp-io = { workspace = true, features = [ "std" ] } sp-core = { workspace = true, features = [ "std" ] } -vara-runtime = { workspace = true, features = [ "std", "dev" ] } [dev-dependencies] rand.workspace = true @@ -54,6 +53,7 @@ demo-messager.workspace = true demo-new-meta.workspace = true demo-waiter.workspace = true gsdk = { workspace = true, features = ["testing"] } +vara-runtime = { workspace = true, features = [ "std", "dev" ] } [build-dependencies] which.workspace = true diff --git a/gcli/bin/gcli.rs b/gcli/bin/gcli.rs index 02fa6f9385c..178aa739dea 100644 --- a/gcli/bin/gcli.rs +++ b/gcli/bin/gcli.rs @@ -23,7 +23,7 @@ use color_eyre::eyre::Result; async fn main() -> Result<()> { color_eyre::install()?; - sp_core::crypto::set_default_ss58_version(vara_runtime::SS58Prefix::get().try_into().unwrap()); + sp_core::crypto::set_default_ss58_version(gcli::VARA_SS58_PREFIX.into()); if let Err(e) = gcli::cmd::Opt::run().await { log::error!("{}", e); diff --git a/gcli/src/lib.rs b/gcli/src/lib.rs index 0617081f062..569987e692c 100644 --- a/gcli/src/lib.rs +++ b/gcli/src/lib.rs @@ -128,3 +128,6 @@ pub mod meta; pub mod result; pub mod template; pub mod utils; + +/// SS58 prefix for vara network. +pub const VARA_SS58_PREFIX: u8 = 137; diff --git a/gcli/tests/gear.rs b/gcli/tests/gear.rs index a815d2d96d5..9793fc60be5 100644 --- a/gcli/tests/gear.rs +++ b/gcli/tests/gear.rs @@ -46,3 +46,8 @@ fn paths() { } }) } + +#[test] +fn ss58_prefix() { + assert_eq!(gcli::VARA_SS58_PREFIX, vara_runtime::SS58Prefix::get()); +}