Skip to content

Commit

Permalink
fix dev token name (as Talisman extracts)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliXsed committed Sep 5, 2024
1 parent 5471900 commit 78576c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
6 changes: 3 additions & 3 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion runtimes/eden/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
15 changes: 3 additions & 12 deletions runtimes/eden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 78576c7

Please sign in to comment.