GenesisBuild<T,I> deprecated. BuildGenesisConfig added (#2757)

* GenesisBuild<T,I> deprecated. BuildGenesisConfig added

* ".git/.scripts/commands/fmt/fmt.sh"

* integration-tests/emulated: ..Default::default added to genesis configs

* Cargo.lock updated

* Cargo.lock updated

* update lockfile for {"polkadot", "substrate"}

* clippy fixes

* clippy fixes

* clippy fixes again

---------

Co-authored-by: command-bot <>
This commit is contained in:
Michal Kucharczyk
2023-07-12 14:00:17 +02:00
committed by GitHub
parent f3ada7b81f
commit 94d2e4bc28
48 changed files with 511 additions and 394 deletions
+265 -263
View File
File diff suppressed because it is too large Load Diff
@@ -113,7 +113,7 @@ frame_support::construct_runtime! {
NodeBlock = ThisChainBlock, NodeBlock = ThisChainBlock,
UncheckedExtrinsic = ThisChainUncheckedExtrinsic, UncheckedExtrinsic = ThisChainUncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Utility: pallet_utility, Utility: pallet_utility,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>}, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
+1 -1
View File
@@ -380,7 +380,7 @@ pub mod pallet {
} }
#[pallet::genesis_build] #[pallet::genesis_build]
impl<T: Config<I>, I: 'static> GenesisBuild<T, I> for GenesisConfig<T, I> { impl<T: Config<I>, I: 'static> BuildGenesisConfig for GenesisConfig<T, I> {
fn build(&self) { fn build(&self) {
if let Some(ref owner) = self.owner { if let Some(ref owner) = self.owner {
<PalletOwner<T, I>>::put(owner); <PalletOwner<T, I>>::put(owner);
+1 -1
View File
@@ -48,7 +48,7 @@ construct_runtime! {
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Grandpa: grandpa::{Pallet, Call, Event<T>}, Grandpa: grandpa::{Pallet, Call, Event<T>},
} }
} }
+1 -1
View File
@@ -597,7 +597,7 @@ pub mod pallet {
} }
#[pallet::genesis_build] #[pallet::genesis_build]
impl<T: Config<I>, I: 'static> GenesisBuild<T, I> for GenesisConfig<T, I> { impl<T: Config<I>, I: 'static> BuildGenesisConfig for GenesisConfig<T, I> {
fn build(&self) { fn build(&self) {
PalletOperatingMode::<T, I>::put(self.operating_mode); PalletOperatingMode::<T, I>::put(self.operating_mode);
if let Some(ref owner) = self.owner { if let Some(ref owner) = self.owner {
+3 -3
View File
@@ -41,7 +41,7 @@ use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
testing::Header as SubstrateHeader, testing::Header as SubstrateHeader,
traits::{BlakeTwo256, ConstU32, IdentityLookup}, traits::{BlakeTwo256, ConstU32, IdentityLookup},
Perbill, BuildStorage, Perbill,
}; };
use std::{ use std::{
collections::{BTreeMap, VecDeque}, collections::{BTreeMap, VecDeque},
@@ -81,7 +81,7 @@ frame_support::construct_runtime! {
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Event<T>}, Balances: pallet_balances::{Pallet, Call, Event<T>},
Messages: pallet_bridge_messages::{Pallet, Call, Event<T>}, Messages: pallet_bridge_messages::{Pallet, Call, Event<T>},
} }
@@ -487,7 +487,7 @@ pub fn inbound_unrewarded_relayers_state(lane: bp_messages::LaneId) -> Unrewarde
/// Return test externalities to use in tests. /// Return test externalities to use in tests.
pub fn new_test_ext() -> sp_io::TestExternalities { pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<TestRuntime>().unwrap(); let mut t = frame_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
pallet_balances::GenesisConfig::<TestRuntime> { balances: vec![(ENDOWED_ACCOUNT, 1_000_000)] } pallet_balances::GenesisConfig::<TestRuntime> { balances: vec![(ENDOWED_ACCOUNT, 1_000_000)] }
.assimilate_storage(&mut t) .assimilate_storage(&mut t)
.unwrap(); .unwrap();
@@ -623,7 +623,7 @@ pub mod pallet {
} }
#[pallet::genesis_build] #[pallet::genesis_build]
impl<T: Config<I>, I: 'static> GenesisBuild<T, I> for GenesisConfig<T, I> { impl<T: Config<I>, I: 'static> BuildGenesisConfig for GenesisConfig<T, I> {
fn build(&self) { fn build(&self) {
PalletOperatingMode::<T, I>::put(self.operating_mode); PalletOperatingMode::<T, I>::put(self.operating_mode);
if let Some(ref owner) = self.owner { if let Some(ref owner) = self.owner {
@@ -149,7 +149,7 @@ construct_runtime! {
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Grandpa1: pallet_bridge_grandpa::<Instance1>::{Pallet, Event<T>}, Grandpa1: pallet_bridge_grandpa::<Instance1>::{Pallet, Event<T>},
Grandpa2: pallet_bridge_grandpa::<Instance2>::{Pallet, Event<T>}, Grandpa2: pallet_bridge_grandpa::<Instance2>::{Pallet, Event<T>},
Parachains: pallet_bridge_parachains::{Call, Pallet, Event<T>}, Parachains: pallet_bridge_parachains::{Call, Pallet, Event<T>},
+3 -2
View File
@@ -27,6 +27,7 @@ use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
testing::Header as SubstrateHeader, testing::Header as SubstrateHeader,
traits::{BlakeTwo256, ConstU32, IdentityLookup}, traits::{BlakeTwo256, ConstU32, IdentityLookup},
BuildStorage,
}; };
pub type AccountId = u64; pub type AccountId = u64;
@@ -51,7 +52,7 @@ frame_support::construct_runtime! {
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Event<T>}, Balances: pallet_balances::{Pallet, Event<T>},
Relayers: pallet_bridge_relayers::{Pallet, Call, Event<T>}, Relayers: pallet_bridge_relayers::{Pallet, Call, Event<T>},
} }
@@ -170,7 +171,7 @@ impl PaymentProcedure<AccountId, Balance> for TestPaymentProcedure {
/// Return test externalities to use in tests. /// Return test externalities to use in tests.
pub fn new_test_ext() -> sp_io::TestExternalities { pub fn new_test_ext() -> sp_io::TestExternalities {
let t = frame_system::GenesisConfig::default().build_storage::<TestRuntime>().unwrap(); let t = frame_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
sp_io::TestExternalities::new(t) sp_io::TestExternalities::new(t)
} }
+6 -3
View File
@@ -85,11 +85,14 @@ pub mod pallet {
>; >;
#[pallet::genesis_config] #[pallet::genesis_config]
#[derive(Default)] #[derive(frame_support::DefaultNoBound)]
pub struct GenesisConfig; pub struct GenesisConfig<T: Config> {
#[serde(skip)]
pub _config: sp_std::marker::PhantomData<T>,
}
#[pallet::genesis_build] #[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig { impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) { fn build(&self) {
let authorities = Aura::<T>::authorities(); let authorities = Aura::<T>::authorities();
@@ -220,7 +220,7 @@ pub mod pallet {
} }
#[pallet::genesis_build] #[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) { fn build(&self) {
let duplicate_invulnerables = self let duplicate_invulnerables = self
.invulnerables .invulnerables
@@ -17,7 +17,7 @@ use super::*;
use crate as collator_selection; use crate as collator_selection;
use frame_support::{ use frame_support::{
ord_parameter_types, parameter_types, ord_parameter_types, parameter_types,
traits::{ConstBool, ConstU32, ConstU64, FindAuthor, GenesisBuild, ValidatorRegistration}, traits::{ConstBool, ConstU32, ConstU64, FindAuthor, ValidatorRegistration},
PalletId, PalletId,
}; };
use frame_system as system; use frame_system as system;
@@ -26,7 +26,7 @@ use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
testing::{Header, UintAuthorityId}, testing::{Header, UintAuthorityId},
traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, traits::{BlakeTwo256, IdentityLookup, OpaqueKeys},
RuntimeAppPublic, BuildStorage, RuntimeAppPublic,
}; };
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
@@ -214,7 +214,7 @@ impl Config for Test {
pub fn new_test_ext() -> sp_io::TestExternalities { pub fn new_test_ext() -> sp_io::TestExternalities {
sp_tracing::try_init_simple(); sp_tracing::try_init_simple();
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap(); let mut t = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap();
let invulnerables = vec![2, 1]; // unsorted let invulnerables = vec![2, 1]; // unsorted
let balances = vec![(1, 100), (2, 100), (3, 100), (4, 100), (5, 100)]; let balances = vec![(1, 100), (2, 100), (3, 100), (4, 100), (5, 100)];
@@ -17,10 +17,10 @@ use crate as collator_selection;
use crate::{mock::*, CandidateInfo, Error}; use crate::{mock::*, CandidateInfo, Error};
use frame_support::{ use frame_support::{
assert_noop, assert_ok, assert_noop, assert_ok,
traits::{Currency, GenesisBuild, OnInitialize}, traits::{Currency, OnInitialize},
}; };
use pallet_balances::Error as BalancesError; use pallet_balances::Error as BalancesError;
use sp_runtime::{testing::UintAuthorityId, traits::BadOrigin}; use sp_runtime::{testing::UintAuthorityId, traits::BadOrigin, BuildStorage};
#[test] #[test]
fn basic_setup_works() { fn basic_setup_works() {
@@ -627,7 +627,7 @@ fn should_kick_invulnerables_from_candidates_on_session_change() {
#[should_panic = "duplicate invulnerables in genesis."] #[should_panic = "duplicate invulnerables in genesis."]
fn cannot_set_genesis_value_twice() { fn cannot_set_genesis_value_twice() {
sp_tracing::try_init_simple(); sp_tracing::try_init_simple();
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap(); let mut t = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap();
let invulnerables = vec![1, 1]; let invulnerables = vec![1, 1];
let collator_selection = collator_selection::GenesisConfig::<Test> { let collator_selection = collator_selection::GenesisConfig::<Test> {
+3 -2
View File
@@ -416,6 +416,7 @@ mod tests {
use sp_runtime::{ use sp_runtime::{
testing::Header, testing::Header,
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
BuildStorage,
DispatchError::BadOrigin, DispatchError::BadOrigin,
}; };
use sp_version::RuntimeVersion; use sp_version::RuntimeVersion;
@@ -432,7 +433,7 @@ mod tests {
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
DmpQueue: dmp_queue::{Pallet, Call, Storage, Event<T>}, DmpQueue: dmp_queue::{Pallet, Call, Storage, Event<T>},
} }
); );
@@ -542,7 +543,7 @@ mod tests {
} }
pub(crate) fn new_test_ext() -> sp_io::TestExternalities { pub(crate) fn new_test_ext() -> sp_io::TestExternalities {
frame_system::GenesisConfig::default().build_storage::<Test>().unwrap().into() frame_system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
} }
fn enqueue(enqueued: &[Xcm]) { fn enqueue(enqueued: &[Xcm]) {
+6 -3
View File
@@ -714,11 +714,14 @@ pub mod pallet {
} }
#[pallet::genesis_config] #[pallet::genesis_config]
#[derive(Default)] #[derive(frame_support::DefaultNoBound)]
pub struct GenesisConfig; pub struct GenesisConfig<T: Config> {
#[serde(skip)]
pub _config: sp_std::marker::PhantomData<T>,
}
#[pallet::genesis_build] #[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig { impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) { fn build(&self) {
// TODO: Remove after https://github.com/paritytech/cumulus/issues/479 // TODO: Remove after https://github.com/paritytech/cumulus/issues/479
sp_io::storage::set(b":c", &[]); sp_io::storage::set(b":c", &[]);
@@ -36,7 +36,7 @@ use sp_core::{blake2_256, H256};
use sp_runtime::{ use sp_runtime::{
testing::Header, testing::Header,
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
DispatchErrorWithPostInfo, BuildStorage, DispatchErrorWithPostInfo,
}; };
use sp_version::RuntimeVersion; use sp_version::RuntimeVersion;
use std::cell::RefCell; use std::cell::RefCell;
@@ -52,8 +52,8 @@ frame_support::construct_runtime!(
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
ParachainSystem: parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned}, ParachainSystem: parachain_system::{Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned},
} }
); );
@@ -181,7 +181,7 @@ fn new_test_ext() -> sp_io::TestExternalities {
HANDLED_DMP_MESSAGES.with(|m| m.borrow_mut().clear()); HANDLED_DMP_MESSAGES.with(|m| m.borrow_mut().clear());
HANDLED_XCMP_MESSAGES.with(|m| m.borrow_mut().clear()); HANDLED_XCMP_MESSAGES.with(|m| m.borrow_mut().clear());
frame_system::GenesisConfig::default().build_storage::<Test>().unwrap().into() frame_system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
} }
struct ReadRuntimeVersion(Vec<u8>); struct ReadRuntimeVersion(Vec<u8>);
+4 -3
View File
@@ -27,6 +27,7 @@ use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
testing::Header, testing::Header,
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
BuildStorage,
}; };
use xcm::prelude::*; use xcm::prelude::*;
use xcm_builder::{CurrencyAdapter, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset}; use xcm_builder::{CurrencyAdapter, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset};
@@ -42,10 +43,10 @@ frame_support::construct_runtime!(
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
}, },
XcmpQueue: xcmp_queue::{Pallet, Call, Storage, Event<T>}, XcmpQueue: xcmp_queue::{Pallet, Call, Storage, Event<T>},
} }
@@ -213,6 +214,6 @@ impl Config for Test {
} }
pub fn new_test_ext() -> sp_io::TestExternalities { pub fn new_test_ext() -> sp_io::TestExternalities {
let t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap(); let t = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap();
t.into() t.into()
} }
@@ -190,11 +190,15 @@ fn testnet_genesis(
code: parachain_template_runtime::WASM_BINARY code: parachain_template_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: parachain_template_runtime::BalancesConfig { balances: parachain_template_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
}, },
parachain_info: parachain_template_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: parachain_template_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: parachain_template_runtime::CollatorSelectionConfig { collator_selection: parachain_template_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: EXISTENTIAL_DEPOSIT * 16, candidacy_bond: EXISTENTIAL_DEPOSIT * 16,
@@ -219,6 +223,7 @@ fn testnet_genesis(
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: parachain_template_runtime::PolkadotXcmConfig { polkadot_xcm: parachain_template_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
transaction_payment: Default::default(), transaction_payment: Default::default(),
sudo: parachain_template_runtime::SudoConfig { key: Some(root) }, sudo: parachain_template_runtime::SudoConfig { key: Some(root) },
@@ -4,6 +4,7 @@ use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
testing::Header, testing::Header,
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
BuildStorage,
}; };
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
@@ -16,7 +17,7 @@ frame_support::construct_runtime!(
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
TemplateModule: crate::{Pallet, Call, Storage, Event<T>}, TemplateModule: crate::{Pallet, Call, Storage, Event<T>},
} }
); );
@@ -59,5 +60,5 @@ impl crate::Config for Test {
// Build genesis storage according to the mock runtime. // Build genesis storage according to the mock runtime.
pub fn new_test_ext() -> sp_io::TestExternalities { pub fn new_test_ext() -> sp_io::TestExternalities {
system::GenesisConfig::default().build_storage::<Test>().unwrap().into() system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
} }
+3 -3
View File
@@ -133,7 +133,7 @@ mod tests {
use sp_runtime::{ use sp_runtime::{
testing::Header, testing::Header,
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
Perbill, BuildStorage, Perbill,
}; };
use xcm::prelude::*; use xcm::prelude::*;
@@ -147,7 +147,7 @@ mod tests {
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>}, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>},
} }
@@ -245,7 +245,7 @@ mod tests {
} }
pub fn new_test_ext() -> sp_io::TestExternalities { pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap(); let mut t = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap();
// We use default for brevity, but you can configure as desired if needed. // We use default for brevity, but you can configure as desired if needed.
pallet_balances::GenesisConfig::<Test>::default() pallet_balances::GenesisConfig::<Test>::default()
.assimilate_storage(&mut t) .assimilate_storage(&mut t)
@@ -155,6 +155,7 @@ pub mod polkadot {
let genesis_config = polkadot_runtime::RuntimeGenesisConfig { let genesis_config = polkadot_runtime::RuntimeGenesisConfig {
system: polkadot_runtime::SystemConfig { system: polkadot_runtime::SystemConfig {
code: polkadot_runtime::WASM_BINARY.unwrap().to_vec(), code: polkadot_runtime::WASM_BINARY.unwrap().to_vec(),
..Default::default()
}, },
balances: polkadot_runtime::BalancesConfig { balances: polkadot_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -202,6 +203,7 @@ pub mod polkadot {
babe: polkadot_runtime::BabeConfig { babe: polkadot_runtime::BabeConfig {
authorities: Default::default(), authorities: Default::default(),
epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG),
..Default::default()
}, },
configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() }, configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() },
..Default::default() ..Default::default()
@@ -252,6 +254,7 @@ pub mod westend {
let genesis_config = westend_runtime::RuntimeGenesisConfig { let genesis_config = westend_runtime::RuntimeGenesisConfig {
system: westend_runtime::SystemConfig { system: westend_runtime::SystemConfig {
code: westend_runtime::WASM_BINARY.unwrap().to_vec(), code: westend_runtime::WASM_BINARY.unwrap().to_vec(),
..Default::default()
}, },
balances: westend_runtime::BalancesConfig { balances: westend_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -299,6 +302,7 @@ pub mod westend {
babe: westend_runtime::BabeConfig { babe: westend_runtime::BabeConfig {
authorities: Default::default(), authorities: Default::default(),
epoch_config: Some(westend_runtime::BABE_GENESIS_EPOCH_CONFIG), epoch_config: Some(westend_runtime::BABE_GENESIS_EPOCH_CONFIG),
..Default::default()
}, },
configuration: westend_runtime::ConfigurationConfig { config: get_host_config() }, configuration: westend_runtime::ConfigurationConfig { config: get_host_config() },
..Default::default() ..Default::default()
@@ -349,6 +353,7 @@ pub mod kusama {
let genesis_config = kusama_runtime::RuntimeGenesisConfig { let genesis_config = kusama_runtime::RuntimeGenesisConfig {
system: kusama_runtime::SystemConfig { system: kusama_runtime::SystemConfig {
code: kusama_runtime::WASM_BINARY.unwrap().to_vec(), code: kusama_runtime::WASM_BINARY.unwrap().to_vec(),
..Default::default()
}, },
balances: kusama_runtime::BalancesConfig { balances: kusama_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -395,6 +400,7 @@ pub mod kusama {
babe: kusama_runtime::BabeConfig { babe: kusama_runtime::BabeConfig {
authorities: Default::default(), authorities: Default::default(),
epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG),
..Default::default()
}, },
configuration: kusama_runtime::ConfigurationConfig { config: get_host_config() }, configuration: kusama_runtime::ConfigurationConfig { config: get_host_config() },
..Default::default() ..Default::default()
@@ -445,6 +451,7 @@ pub mod rococo {
let genesis_config = rococo_runtime::RuntimeGenesisConfig { let genesis_config = rococo_runtime::RuntimeGenesisConfig {
system: rococo_runtime::SystemConfig { system: rococo_runtime::SystemConfig {
code: rococo_runtime::WASM_BINARY.unwrap().to_vec(), code: rococo_runtime::WASM_BINARY.unwrap().to_vec(),
..Default::default()
}, },
balances: rococo_runtime::BalancesConfig { balances: rococo_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -476,6 +483,7 @@ pub mod rococo {
babe: rococo_runtime::BabeConfig { babe: rococo_runtime::BabeConfig {
authorities: Default::default(), authorities: Default::default(),
epoch_config: Some(rococo_runtime::BABE_GENESIS_EPOCH_CONFIG), epoch_config: Some(rococo_runtime::BABE_GENESIS_EPOCH_CONFIG),
..Default::default()
}, },
sudo: rococo_runtime::SudoConfig { sudo: rococo_runtime::SudoConfig {
key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")), key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
@@ -483,6 +491,7 @@ pub mod rococo {
configuration: rococo_runtime::ConfigurationConfig { config: get_host_config() }, configuration: rococo_runtime::ConfigurationConfig { config: get_host_config() },
registrar: rococo_runtime::RegistrarConfig { registrar: rococo_runtime::RegistrarConfig {
next_free_para_id: polkadot_primitives::LOWEST_PUBLIC_ID, next_free_para_id: polkadot_primitives::LOWEST_PUBLIC_ID,
..Default::default()
}, },
..Default::default() ..Default::default()
}; };
@@ -503,6 +512,7 @@ pub mod asset_hub_polkadot {
code: asset_hub_polkadot_runtime::WASM_BINARY code: asset_hub_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: asset_hub_polkadot_runtime::BalancesConfig { balances: asset_hub_polkadot_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -513,6 +523,7 @@ pub mod asset_hub_polkadot {
}, },
parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(), parachain_id: PARA_ID.into(),
..Default::default()
}, },
collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables_asset_hub_polkadot() invulnerables: collators::invulnerables_asset_hub_polkadot()
@@ -537,6 +548,7 @@ pub mod asset_hub_polkadot {
}, },
polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
..Default::default() ..Default::default()
}; };
@@ -557,6 +569,7 @@ pub mod asset_hub_westend {
code: asset_hub_westend_runtime::WASM_BINARY code: asset_hub_westend_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: asset_hub_westend_runtime::BalancesConfig { balances: asset_hub_westend_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -567,6 +580,7 @@ pub mod asset_hub_westend {
}, },
parachain_info: asset_hub_westend_runtime::ParachainInfoConfig { parachain_info: asset_hub_westend_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(), parachain_id: PARA_ID.into(),
..Default::default()
}, },
collator_selection: asset_hub_westend_runtime::CollatorSelectionConfig { collator_selection: asset_hub_westend_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables() invulnerables: collators::invulnerables()
@@ -591,6 +605,7 @@ pub mod asset_hub_westend {
}, },
polkadot_xcm: asset_hub_westend_runtime::PolkadotXcmConfig { polkadot_xcm: asset_hub_westend_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
..Default::default() ..Default::default()
}; };
@@ -611,6 +626,7 @@ pub mod asset_hub_kusama {
code: asset_hub_kusama_runtime::WASM_BINARY code: asset_hub_kusama_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: asset_hub_kusama_runtime::BalancesConfig { balances: asset_hub_kusama_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -621,6 +637,7 @@ pub mod asset_hub_kusama {
}, },
parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(), parachain_id: PARA_ID.into(),
..Default::default()
}, },
collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables() invulnerables: collators::invulnerables()
@@ -645,6 +662,7 @@ pub mod asset_hub_kusama {
}, },
polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
..Default::default() ..Default::default()
}; };
@@ -665,6 +683,7 @@ pub mod penpal {
code: penpal_runtime::WASM_BINARY code: penpal_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: penpal_runtime::BalancesConfig { balances: penpal_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -673,7 +692,10 @@ pub mod penpal {
.map(|k| (k, ED * 4096)) .map(|k| (k, ED * 4096))
.collect(), .collect(),
}, },
parachain_info: penpal_runtime::ParachainInfoConfig { parachain_id: para_id.into() }, parachain_info: penpal_runtime::ParachainInfoConfig {
parachain_id: para_id.into(),
..Default::default()
},
collator_selection: penpal_runtime::CollatorSelectionConfig { collator_selection: penpal_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables() invulnerables: collators::invulnerables()
.iter() .iter()
@@ -697,6 +719,7 @@ pub mod penpal {
}, },
polkadot_xcm: penpal_runtime::PolkadotXcmConfig { polkadot_xcm: penpal_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
sudo: penpal_runtime::SudoConfig { sudo: penpal_runtime::SudoConfig {
key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")), key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
@@ -720,6 +743,7 @@ pub mod collectives {
code: collectives_polkadot_runtime::WASM_BINARY code: collectives_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: collectives_polkadot_runtime::BalancesConfig { balances: collectives_polkadot_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -730,6 +754,7 @@ pub mod collectives {
}, },
parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { parachain_info: collectives_polkadot_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(), parachain_id: PARA_ID.into(),
..Default::default()
}, },
collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables() invulnerables: collators::invulnerables()
@@ -754,6 +779,7 @@ pub mod collectives {
}, },
polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
..Default::default() ..Default::default()
}; };
@@ -774,6 +800,7 @@ pub mod bridge_hub_kusama {
code: bridge_hub_kusama_runtime::WASM_BINARY code: bridge_hub_kusama_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: bridge_hub_kusama_runtime::BalancesConfig { balances: bridge_hub_kusama_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -784,6 +811,7 @@ pub mod bridge_hub_kusama {
}, },
parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(), parachain_id: PARA_ID.into(),
..Default::default()
}, },
collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables() invulnerables: collators::invulnerables()
@@ -808,6 +836,7 @@ pub mod bridge_hub_kusama {
}, },
polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
..Default::default() ..Default::default()
}; };
@@ -828,6 +857,7 @@ pub mod bridge_hub_polkadot {
code: bridge_hub_polkadot_runtime::WASM_BINARY code: bridge_hub_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: bridge_hub_polkadot_runtime::BalancesConfig { balances: bridge_hub_polkadot_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -838,6 +868,7 @@ pub mod bridge_hub_polkadot {
}, },
parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(), parachain_id: PARA_ID.into(),
..Default::default()
}, },
collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables() invulnerables: collators::invulnerables()
@@ -862,6 +893,7 @@ pub mod bridge_hub_polkadot {
}, },
polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
..Default::default() ..Default::default()
}; };
@@ -882,6 +914,7 @@ pub mod bridge_hub_rococo {
code: bridge_hub_rococo_runtime::WASM_BINARY code: bridge_hub_rococo_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: bridge_hub_rococo_runtime::BalancesConfig { balances: bridge_hub_rococo_runtime::BalancesConfig {
balances: accounts::init_balances() balances: accounts::init_balances()
@@ -892,6 +925,7 @@ pub mod bridge_hub_rococo {
}, },
parachain_info: bridge_hub_rococo_runtime::ParachainInfoConfig { parachain_info: bridge_hub_rococo_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(), parachain_id: PARA_ID.into(),
..Default::default()
}, },
collator_selection: bridge_hub_rococo_runtime::CollatorSelectionConfig { collator_selection: bridge_hub_rococo_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables() invulnerables: collators::invulnerables()
@@ -916,6 +950,7 @@ pub mod bridge_hub_rococo {
}, },
polkadot_xcm: bridge_hub_rococo_runtime::PolkadotXcmConfig { polkadot_xcm: bridge_hub_rococo_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
bridge_wococo_grandpa: bridge_hub_rococo_runtime::BridgeWococoGrandpaConfig { bridge_wococo_grandpa: bridge_hub_rococo_runtime::BridgeWococoGrandpaConfig {
owner: Some(get_account_id_from_seed::<sr25519::Public>("Alice")), owner: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
@@ -11,6 +11,9 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive"
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
cumulus-primitives-core = { path = "../../../primitives/core", default-features = false } cumulus-primitives-core = { path = "../../../primitives/core", default-features = false }
[features] [features]
@@ -39,18 +39,20 @@ pub mod pallet {
impl<T: Config> Pallet<T> {} impl<T: Config> Pallet<T> {}
#[pallet::genesis_config] #[pallet::genesis_config]
pub struct GenesisConfig { pub struct GenesisConfig<T: Config> {
#[serde(skip)]
pub _config: sp_std::marker::PhantomData<T>,
pub parachain_id: ParaId, pub parachain_id: ParaId,
} }
impl Default for GenesisConfig { impl<T: Config> Default for GenesisConfig<T> {
fn default() -> Self { fn default() -> Self {
Self { parachain_id: 100.into() } Self { parachain_id: 100.into(), _config: Default::default() }
} }
} }
#[pallet::genesis_build] #[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig { impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) { fn build(&self) {
<ParachainId<T>>::put(self.parachain_id); <ParachainId<T>>::put(self.parachain_id);
} }
@@ -742,13 +742,13 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
// RandomnessCollectiveFlip = 2 removed // RandomnessCollectiveFlip = 2 removed
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 4,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -760,11 +760,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -729,13 +729,13 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
// RandomnessCollectiveFlip = 2 removed // RandomnessCollectiveFlip = 2 removed
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 4,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -747,11 +747,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -767,13 +767,13 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
// RandomnessCollectiveFlip = 2 removed // RandomnessCollectiveFlip = 2 removed
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 4,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -786,11 +786,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -406,12 +406,12 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 3,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -422,11 +422,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -406,12 +406,12 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 3,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -422,11 +422,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -551,12 +551,12 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 3,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -567,11 +567,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -165,7 +165,7 @@ pub mod tests {
use pallet_ranked_collective::Rank; use pallet_ranked_collective::Rank;
use parachains_common::AccountId; use parachains_common::AccountId;
use sp_core::crypto::Ss58Codec; use sp_core::crypto::Ss58Codec;
use sp_runtime::AccountId32; use sp_runtime::{AccountId32, BuildStorage};
#[test] #[test]
fn check_fellowship_addresses() { fn check_fellowship_addresses() {
@@ -236,7 +236,7 @@ pub mod tests {
use super::import_kusama_fellowship::Migration; use super::import_kusama_fellowship::Migration;
use pallet_ranked_collective::{IdToIndex, IndexToId, MemberCount, MemberRecord, Members}; use pallet_ranked_collective::{IdToIndex, IndexToId, MemberCount, MemberRecord, Members};
let t = frame_system::GenesisConfig::default().build_storage::<Runtime>().unwrap(); let t = frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
let mut ext = sp_io::TestExternalities::new(t); let mut ext = sp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1)); ext.execute_with(|| System::set_block_number(1));
ext.execute_with(|| { ext.execute_with(|| {
@@ -557,12 +557,12 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 3,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -573,11 +573,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -343,13 +343,13 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip::{Pallet, Storage} = 2, RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip::{Pallet, Storage} = 2,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 4,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -360,11 +360,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -202,17 +202,17 @@ construct_runtime! {
NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>, NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 0, System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 2, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 2,
// DMP handler. // DMP handler.
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin} = 10, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin} = 10,
// The main stage. // The main stage.
Glutton: pallet_glutton::{Pallet, Call, Storage, Event, Config} = 20, Glutton: pallet_glutton::{Pallet, Call, Storage, Event, Config<T>} = 20,
// Sudo. // Sudo.
Sudo: pallet_sudo::{Pallet, Call, Storage, Event<T>, Config<T>} = 255, Sudo: pallet_sudo::{Pallet, Call, Storage, Event<T>, Config<T>} = 255,
@@ -187,13 +187,13 @@ construct_runtime! {
NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>, NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Storage, Config, Event<T>}, System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>}, Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
}, },
ParachainInfo: parachain_info::{Pallet, Storage, Config}, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>},
SoloToPara: cumulus_pallet_solo_to_para::{Pallet, Call, Storage, Event}, SoloToPara: cumulus_pallet_solo_to_para::{Pallet, Call, Storage, Event},
} }
} }
@@ -190,11 +190,11 @@ construct_runtime! {
NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>, NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Storage, Config, Event<T>}, System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
}, },
ParachainInfo: parachain_info::{Pallet, Storage, Config}, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>},
// DMP handler. // DMP handler.
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin}, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin},
@@ -22,14 +22,14 @@ use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
use frame_support::{ use frame_support::{
dispatch::{DispatchResult, RawOrigin, UnfilteredDispatchable}, dispatch::{DispatchResult, RawOrigin, UnfilteredDispatchable},
inherent::{InherentData, ProvideInherent}, inherent::{InherentData, ProvideInherent},
traits::{GenesisBuild, OriginTrait}, traits::OriginTrait,
weights::Weight, weights::Weight,
}; };
use parachains_common::AccountId; use parachains_common::AccountId;
use polkadot_parachain::primitives::{HrmpChannelId, RelayChainBlockNumber, XcmpMessageFormat}; use polkadot_parachain::primitives::{HrmpChannelId, RelayChainBlockNumber, XcmpMessageFormat};
use sp_consensus_aura::AURA_ENGINE_ID; use sp_consensus_aura::AURA_ENGINE_ID;
use sp_core::Encode; use sp_core::Encode;
use sp_runtime::{Digest, DigestItem}; use sp_runtime::{BuildStorage, Digest, DigestItem};
use xcm::{ use xcm::{
latest::{MultiAsset, MultiLocation, XcmContext, XcmHash}, latest::{MultiAsset, MultiLocation, XcmContext, XcmHash},
prelude::*, prelude::*,
@@ -161,20 +161,22 @@ impl<
pallet_collator_selection::Config + pallet_balances::Config + pallet_session::Config, pallet_collator_selection::Config + pallet_balances::Config + pallet_session::Config,
ValidatorIdOf<Runtime>: From<AccountIdOf<Runtime>>, ValidatorIdOf<Runtime>: From<AccountIdOf<Runtime>>,
{ {
let mut t = frame_system::GenesisConfig::default().build_storage::<Runtime>().unwrap(); let mut t = frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
<pallet_xcm::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage( pallet_xcm::GenesisConfig::<Runtime> {
&pallet_xcm::GenesisConfig { safe_xcm_version: self.safe_xcm_version }, safe_xcm_version: self.safe_xcm_version,
&mut t, ..Default::default()
) }
.assimilate_storage(&mut t)
.unwrap(); .unwrap();
if let Some(para_id) = self.para_id { if let Some(para_id) = self.para_id {
<parachain_info::GenesisConfig as frame_support::traits::GenesisBuild<Runtime>>::assimilate_storage( parachain_info::GenesisConfig::<Runtime> {
&parachain_info::GenesisConfig { parachain_id: para_id }, parachain_id: para_id,
&mut t, ..Default::default()
) }
.unwrap(); .assimilate_storage(&mut t)
.unwrap();
} }
pallet_balances::GenesisConfig::<Runtime> { balances: self.balances } pallet_balances::GenesisConfig::<Runtime> { balances: self.balances }
@@ -557,12 +557,12 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
// System support stuff. // System support stuff.
System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 1, } = 1,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 3,
// Monetary stuff. // Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
@@ -574,11 +574,11 @@ construct_runtime!(
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21, CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22, Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23, Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config<T>} = 24,
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 30,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config} = 31, PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 31,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event<T>, Origin} = 32,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
@@ -563,25 +563,25 @@ construct_runtime! {
NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>, NodeBlock = generic::Block<Header, sp_runtime::OpaqueExtrinsic>,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Storage, Config, Event<T>}, System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>}, Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>}, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
ParachainSystem: cumulus_pallet_parachain_system::{ ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned, Pallet, Call, Config<T>, Storage, Inherent, Event<T>, ValidateUnsigned,
} = 20, } = 20,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21, ParachainInfo: parachain_info::{Pallet, Storage, Config<T>} = 21,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30, Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
Assets: pallet_assets::{Pallet, Call, Storage, Event<T>} = 31, Assets: pallet_assets::{Pallet, Call, Storage, Event<T>} = 31,
Aura: pallet_aura::{Pallet, Config<T>}, Aura: pallet_aura::{Pallet, Config<T>},
AuraExt: cumulus_pallet_aura_ext::{Pallet, Config}, AuraExt: cumulus_pallet_aura_ext::{Pallet, Config<T>},
// XCM helpers. // XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config} = 51, PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin, Config<T>} = 51,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,
@@ -219,6 +219,7 @@ fn asset_hub_polkadot_genesis(
code: asset_hub_polkadot_runtime::WASM_BINARY code: asset_hub_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: asset_hub_polkadot_runtime::BalancesConfig { balances: asset_hub_polkadot_runtime::BalancesConfig {
balances: endowed_accounts balances: endowed_accounts
@@ -227,7 +228,10 @@ fn asset_hub_polkadot_genesis(
.map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096)) .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096))
.collect(), .collect(),
}, },
parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ASSET_HUB_POLKADOT_ED * 16, candidacy_bond: ASSET_HUB_POLKADOT_ED * 16,
@@ -252,6 +256,7 @@ fn asset_hub_polkadot_genesis(
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
} }
} }
@@ -408,6 +413,7 @@ fn asset_hub_kusama_genesis(
code: asset_hub_kusama_runtime::WASM_BINARY code: asset_hub_kusama_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: asset_hub_kusama_runtime::BalancesConfig { balances: asset_hub_kusama_runtime::BalancesConfig {
balances: endowed_accounts balances: endowed_accounts
@@ -416,7 +422,10 @@ fn asset_hub_kusama_genesis(
.map(|k| (k, ASSET_HUB_KUSAMA_ED * 524_288)) .map(|k| (k, ASSET_HUB_KUSAMA_ED * 524_288))
.collect(), .collect(),
}, },
parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ASSET_HUB_KUSAMA_ED * 16, candidacy_bond: ASSET_HUB_KUSAMA_ED * 16,
@@ -439,6 +448,7 @@ fn asset_hub_kusama_genesis(
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
} }
} }
@@ -592,6 +602,7 @@ fn asset_hub_westend_genesis(
code: asset_hub_westend_runtime::WASM_BINARY code: asset_hub_westend_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: asset_hub_westend_runtime::BalancesConfig { balances: asset_hub_westend_runtime::BalancesConfig {
balances: endowed_accounts balances: endowed_accounts
@@ -600,7 +611,10 @@ fn asset_hub_westend_genesis(
.map(|k| (k, ASSET_HUB_WESTEND_ED * 4096)) .map(|k| (k, ASSET_HUB_WESTEND_ED * 4096))
.collect(), .collect(),
}, },
parachain_info: asset_hub_westend_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: asset_hub_westend_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: asset_hub_westend_runtime::CollatorSelectionConfig { collator_selection: asset_hub_westend_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ASSET_HUB_WESTEND_ED * 16, candidacy_bond: ASSET_HUB_WESTEND_ED * 16,
@@ -625,6 +639,7 @@ fn asset_hub_westend_genesis(
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: asset_hub_westend_runtime::PolkadotXcmConfig { polkadot_xcm: asset_hub_westend_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
} }
} }
@@ -274,11 +274,15 @@ pub mod rococo {
code: bridge_hub_rococo_runtime::WASM_BINARY code: bridge_hub_rococo_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: bridge_hub_rococo_runtime::BalancesConfig { balances: bridge_hub_rococo_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
}, },
parachain_info: bridge_hub_rococo_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: bridge_hub_rococo_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: bridge_hub_rococo_runtime::CollatorSelectionConfig { collator_selection: bridge_hub_rococo_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: BRIDGE_HUB_ROCOCO_ED * 16, candidacy_bond: BRIDGE_HUB_ROCOCO_ED * 16,
@@ -301,6 +305,7 @@ pub mod rococo {
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: bridge_hub_rococo_runtime::PolkadotXcmConfig { polkadot_xcm: bridge_hub_rococo_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
bridge_wococo_grandpa: bridge_hub_rococo_runtime::BridgeWococoGrandpaConfig { bridge_wococo_grandpa: bridge_hub_rococo_runtime::BridgeWococoGrandpaConfig {
owner: bridges_pallet_owner.clone(), owner: bridges_pallet_owner.clone(),
@@ -440,6 +445,7 @@ pub mod kusama {
code: bridge_hub_kusama_runtime::WASM_BINARY code: bridge_hub_kusama_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: bridge_hub_kusama_runtime::BalancesConfig { balances: bridge_hub_kusama_runtime::BalancesConfig {
balances: endowed_accounts balances: endowed_accounts
@@ -448,7 +454,10 @@ pub mod kusama {
.map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 524_288)) .map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 524_288))
.collect(), .collect(),
}, },
parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: BRIDGE_HUB_KUSAMA_ED * 16, candidacy_bond: BRIDGE_HUB_KUSAMA_ED * 16,
@@ -471,6 +480,7 @@ pub mod kusama {
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
} }
} }
@@ -572,6 +582,7 @@ pub mod polkadot {
code: bridge_hub_polkadot_runtime::WASM_BINARY code: bridge_hub_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: bridge_hub_polkadot_runtime::BalancesConfig { balances: bridge_hub_polkadot_runtime::BalancesConfig {
balances: endowed_accounts balances: endowed_accounts
@@ -580,7 +591,10 @@ pub mod polkadot {
.map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096)) .map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096))
.collect(), .collect(),
}, },
parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: BRIDGE_HUB_POLKADOT_ED * 16, candidacy_bond: BRIDGE_HUB_POLKADOT_ED * 16,
@@ -603,6 +617,7 @@ pub mod polkadot {
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
} }
} }
@@ -138,6 +138,7 @@ fn collectives_polkadot_genesis(
code: collectives_polkadot_runtime::WASM_BINARY code: collectives_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: collectives_polkadot_runtime::BalancesConfig { balances: collectives_polkadot_runtime::BalancesConfig {
balances: endowed_accounts balances: endowed_accounts
@@ -146,7 +147,10 @@ fn collectives_polkadot_genesis(
.map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096)) .map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096))
.collect(), .collect(),
}, },
parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: collectives_polkadot_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: COLLECTIVES_POLKADOT_ED * 16, candidacy_bond: COLLECTIVES_POLKADOT_ED * 16,
@@ -171,6 +175,7 @@ fn collectives_polkadot_genesis(
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
alliance: Default::default(), alliance: Default::default(),
alliance_motion: Default::default(), alliance_motion: Default::default(),
@@ -240,11 +240,15 @@ fn contracts_rococo_genesis(
code: contracts_rococo_runtime::WASM_BINARY code: contracts_rococo_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: contracts_rococo_runtime::BalancesConfig { balances: contracts_rococo_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
}, },
parachain_info: contracts_rococo_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: contracts_rococo_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: contracts_rococo_runtime::CollatorSelectionConfig { collator_selection: contracts_rococo_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: CONTRACTS_ROCOCO_ED * 16, candidacy_bond: CONTRACTS_ROCOCO_ED * 16,
@@ -269,6 +273,7 @@ fn contracts_rococo_genesis(
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: contracts_rococo_runtime::PolkadotXcmConfig { polkadot_xcm: contracts_rococo_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
sudo: contracts_rococo_runtime::SudoConfig { sudo: contracts_rococo_runtime::SudoConfig {
key: Some( key: Some(
@@ -84,13 +84,15 @@ fn glutton_genesis(parachain_id: ParaId) -> glutton_runtime::RuntimeGenesisConfi
code: glutton_runtime::WASM_BINARY code: glutton_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
parachain_info: glutton_runtime::ParachainInfoConfig { parachain_id }, parachain_info: glutton_runtime::ParachainInfoConfig { parachain_id, ..Default::default() },
parachain_system: Default::default(), parachain_system: Default::default(),
glutton: glutton_runtime::GluttonConfig { glutton: glutton_runtime::GluttonConfig {
compute: Default::default(), compute: Default::default(),
storage: Default::default(), storage: Default::default(),
trash_data_count: Default::default(), trash_data_count: Default::default(),
..Default::default()
}, },
sudo: glutton_runtime::SudoConfig { sudo: glutton_runtime::SudoConfig {
key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")), key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
@@ -90,6 +90,7 @@ fn penpal_testnet_genesis(
code: penpal_runtime::WASM_BINARY code: penpal_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: penpal_runtime::BalancesConfig { balances: penpal_runtime::BalancesConfig {
balances: endowed_accounts balances: endowed_accounts
@@ -98,7 +99,10 @@ fn penpal_testnet_genesis(
.map(|k| (k, penpal_runtime::EXISTENTIAL_DEPOSIT * 4096)) .map(|k| (k, penpal_runtime::EXISTENTIAL_DEPOSIT * 4096))
.collect(), .collect(),
}, },
parachain_info: penpal_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: penpal_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
collator_selection: penpal_runtime::CollatorSelectionConfig { collator_selection: penpal_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: penpal_runtime::EXISTENTIAL_DEPOSIT * 16, candidacy_bond: penpal_runtime::EXISTENTIAL_DEPOSIT * 16,
@@ -123,6 +127,7 @@ fn penpal_testnet_genesis(
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: penpal_runtime::PolkadotXcmConfig { polkadot_xcm: penpal_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
sudo: penpal_runtime::SudoConfig { sudo: penpal_runtime::SudoConfig {
key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")), key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
@@ -105,17 +105,22 @@ pub(crate) fn testnet_genesis(
code: rococo_parachain_runtime::WASM_BINARY code: rococo_parachain_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
balances: rococo_parachain_runtime::BalancesConfig { balances: rococo_parachain_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
}, },
sudo: rococo_parachain_runtime::SudoConfig { key: Some(root_key) }, sudo: rococo_parachain_runtime::SudoConfig { key: Some(root_key) },
parachain_info: rococo_parachain_runtime::ParachainInfoConfig { parachain_id: id }, parachain_info: rococo_parachain_runtime::ParachainInfoConfig {
parachain_id: id,
..Default::default()
},
aura: rococo_parachain_runtime::AuraConfig { authorities: initial_authorities }, aura: rococo_parachain_runtime::AuraConfig { authorities: initial_authorities },
aura_ext: Default::default(), aura_ext: Default::default(),
parachain_system: Default::default(), parachain_system: Default::default(),
polkadot_xcm: rococo_parachain_runtime::PolkadotXcmConfig { polkadot_xcm: rococo_parachain_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION), safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
}, },
} }
} }
@@ -53,9 +53,13 @@ fn seedling_testnet_genesis(
code: seedling_runtime::WASM_BINARY code: seedling_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
sudo: seedling_runtime::SudoConfig { key: Some(root_key) }, sudo: seedling_runtime::SudoConfig { key: Some(root_key) },
parachain_info: seedling_runtime::ParachainInfoConfig { parachain_id }, parachain_info: seedling_runtime::ParachainInfoConfig {
parachain_id,
..Default::default()
},
parachain_system: Default::default(), parachain_system: Default::default(),
} }
} }
@@ -43,8 +43,9 @@ fn shell_testnet_genesis(parachain_id: ParaId) -> shell_runtime::RuntimeGenesisC
code: shell_runtime::WASM_BINARY code: shell_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
parachain_info: shell_runtime::ParachainInfoConfig { parachain_id }, parachain_info: shell_runtime::ParachainInfoConfig { parachain_id, ..Default::default() },
parachain_system: Default::default(), parachain_system: Default::default(),
} }
} }
+1
View File
@@ -143,6 +143,7 @@ pub fn testnet_genesis(
code: cumulus_test_runtime::WASM_BINARY code: cumulus_test_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!") .expect("WASM binary was not build, please build it!")
.to_vec(), .to_vec(),
..Default::default()
}, },
glutton: Default::default(), glutton: Default::default(),
parachain_system: Default::default(), parachain_system: Default::default(),