Skip to content

Commit

Permalink
fix: change GenesisConfig -> RuntimeGenesisConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
nakul1010 committed Aug 1, 2023
1 parent b6b642c commit adc9e76
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 49 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions parachain/runtime/runtime-tests/src/relaychain/kusama_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ pub fn kusama_ext() -> sp_io::TestExternalities {
use kusama_runtime::{Runtime, System};
use polkadot_parachain::primitives::{HeadData, ValidationCode};

let mut t = frame_system::GenesisConfig::default()
let mut t = frame_system::RuntimeGenesisConfig::default()
.build_storage::<Runtime>()
.unwrap();

pallet_balances::GenesisConfig::<Runtime> {
pallet_balances::RuntimeGenesisConfig::<Runtime> {
balances: vec![
(AccountId::from(ALICE), 2002 * KSM.one()),
// (ParaId::from(KINTSUGI_PARA_ID).into_account_truncating(), 2 * KSM.one()),
Expand All @@ -113,8 +113,8 @@ pub fn kusama_ext() -> sp_io::TestExternalities {
para_kind: ParaKind::Parachain,
validation_code: ValidationCode(vec![0]),
};
<polkadot_runtime_parachains::paras::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&polkadot_runtime_parachains::paras::GenesisConfig {
<polkadot_runtime_parachains::paras::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&polkadot_runtime_parachains::paras::RuntimeGenesisConfig {
paras: vec![
(KINTSUGI_PARA_ID.into(), fake_para.clone()),
(SIBLING_PARA_ID.into(), fake_para.clone()),
Expand All @@ -124,14 +124,14 @@ pub fn kusama_ext() -> sp_io::TestExternalities {
)
.unwrap();

polkadot_runtime_parachains::configuration::GenesisConfig::<Runtime> {
polkadot_runtime_parachains::configuration::RuntimeGenesisConfig::<Runtime> {
config: default_parachains_host_configuration(),
}
.assimilate_storage(&mut t)
.unwrap();

<pallet_xcm::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::GenesisConfig {
<pallet_xcm::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::RuntimeGenesisConfig {
safe_xcm_version: Some(3),
},
&mut t,
Expand Down Expand Up @@ -187,13 +187,13 @@ impl ExtBuilder {
}

pub fn build(self) -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default()
let mut t = frame_system::RuntimeGenesisConfig::default()
.build_storage::<Runtime>()
.unwrap();

let native_currency_id = GetNativeCurrencyId::get();

orml_tokens::GenesisConfig::<Runtime> {
orml_tokens::RuntimeGenesisConfig::<Runtime> {
balances: self
.balances
.into_iter()
Expand All @@ -203,16 +203,16 @@ impl ExtBuilder {
.assimilate_storage(&mut t)
.unwrap();

<parachain_info::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&parachain_info::GenesisConfig {
<parachain_info::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&parachain_info::RuntimeGenesisConfig {
parachain_id: self.parachain_id.into(),
},
&mut t,
)
.unwrap();

<pallet_xcm::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::GenesisConfig {
<pallet_xcm::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::RuntimeGenesisConfig {
safe_xcm_version: Some(2), // NOTE! if this was required for tests we may need it on mainnet
},
&mut t,
Expand Down
26 changes: 13 additions & 13 deletions parachain/runtime/runtime-tests/src/relaychain/polkadot_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ pub fn polkadot_ext() -> sp_io::TestExternalities {
use polkadot_parachain::primitives::{HeadData, ValidationCode};
use polkadot_runtime::{Runtime, System};

let mut t = frame_system::GenesisConfig::default()
let mut t = frame_system::RuntimeGenesisConfig::default()
.build_storage::<Runtime>()
.unwrap();

pallet_balances::GenesisConfig::<Runtime> {
pallet_balances::RuntimeGenesisConfig::<Runtime> {
balances: vec![(AccountId::from(ALICE), 100_000_000 * DOT.one())],
}
.assimilate_storage(&mut t)
Expand All @@ -119,8 +119,8 @@ pub fn polkadot_ext() -> sp_io::TestExternalities {
para_kind: ParaKind::Parachain,
validation_code: ValidationCode(vec![0]),
};
<polkadot_runtime_parachains::paras::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&polkadot_runtime_parachains::paras::GenesisConfig {
<polkadot_runtime_parachains::paras::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&polkadot_runtime_parachains::paras::RuntimeGenesisConfig {
paras: vec![
(INTERLAY_PARA_ID.into(), fake_para.clone()),
(SIBLING_PARA_ID.into(), fake_para.clone()),
Expand All @@ -130,14 +130,14 @@ pub fn polkadot_ext() -> sp_io::TestExternalities {
)
.unwrap();

polkadot_runtime_parachains::configuration::GenesisConfig::<Runtime> {
polkadot_runtime_parachains::configuration::RuntimeGenesisConfig::<Runtime> {
config: default_parachains_host_configuration(),
}
.assimilate_storage(&mut t)
.unwrap();

<pallet_xcm::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::GenesisConfig {
<pallet_xcm::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::RuntimeGenesisConfig {
safe_xcm_version: Some(3),
},
&mut t,
Expand Down Expand Up @@ -190,13 +190,13 @@ impl ExtBuilder {
}

pub fn build(self) -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default()
let mut t = frame_system::RuntimeGenesisConfig::default()
.build_storage::<Runtime>()
.unwrap();

let native_currency_id = GetNativeCurrencyId::get();

orml_tokens::GenesisConfig::<Runtime> {
orml_tokens::RuntimeGenesisConfig::<Runtime> {
balances: self
.balances
.into_iter()
Expand All @@ -206,16 +206,16 @@ impl ExtBuilder {
.assimilate_storage(&mut t)
.unwrap();

<parachain_info::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&parachain_info::GenesisConfig {
<parachain_info::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&parachain_info::RuntimeGenesisConfig {
parachain_id: self.parachain_id.into(),
},
&mut t,
)
.unwrap();

<pallet_xcm::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::GenesisConfig {
<pallet_xcm::RuntimeGenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
&pallet_xcm::RuntimeGenesisConfig {
safe_xcm_version: Some(2),
},
&mut t,
Expand Down
8 changes: 4 additions & 4 deletions parachain/src/chain_spec/interlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use super::*;
pub const PARA_ID: u32 = 2032;

/// Specialized `ChainSpec` for the interlay parachain runtime.
pub type InterlayChainSpec = sc_service::GenericChainSpec<interlay_runtime::GenesisConfig, Extensions>;
pub type InterlayChainSpec = sc_service::GenericChainSpec<interlay_runtime::RuntimeGenesisConfig, Extensions>;

/// Specialized `ChainSpec` for interlay development.
pub type InterlayDevChainSpec = sc_service::GenericChainSpec<InterlayDevGenesisExt, Extensions>;
Expand All @@ -12,7 +12,7 @@ pub type InterlayDevChainSpec = sc_service::GenericChainSpec<InterlayDevGenesisE
#[derive(Serialize, Deserialize)]
pub struct InterlayDevGenesisExt {
/// Genesis config.
pub(crate) genesis_config: interlay_runtime::GenesisConfig,
pub(crate) genesis_config: interlay_runtime::RuntimeGenesisConfig,
/// The flag to enable instant-seal mode.
pub(crate) enable_instant_seal: bool,
/// The flag to enable EVM contract creation.
Expand Down Expand Up @@ -165,14 +165,14 @@ pub fn interlay_genesis(
id: ParaId,
bitcoin_confirmations: u32,
disable_difficulty_check: bool,
) -> interlay_runtime::GenesisConfig {
) -> interlay_runtime::RuntimeGenesisConfig {
let chain_id: u32 = id.into();
endowed_accounts.extend(
endowed_evm_accounts
.into_iter()
.map(|addr| interlay_runtime::evm::AccountConverter::into_account_id(H160::from(addr))),
);
interlay_runtime::GenesisConfig {
interlay_runtime::RuntimeGenesisConfig {
system: interlay_runtime::SystemConfig {
code: interlay_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
Expand Down
8 changes: 4 additions & 4 deletions parachain/src/chain_spec/kintsugi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use super::*;
pub const PARA_ID: u32 = 2092;

/// Specialized `ChainSpec` for the kintsugi parachain runtime.
pub type KintsugiChainSpec = sc_service::GenericChainSpec<kintsugi_runtime::GenesisConfig, Extensions>;
pub type KintsugiChainSpec = sc_service::GenericChainSpec<kintsugi_runtime::RuntimeGenesisConfig, Extensions>;

/// Specialized `ChainSpec` for kintsugi development.
pub type KintsugiDevChainSpec = sc_service::GenericChainSpec<KintsugiDevGenesisExt, Extensions>;
Expand All @@ -12,7 +12,7 @@ pub type KintsugiDevChainSpec = sc_service::GenericChainSpec<KintsugiDevGenesisE
#[derive(Serialize, Deserialize)]
pub struct KintsugiDevGenesisExt {
/// Genesis config.
pub(crate) genesis_config: kintsugi_runtime::GenesisConfig,
pub(crate) genesis_config: kintsugi_runtime::RuntimeGenesisConfig,
/// The flag to enable instant-seal mode.
pub(crate) enable_instant_seal: bool,
/// The flag to enable EVM contract creation.
Expand Down Expand Up @@ -169,14 +169,14 @@ pub fn kintsugi_genesis(
id: ParaId,
bitcoin_confirmations: u32,
disable_difficulty_check: bool,
) -> kintsugi_runtime::GenesisConfig {
) -> kintsugi_runtime::RuntimeGenesisConfig {
let chain_id: u32 = id.into();
endowed_accounts.extend(
endowed_evm_accounts
.into_iter()
.map(|addr| kintsugi_runtime::evm::AccountConverter::into_account_id(H160::from(addr))),
);
kintsugi_runtime::GenesisConfig {
kintsugi_runtime::RuntimeGenesisConfig {
system: kintsugi_runtime::SystemConfig {
code: kintsugi_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
Expand Down

0 comments on commit adc9e76

Please sign in to comment.