From 9dc81d3c54d657a41fa464b19e4c521ef485a56f Mon Sep 17 00:00:00 2001 From: sparkuss Date: Tue, 27 Jul 2021 21:06:53 +0000 Subject: [PATCH] Updating environmental version and node-testing code --- bin/node/testing/Cargo.toml | 1 + bin/node/testing/src/genesis.rs | 17 ++++++++++++++++- primitives/externalities/Cargo.toml | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 95bc8abef6fc9..07d4d763e553f 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -49,6 +49,7 @@ log = "0.4.8" tempfile = "3.1.0" fs_extra = "1" futures = "0.3.1" +hex-literal = "0.3.1" [dev-dependencies] criterion = "0.3.0" diff --git a/bin/node/testing/src/genesis.rs b/bin/node/testing/src/genesis.rs index 75d0d18e6ef81..be8d17e9fd58f 100644 --- a/bin/node/testing/src/genesis.rs +++ b/bin/node/testing/src/genesis.rs @@ -23,11 +23,12 @@ use sp_keyring::{Ed25519Keyring, Sr25519Keyring}; use node_runtime::{ GenesisConfig, BalancesConfig, SessionConfig, StakingConfig, SystemConfig, GrandpaConfig, IndicesConfig, ContractsConfig, SocietyConfig, wasm_binary_unwrap, - AccountId, StakerStatus, + AccountId, StakerStatus, DotMogModuleConfig, DotMogBaseConfig, }; use node_runtime::constants::currency::*; use sp_core::ChangesTrieConfiguration; use sp_runtime::Perbill; +use hex_literal::hex; /// Create genesis runtime configuration for tests. pub fn config(support_changes_trie: bool, code: Option<&[u8]>) -> GenesisConfig { @@ -51,6 +52,14 @@ pub fn config_endowed( (ferdie(), 100 * DOLLARS), ]; + let root_key: AccountId = hex![ + // 5Ff3iXP75ruzroPWRP2FYBHWnmGGBSb63857BgnzCoXNxfPo + "9ee5e5bdc0ec239eb164f865ecc345ce4c88e76ee002e0f7e318097347471809" + ].into(); + + let endowed_accounts: Vec = vec![root_key.clone()]; + + endowed.extend( extra_endowed.into_iter().map(|endowed| (endowed, 100*DOLLARS)) ); @@ -119,5 +128,11 @@ pub fn config_endowed( max_members: 999, }), pallet_vesting: Some(Default::default()), + pallet_dotmog: Some(DotMogModuleConfig { + key: root_key.clone(), + }), + pallet_dotmogbase: Some(DotMogBaseConfig { + key: root_key, + }), } } diff --git a/primitives/externalities/Cargo.toml b/primitives/externalities/Cargo.toml index 05de1837dc1d5..8552f50ec71be 100644 --- a/primitives/externalities/Cargo.toml +++ b/primitives/externalities/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-storage = { version = "3.0.0", path = "../storage", default-features = false } sp-std = { version = "3.0.0", path = "../std", default-features = false } -environmental = { version = "1.1.2", default-features = false } +environmental = { version = "1.1.3", default-features = false } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } [features]