From 78576c75eabcee28706a5d7961ef7f88068d727c Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 5 Sep 2024 13:34:48 +1200 Subject: [PATCH] fix dev token name (as Talisman extracts) --- node/src/chain_spec.rs | 6 +++--- runtimes/eden/build.rs | 2 +- runtimes/eden/src/lib.rs | 15 +++------------ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 815ab0ff8d8..18d1c9aca6d 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -21,7 +21,7 @@ use cumulus_primitives_core::ParaId; -use runtime_eden::{development_config_genesis, WASM_BINARY}; +use runtime_eden::{development_config_genesis, wasm_binary_unwrap}; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use sc_service::ChainType; use serde::{Deserialize, Serialize}; @@ -49,12 +49,12 @@ impl Extensions { pub fn development_config(id: ParaId) -> ChainSpec { // Give your base currency a unit name and decimal places let mut properties = sc_chain_spec::Properties::new(); - properties.insert("tokenSymbol".into(), "devNodl".into()); + properties.insert("tokenSymbol".into(), "DevNODL".into()); properties.insert("tokenDecimals".into(), 11.into()); properties.insert("ss58Format".into(), 37.into()); ChainSpec::builder( - WASM_BINARY.expect("WASM binary was not build, please build it!"), + wasm_binary_unwrap(), Extensions { relay_chain: "rococo-local".into(), // You MUST set this to the correct network! para_id: id.into(), diff --git a/runtimes/eden/build.rs b/runtimes/eden/build.rs index 4e1e25414f1..a4ad29d5ffd 100644 --- a/runtimes/eden/build.rs +++ b/runtimes/eden/build.rs @@ -34,7 +34,7 @@ fn main() { // Since token name is different for our local/dev chain, we need to build a separate binary substrate_wasm_builder::WasmBuilder::init_with_defaults() .set_file_name("wasm_binary_dev.rs") - .enable_metadata_hash("devNodl", 11) + .enable_metadata_hash("DevNODL", 11) .build(); } diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index de4e4b53577..1a2e00ff282 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -21,20 +21,11 @@ #![recursion_limit = "256"] // Make the WASM binary available. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - #[cfg(all(feature = "std", feature = "metadata-hash"))] -pub mod wasm_binary_test { - // include wasm binary for testnet - include!(concat!(env!("OUT_DIR"), "/wasm_binary_test.rs")); -} - -#[cfg(all(feature = "std", feature = "metadata-hash"))] -pub mod wasm_binary_dev { - // include wasm binary for dev chain - include!(concat!(env!("OUT_DIR"), "/wasm_binary_dev.rs")); -} +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary_dev.rs")); /// Wasm binary unwrapped. If built with `SKIP_WASM_BUILD`, the function panics. #[cfg(feature = "std")]