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
@@ -84,6 +84,7 @@ polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch =
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "master" }
[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -89,6 +89,7 @@ std = [
"pallet-sudo/std",
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-xcm/std",
"parachain-info/std",
"parachains-common/std",
"cumulus-pallet-aura-ext/std",
@@ -531,7 +531,7 @@ construct_runtime! {
// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config} = 51,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,
+15
View File
@@ -34,6 +34,9 @@ pub type ShellChainSpec = sc_service::GenericChainSpec<shell_runtime::GenesisCon
pub type SeedlingChainSpec =
sc_service::GenericChainSpec<seedling_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_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
TPublic::Pair::from_string(&format!("//{}", seed), None)
@@ -189,6 +192,9 @@ fn testnet_genesis(
aura: rococo_parachain_runtime::AuraConfig { authorities: initial_authorities },
aura_ext: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: rococo_parachain_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
}
}
@@ -454,6 +460,9 @@ fn statemint_genesis(
aura: Default::default(),
aura_ext: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: statemint_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
}
}
@@ -638,6 +647,9 @@ fn statemine_genesis(
aura: Default::default(),
aura_ext: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: statemine_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
}
}
@@ -817,5 +829,8 @@ fn westmint_genesis(
aura: Default::default(),
aura_ext: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: westmint_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
}
}
+1
View File
@@ -141,6 +141,7 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-uniques/std",
"pallet-utility/std",
"pallet-xcm/std",
"parachain-info/std",
"cumulus-pallet-aura-ext/std",
"pallet-asset-tx-payment/std",
+1 -1
View File
@@ -737,7 +737,7 @@ construct_runtime!(
// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin} = 31,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
+1
View File
@@ -141,6 +141,7 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-uniques/std",
"pallet-utility/std",
"pallet-xcm/std",
"parachain-info/std",
"cumulus-pallet-aura-ext/std",
"pallet-asset-tx-payment/std",
+1 -1
View File
@@ -750,7 +750,7 @@ construct_runtime!(
// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin} = 31,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
+1
View File
@@ -139,6 +139,7 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-uniques/std",
"pallet-utility/std",
"pallet-xcm/std",
"parachain-info/std",
"cumulus-pallet-aura-ext/std",
"pallet-asset-tx-payment/std",
+1 -1
View File
@@ -722,7 +722,7 @@ construct_runtime!(
// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin} = 31,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,