Skip to content

Commit

Permalink
chore(gcli): move vara-runtime to dev-dependencies (#3428)
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop authored Oct 20, 2023
1 parent fababeb commit ece52b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ 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
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
Expand Down
2 changes: 1 addition & 1 deletion gcli/bin/gcli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions gcli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
5 changes: 5 additions & 0 deletions gcli/tests/gear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ fn paths() {
}
})
}

#[test]
fn ss58_prefix() {
assert_eq!(gcli::VARA_SS58_PREFIX, vara_runtime::SS58Prefix::get());
}

0 comments on commit ece52b4

Please sign in to comment.