diff --git a/Cargo.lock b/Cargo.lock index 5811d7ad3b1..bcc539aa04d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4104,6 +4104,7 @@ dependencies = [ "sc-service", "sc-telemetry", "sc-transaction-pool", + "serde_json", "sp-consensus", "sp-consensus-aura", "sp-core", @@ -6057,6 +6058,7 @@ dependencies = [ "sc-service", "sc-telemetry", "sc-transaction-pool", + "serde_json", "sp-consensus", "sp-consensus-aura", "sp-core", diff --git a/bin/millau/node/Cargo.toml b/bin/millau/node/Cargo.toml index e31e2c871a5..cbcb2e710c0 100644 --- a/bin/millau/node/Cargo.toml +++ b/bin/millau/node/Cargo.toml @@ -12,6 +12,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] jsonrpc-core = "15.1.0" structopt = "0.3.21" +serde_json = "1.0.59" # Bridge dependencies diff --git a/bin/millau/node/src/chain_spec.rs b/bin/millau/node/src/chain_spec.rs index f9e9502da72..340b8fd9dff 100644 --- a/bin/millau/node/src/chain_spec.rs +++ b/bin/millau/node/src/chain_spec.rs @@ -67,6 +67,15 @@ pub fn get_authority_keys_from_seed(s: &str) -> (AccountId, AuraId, GrandpaId) { impl Alternative { /// Get an actual chain config from one of the alternatives. pub(crate) fn load(self) -> ChainSpec { + let properties = Some( + serde_json::json!({ + "tokenDecimals": 9, + "tokenSymbol": "MLAU", + }) + .as_object() + .expect("Map given; qed") + .clone(), + ); match self { Alternative::Development => ChainSpec::from_genesis( "Development", @@ -88,7 +97,7 @@ impl Alternative { vec![], None, None, - None, + properties, None, ), Alternative::LocalTestnet => ChainSpec::from_genesis( @@ -136,7 +145,7 @@ impl Alternative { vec![], None, None, - None, + properties, None, ), } diff --git a/bin/rialto/node/Cargo.toml b/bin/rialto/node/Cargo.toml index a51ee7a5ab5..370985d8ae6 100644 --- a/bin/rialto/node/Cargo.toml +++ b/bin/rialto/node/Cargo.toml @@ -12,6 +12,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] jsonrpc-core = "15.1.0" structopt = "0.3.21" +serde_json = "1.0.59" # Bridge dependencies diff --git a/bin/rialto/node/src/chain_spec.rs b/bin/rialto/node/src/chain_spec.rs index 732cf1a4b13..fb6dc92bf6d 100644 --- a/bin/rialto/node/src/chain_spec.rs +++ b/bin/rialto/node/src/chain_spec.rs @@ -19,6 +19,7 @@ use rialto_runtime::{ AccountId, AuraConfig, BalancesConfig, BridgeKovanConfig, BridgeRialtoPoAConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY, }; +use serde_json::json; use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{sr25519, Pair, Public}; use sp_finality_grandpa::AuthorityId as GrandpaId; @@ -67,6 +68,15 @@ pub fn get_authority_keys_from_seed(s: &str) -> (AccountId, AuraId, GrandpaId) { impl Alternative { /// Get an actual chain config from one of the alternatives. pub(crate) fn load(self) -> ChainSpec { + let properties = Some( + json!({ + "tokenDecimals": 9, + "tokenSymbol": "RLT", + }) + .as_object() + .expect("Map given; qed") + .clone(), + ); match self { Alternative::Development => ChainSpec::from_genesis( "Development", @@ -88,7 +98,7 @@ impl Alternative { vec![], None, None, - None, + properties, None, ), Alternative::LocalTestnet => ChainSpec::from_genesis( @@ -136,7 +146,7 @@ impl Alternative { vec![], None, None, - None, + properties, None, ), }