Add safe_xcm_version to Genesis Specs (#743) (#904)

* Add safe_xcm_version to Genesis Specs (#743)

* add safe_xcm_version to genesis specs

* cargo +nightly fmt

* Point to xcm latest version

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
This commit is contained in:
Squirrel
2022-01-26 11:11:03 +00:00
committed by GitHub
parent a9630551c2
commit 88928d09a4
14 changed files with 34 additions and 5 deletions
+1
View File
@@ -96,3 +96,4 @@ polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "maste
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
@@ -10,6 +10,9 @@ use sp_runtime::traits::{IdentifyAccount, Verify};
pub type ChainSpec =
sc_service::GenericChainSpec<parachain_template_runtime::GenesisConfig, Extensions>;
/// The default XCM version to set in genesis config.
const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
/// Helper function to generate a crypto pair from seed
pub fn get_public_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
TPublic::Pair::from_string(&format!("//{}", seed), None)
@@ -211,5 +214,8 @@ fn testnet_genesis(
aura: Default::default(),
aura_ext: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: parachain_template_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
}
}