feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent e4778b4576
commit 379cb741ed
9082 changed files with 997824 additions and 997542 deletions
@@ -0,0 +1,43 @@
[package]
name = "pezkuwichain-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Pezkuwichain emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezsc-consensus-grandpa = { workspace = true }
pezsp-authority-discovery = { workspace = true }
pezsp-consensus-babe = { workspace = true }
pezsp-consensus-beefy = { workspace = true, default-features = true }
pezsp-core = { workspace = true }
pezsp-keyring = { workspace = true }
# Pezkuwi
pezkuwi-primitives = { workspace = true }
pezkuwichain-runtime = { workspace = true }
pezkuwichain-runtime-constants = { workspace = true }
# Pezcumulus
emulated-integration-tests-common = { workspace = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"emulated-integration-tests-common/runtime-benchmarks",
"pezkuwi-primitives/runtime-benchmarks",
"pezkuwichain-runtime-constants/runtime-benchmarks",
"pezkuwichain-runtime/runtime-benchmarks",
"pezsc-consensus-grandpa/runtime-benchmarks",
"pezsp-authority-discovery/runtime-benchmarks",
"pezsp-consensus-babe/runtime-benchmarks",
"pezsp-consensus-beefy/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
]
@@ -0,0 +1,97 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsc_consensus_grandpa::AuthorityId as GrandpaId;
use pezsp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use pezsp_consensus_babe::AuthorityId as BabeId;
use pezsp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId;
use pezsp_core::storage::Storage;
use pezsp_keyring::Sr25519Keyring as Keyring;
// Pezkuwi
use pezkuwi_primitives::{AssignmentId, ValidatorId};
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, get_host_config, validators,
};
use pezkuwichain_runtime_constants::currency::UNITS as TYR;
use teyrchains_common::Balance;
pub const ED: Balance = pezkuwichain_runtime_constants::currency::EXISTENTIAL_DEPOSIT;
const ENDOWMENT: u128 = 1_000_000 * TYR;
fn session_keys(
babe: BabeId,
grandpa: GrandpaId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
beefy: BeefyId,
) -> pezkuwichain_runtime::SessionKeys {
pezkuwichain_runtime::SessionKeys {
babe,
grandpa,
para_validator,
para_assignment,
authority_discovery,
beefy,
}
}
pub fn genesis() -> Storage {
let genesis_config = pezkuwichain_runtime::RuntimeGenesisConfig {
system: pezkuwichain_runtime::SystemConfig::default(),
balances: pezkuwichain_runtime::BalancesConfig {
balances: accounts::init_balances().iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
..Default::default()
},
session: pezkuwichain_runtime::SessionConfig {
keys: validators::initial_authorities()
.iter()
.map(|x| {
(
x.0.clone(),
x.0.clone(),
session_keys(
x.2.clone(),
x.3.clone(),
x.4.clone(),
x.5.clone(),
x.6.clone(),
x.7.clone(),
),
)
})
.collect::<Vec<_>>(),
..Default::default()
},
babe: pezkuwichain_runtime::BabeConfig {
authorities: Default::default(),
epoch_config: pezkuwichain_runtime::BABE_GENESIS_EPOCH_CONFIG,
..Default::default()
},
sudo: pezkuwichain_runtime::SudoConfig { key: Some(Keyring::Alice.to_account_id()) },
configuration: pezkuwichain_runtime::ConfigurationConfig { config: get_host_config() },
registrar: pezkuwichain_runtime::RegistrarConfig {
next_free_para_id: pezkuwi_primitives::LOWEST_PUBLIC_ID,
..Default::default()
},
..Default::default()
};
build_genesis_storage(&genesis_config, pezkuwichain_runtime::WASM_BINARY.unwrap())
}
@@ -0,0 +1,49 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use pezkuwichain_runtime;
pub mod genesis;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_relay_chain, impl_assert_events_helpers_for_relay_chain,
impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain,
xcm_emulator::decl_test_relay_chains,
};
// Pezkuwichain declaration
decl_test_relay_chains! {
#[api_version(15)]
pub struct Pezkuwichain {
genesis = genesis::genesis(),
on_init = (),
runtime = pezkuwichain_runtime,
core = {
SovereignAccountOf: pezkuwichain_runtime::xcm_config::LocationConverter,
},
pallets = {
XcmPallet: pezkuwichain_runtime::XcmPallet,
Sudo: pezkuwichain_runtime::Sudo,
Balances: pezkuwichain_runtime::Balances,
Hrmp: pezkuwichain_runtime::Hrmp,
}
},
}
// Pezkuwichain implementation
impl_accounts_helpers_for_relay_chain!(Pezkuwichain);
impl_assert_events_helpers_for_relay_chain!(Pezkuwichain);
impl_hrmp_channels_helpers_for_relay_chain!(Pezkuwichain);
impl_send_transact_helpers_for_relay_chain!(Pezkuwichain);
@@ -0,0 +1,45 @@
[package]
name = "zagros-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Zagros emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezpallet-staking = { workspace = true }
pezsc-consensus-grandpa = { workspace = true }
pezsp-authority-discovery = { workspace = true }
pezsp-consensus-babe = { workspace = true }
pezsp-consensus-beefy = { workspace = true, default-features = true }
pezsp-core = { workspace = true }
pezsp-runtime = { workspace = true }
# Pezkuwi
pezkuwi-primitives = { workspace = true }
zagros-runtime = { workspace = true, default-features = true }
zagros-runtime-constants = { workspace = true }
# Pezcumulus
emulated-integration-tests-common = { workspace = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"emulated-integration-tests-common/runtime-benchmarks",
"pezpallet-staking/runtime-benchmarks",
"pezkuwi-primitives/runtime-benchmarks",
"pezsc-consensus-grandpa/runtime-benchmarks",
"pezsp-authority-discovery/runtime-benchmarks",
"pezsp-consensus-babe/runtime-benchmarks",
"pezsp-consensus-beefy/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"zagros-runtime-constants/runtime-benchmarks",
"zagros-runtime/runtime-benchmarks",
]
@@ -0,0 +1,91 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsc_consensus_grandpa::AuthorityId as GrandpaId;
use pezsp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use pezsp_consensus_babe::AuthorityId as BabeId;
use pezsp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId;
use pezsp_core::storage::Storage;
// Pezkuwi
use pezkuwi_primitives::{AssignmentId, ValidatorId};
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, get_host_config, validators,
};
use teyrchains_common::Balance;
use zagros_runtime_constants::currency::UNITS as ZGR;
pub const ED: Balance = zagros_runtime_constants::currency::EXISTENTIAL_DEPOSIT;
const ENDOWMENT: u128 = 1_000_000 * ZGR;
fn session_keys(
babe: BabeId,
grandpa: GrandpaId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
beefy: BeefyId,
) -> zagros_runtime::SessionKeys {
zagros_runtime::SessionKeys {
babe,
grandpa,
para_validator,
para_assignment,
authority_discovery,
beefy,
}
}
pub fn genesis() -> Storage {
let genesis_config = zagros_runtime::RuntimeGenesisConfig {
system: zagros_runtime::SystemConfig::default(),
balances: zagros_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ENDOWMENT)).collect(),
..Default::default()
},
session: zagros_runtime::SessionConfig {
keys: validators::initial_authorities()
.iter()
.map(|x| {
(
x.0.clone(),
x.0.clone(),
session_keys(
x.2.clone(),
x.3.clone(),
x.4.clone(),
x.5.clone(),
x.6.clone(),
x.7.clone(),
),
)
})
.collect::<Vec<_>>(),
..Default::default()
},
babe: zagros_runtime::BabeConfig {
authorities: Default::default(),
epoch_config: zagros_runtime::BABE_GENESIS_EPOCH_CONFIG,
..Default::default()
},
configuration: zagros_runtime::ConfigurationConfig { config: get_host_config() },
..Default::default()
};
build_genesis_storage(&genesis_config, zagros_runtime::WASM_BINARY.unwrap())
}
@@ -0,0 +1,53 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use zagros_runtime;
pub mod genesis;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_relay_chain, impl_assert_events_helpers_for_relay_chain,
impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain,
xcm_emulator::decl_test_relay_chains,
};
// Zagros declaration
decl_test_relay_chains! {
#[api_version(15)]
pub struct Zagros {
genesis = genesis::genesis(),
on_init = (),
runtime = zagros_runtime,
core = {
SovereignAccountOf: zagros_runtime::xcm_config::LocationConverter,
},
pallets = {
XcmPallet: zagros_runtime::XcmPallet,
Sudo: zagros_runtime::Sudo,
Balances: zagros_runtime::Balances,
Treasury: zagros_runtime::Treasury,
AssetRate: zagros_runtime::AssetRate,
Hrmp: zagros_runtime::Hrmp,
Identity: zagros_runtime::Identity,
IdentityMigrator: zagros_runtime::IdentityMigrator,
}
},
}
// Zagros implementation
impl_accounts_helpers_for_relay_chain!(Zagros);
impl_assert_events_helpers_for_relay_chain!(Zagros);
impl_hrmp_channels_helpers_for_relay_chain!(Zagros);
impl_send_transact_helpers_for_relay_chain!(Zagros);
@@ -0,0 +1,49 @@
[package]
name = "asset-hub-pezkuwichain-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Asset Hub Pezkuwichain emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
pezsp-keyring = { workspace = true }
# Pezcumulus
asset-hub-pezkuwichain-runtime = { workspace = true, default-features = true }
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
pezkuwichain-emulated-chain = { workspace = true }
testnet-teyrchains-constants = { features = [
"pezkuwichain",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
# Pezkuwi
xcm = { workspace = true }
xcm-builder = { workspace = true, default-features = true }
# Bridges
bp-bridge-hub-pezkuwichain = { workspace = true }
[features]
runtime-benchmarks = [
"asset-hub-pezkuwichain-runtime/runtime-benchmarks",
"bp-bridge-hub-pezkuwichain/runtime-benchmarks",
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezkuwichain-emulated-chain/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm/runtime-benchmarks",
]
@@ -0,0 +1,170 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezframe_support::parameter_types;
use pezsp_core::storage::Storage;
use pezsp_keyring::Sr25519Keyring as Keyring;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators,
snowbridge::{ETHER_MIN_BALANCE, WETH},
xcm_emulator::ConvertLocation,
PenpalALocation, PenpalASiblingSovereignAccount, PenpalATeleportableAssetLocation,
PenpalBLocation, PenpalBSiblingSovereignAccount, PenpalBTeleportableAssetLocation,
RESERVABLE_ASSET_ID, SAFE_XCM_VERSION, USDT_ID,
};
use testnet_teyrchains_constants::pezkuwichain::snowbridge::EthereumNetwork;
use teyrchains_common::{AccountId, Balance};
use xcm::{
latest::prelude::*,
opaque::latest::{PEZKUWICHAIN_GENESIS_HASH, ZAGROS_GENESIS_HASH},
};
use xcm_builder::ExternalConsensusLocationsConverterFor;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = testnet_teyrchains_constants::pezkuwichain::currency::EXISTENTIAL_DEPOSIT;
parameter_types! {
pub AssetHubPezkuwichainAssetOwner: AccountId = Keyring::Alice.to_account_id();
pub PezkuwichainGlobalConsensusNetwork: NetworkId = NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH);
pub AssetHubPezkuwichainUniversalLocation: InteriorLocation = [GlobalConsensus(PezkuwichainGlobalConsensusNetwork::get()), Teyrchain(PARA_ID)].into();
pub AssetHubZagrosLocation: Location = Location::new(
2,
[GlobalConsensus( NetworkId::ByGenesis(ZAGROS_GENESIS_HASH)), Teyrchain(PARA_ID)],
);
pub AssetHubZagrosSovereignAccount: AccountId = ExternalConsensusLocationsConverterFor::<
AssetHubPezkuwichainUniversalLocation,
AccountId,
>::convert_location(&AssetHubZagrosLocation::get()).unwrap();
pub EthereumLocation: Location = Location::new(2, [GlobalConsensus(EthereumNetwork::get())]);
}
pub fn genesis() -> Storage {
let genesis_config = asset_hub_pezkuwichain_runtime::RuntimeGenesisConfig {
system: asset_hub_pezkuwichain_runtime::SystemConfig::default(),
balances: asset_hub_pezkuwichain_runtime::BalancesConfig {
balances: accounts::init_balances()
.iter()
.cloned()
.map(|k| (k, ED * 4096 * 4096))
.collect(),
..Default::default()
},
teyrchain_info: asset_hub_pezkuwichain_runtime::TeyrchainInfoConfig {
teyrchain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: asset_hub_pezkuwichain_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: asset_hub_pezkuwichain_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
asset_hub_pezkuwichain_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: asset_hub_pezkuwichain_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
assets: asset_hub_pezkuwichain_runtime::AssetsConfig {
assets: vec![
(RESERVABLE_ASSET_ID, AssetHubPezkuwichainAssetOwner::get(), false, ED),
(USDT_ID, AssetHubPezkuwichainAssetOwner::get(), true, ED),
],
..Default::default()
},
foreign_assets: asset_hub_pezkuwichain_runtime::ForeignAssetsConfig {
assets: vec![
// PenpalA's teleportable asset representation
(
PenpalATeleportableAssetLocation::get(),
PenpalASiblingSovereignAccount::get(),
false,
ED,
),
// PenpalB's teleportable asset representation
(
PenpalBTeleportableAssetLocation::get(),
PenpalBSiblingSovereignAccount::get(),
false,
ED,
),
// Ether
(
EthereumLocation::get(),
AssetHubZagrosSovereignAccount::get(), /* To emulate double bridging, where
* WAH is the owner of assets from
* Ethereum on RAH */
true,
ETHER_MIN_BALANCE,
),
// Weth
(
Location::new(
2,
[
GlobalConsensus(EthereumNetwork::get()),
AccountKey20 { network: None, key: WETH.into() },
],
),
AssetHubZagrosSovereignAccount::get(),
true,
ETHER_MIN_BALANCE,
),
],
reserves: vec![
(
PenpalATeleportableAssetLocation::get(),
vec![(PenpalALocation::get(), true).into()],
),
(
PenpalBTeleportableAssetLocation::get(),
vec![(PenpalBLocation::get(), true).into()],
),
(EthereumLocation::get(), vec![(AssetHubZagrosLocation::get(), false).into()]),
(
Location::new(
2,
[
GlobalConsensus(EthereumNetwork::get()),
AccountKey20 { network: None, key: WETH.into() },
],
),
vec![(AssetHubZagrosLocation::get(), false).into()],
),
],
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
asset_hub_pezkuwichain_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,77 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use asset_hub_pezkuwichain_runtime;
pub mod genesis;
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use asset_hub_pezkuwichain_runtime::ForeignAssetReserveData;
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impl_assets_helpers_for_system_teyrchain, impl_assets_helpers_for_teyrchain,
impl_bridge_helpers_for_chain, impl_foreign_assets_helpers_for_teyrchain,
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_emulator::decl_test_teyrchains,
AuraDigestProvider,
};
use pezkuwichain_emulated_chain::Pezkuwichain;
// AssetHubPezkuwichain Teyrchain declaration
decl_test_teyrchains! {
pub struct AssetHubPezkuwichain {
genesis = genesis::genesis(),
on_init = {
asset_hub_pezkuwichain_runtime::AuraExt::on_initialize(1);
},
runtime = asset_hub_pezkuwichain_runtime,
core = {
XcmpMessageHandler: asset_hub_pezkuwichain_runtime::XcmpQueue,
LocationToAccountId: asset_hub_pezkuwichain_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: asset_hub_pezkuwichain_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
AdditionalInherentCode: (),
},
pallets = {
PezkuwiXcm: asset_hub_pezkuwichain_runtime::PezkuwiXcm,
Assets: asset_hub_pezkuwichain_runtime::Assets,
ForeignAssets: asset_hub_pezkuwichain_runtime::ForeignAssets,
PoolAssets: asset_hub_pezkuwichain_runtime::PoolAssets,
AssetConversion: asset_hub_pezkuwichain_runtime::AssetConversion,
Balances: asset_hub_pezkuwichain_runtime::Balances,
}
},
}
// AssetHubPezkuwichain implementation
impl_accounts_helpers_for_teyrchain!(AssetHubPezkuwichain);
impl_assert_events_helpers_for_teyrchain!(AssetHubPezkuwichain);
impl_assets_helpers_for_system_teyrchain!(AssetHubPezkuwichain, Pezkuwichain);
impl_assets_helpers_for_teyrchain!(AssetHubPezkuwichain);
impl_foreign_assets_helpers_for_teyrchain!(
AssetHubPezkuwichain,
xcm::v5::Location,
ForeignAssetReserveData
);
impl_xcm_helpers_for_teyrchain!(AssetHubPezkuwichain);
impl_bridge_helpers_for_chain!(
AssetHubPezkuwichain,
ParaPallet,
PezkuwiXcm,
bp_bridge_hub_pezkuwichain::RuntimeCall::XcmOverBridgeHubZagros
);
@@ -0,0 +1,49 @@
[package]
name = "asset-hub-zagros-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Asset Hub Zagros emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
pezsp-keyring = { workspace = true }
# Pezcumulus
asset-hub-zagros-runtime = { workspace = true, default-features = true }
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
testnet-teyrchains-constants = { features = [
"zagros",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
zagros-emulated-chain = { workspace = true, default-features = true }
# Pezkuwi
xcm = { workspace = true }
xcm-builder = { workspace = true, default-features = true }
# Bridges
bp-bridge-hub-zagros = { workspace = true }
[features]
runtime-benchmarks = [
"asset-hub-zagros-runtime/runtime-benchmarks",
"bp-bridge-hub-zagros/runtime-benchmarks",
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm/runtime-benchmarks",
"zagros-emulated-chain/runtime-benchmarks",
]
@@ -0,0 +1,167 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezframe_support::parameter_types;
use pezsp_core::storage::Storage;
use pezsp_keyring::Sr25519Keyring as Keyring;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators,
snowbridge::{ETHER_MIN_BALANCE, WETH},
xcm_emulator::ConvertLocation,
PenpalALocation, PenpalASiblingSovereignAccount, PenpalATeleportableAssetLocation,
PenpalBLocation, PenpalBSiblingSovereignAccount, PenpalBTeleportableAssetLocation,
RESERVABLE_ASSET_ID, SAFE_XCM_VERSION, USDT_ID,
};
use testnet_teyrchains_constants::zagros::snowbridge::EthereumNetwork;
use teyrchains_common::{AccountId, Balance};
use xcm::{latest::prelude::*, opaque::latest::ZAGROS_GENESIS_HASH};
use xcm_builder::ExternalConsensusLocationsConverterFor;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = testnet_teyrchains_constants::zagros::currency::EXISTENTIAL_DEPOSIT;
pub const USDT_ED: Balance = 70_000;
parameter_types! {
pub AssetHubZagrosAssetOwner: AccountId = Keyring::Alice.to_account_id();
pub ZagrosGlobalConsensusNetwork: NetworkId = NetworkId::ByGenesis(ZAGROS_GENESIS_HASH);
pub AssetHubZagrosUniversalLocation: InteriorLocation = [GlobalConsensus(ZagrosGlobalConsensusNetwork::get()), Teyrchain(PARA_ID)].into();
pub EthereumLocation: Location = Location::new(2, [GlobalConsensus(EthereumNetwork::get())]);
pub EthereumSovereignAccount: AccountId = ExternalConsensusLocationsConverterFor::<
AssetHubZagrosUniversalLocation,
AccountId,
>::convert_location(&EthereumLocation::get()).unwrap();
}
pub fn genesis() -> Storage {
let genesis_config = asset_hub_zagros_runtime::RuntimeGenesisConfig {
system: asset_hub_zagros_runtime::SystemConfig::default(),
balances: asset_hub_zagros_runtime::BalancesConfig {
balances: accounts::init_balances()
.iter()
.cloned()
.map(|k| (k, ED * 4096))
// pre-fund checking account to avoid pre-funding for every test scenario
// teleporting funds to asset hub
.chain(std::iter::once((
asset_hub_zagros_runtime::xcm_config::CheckingAccount::get(),
ED * 1000,
)))
.collect(),
..Default::default()
},
teyrchain_info: asset_hub_zagros_runtime::TeyrchainInfoConfig {
teyrchain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: asset_hub_zagros_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: asset_hub_zagros_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
asset_hub_zagros_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: asset_hub_zagros_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
assets: asset_hub_zagros_runtime::AssetsConfig {
assets: vec![
(RESERVABLE_ASSET_ID, AssetHubZagrosAssetOwner::get(), false, ED),
(USDT_ID, AssetHubZagrosAssetOwner::get(), true, USDT_ED),
],
..Default::default()
},
foreign_assets: asset_hub_zagros_runtime::ForeignAssetsConfig {
assets: vec![
// PenpalA's teleportable asset representation
(
PenpalATeleportableAssetLocation::get(),
PenpalASiblingSovereignAccount::get(),
false,
ED,
),
// PenpalB's teleportable asset representation
(
PenpalBTeleportableAssetLocation::get(),
PenpalBSiblingSovereignAccount::get(),
false,
ED,
),
// Ether
(
Location::new(2, [GlobalConsensus(EthereumNetwork::get())]),
EthereumSovereignAccount::get(),
true,
ETHER_MIN_BALANCE,
),
// Weth
(
Location::new(
2,
[
GlobalConsensus(EthereumNetwork::get()),
AccountKey20 { network: None, key: WETH.into() },
],
),
EthereumSovereignAccount::get(),
true,
ETHER_MIN_BALANCE,
),
],
reserves: vec![
(
PenpalATeleportableAssetLocation::get(),
vec![(PenpalALocation::get(), true).into()],
),
(
PenpalBTeleportableAssetLocation::get(),
vec![(PenpalBLocation::get(), true).into()],
),
(EthereumLocation::get(), vec![(EthereumLocation::get(), false).into()]),
(
Location::new(
2,
[
GlobalConsensus(EthereumNetwork::get()),
AccountKey20 { network: None, key: WETH.into() },
],
),
vec![(EthereumLocation::get(), false).into()],
),
],
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
asset_hub_zagros_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,79 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use asset_hub_zagros_runtime;
pub mod genesis;
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use asset_hub_zagros_runtime::ForeignAssetReserveData;
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impl_assets_helpers_for_system_teyrchain, impl_assets_helpers_for_teyrchain,
impl_bridge_helpers_for_chain, impl_foreign_assets_helpers_for_teyrchain,
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_emulator::decl_test_teyrchains,
AuraDigestProvider,
};
use zagros_emulated_chain::Zagros;
// AssetHubZagros Teyrchain declaration
decl_test_teyrchains! {
pub struct AssetHubZagros {
genesis = genesis::genesis(),
on_init = {
asset_hub_zagros_runtime::AuraExt::on_initialize(1);
},
runtime = asset_hub_zagros_runtime,
core = {
XcmpMessageHandler: asset_hub_zagros_runtime::XcmpQueue,
LocationToAccountId: asset_hub_zagros_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: asset_hub_zagros_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
AdditionalInherentCode: (),
},
pallets = {
PezkuwiXcm: asset_hub_zagros_runtime::PezkuwiXcm,
Balances: asset_hub_zagros_runtime::Balances,
Assets: asset_hub_zagros_runtime::Assets,
ForeignAssets: asset_hub_zagros_runtime::ForeignAssets,
PoolAssets: asset_hub_zagros_runtime::PoolAssets,
AssetConversion: asset_hub_zagros_runtime::AssetConversion,
SnowbridgeSystemFrontend: asset_hub_zagros_runtime::SnowbridgeSystemFrontend,
Revive: asset_hub_zagros_runtime::Revive,
}
},
}
// AssetHubZagros implementation
impl_accounts_helpers_for_teyrchain!(AssetHubZagros);
impl_assert_events_helpers_for_teyrchain!(AssetHubZagros);
impl_assets_helpers_for_system_teyrchain!(AssetHubZagros, Zagros);
impl_assets_helpers_for_teyrchain!(AssetHubZagros);
impl_foreign_assets_helpers_for_teyrchain!(
AssetHubZagros,
xcm::v5::Location,
ForeignAssetReserveData
);
impl_xcm_helpers_for_teyrchain!(AssetHubZagros);
impl_bridge_helpers_for_chain!(
AssetHubZagros,
ParaPallet,
PezkuwiXcm,
bp_bridge_hub_zagros::RuntimeCall::XcmOverBridgeHubPezkuwichain
);
@@ -0,0 +1,45 @@
[package]
name = "bridge-hub-pezkuwichain-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Bridge Hub Pezkuwichain emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
pezsp-keyring = { workspace = true }
# Pezkuwi Dependencies
xcm = { workspace = true }
# Bridge dependencies
bp-messages = { workspace = true }
# Pezcumulus
bridge-hub-common = { workspace = true }
bridge-hub-pezkuwichain-runtime = { workspace = true, default-features = true }
emulated-integration-tests-common = { workspace = true }
testnet-teyrchains-constants = { features = [
"pezkuwichain",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"bp-messages/runtime-benchmarks",
"bridge-hub-common/runtime-benchmarks",
"bridge-hub-pezkuwichain-runtime/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"xcm/runtime-benchmarks",
]
@@ -0,0 +1,96 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsp_core::storage::Storage;
use pezsp_keyring::Sr25519Keyring as Keyring;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use teyrchains_common::Balance;
use xcm::latest::{prelude::*, ZAGROS_GENESIS_HASH};
pub const ASSETHUB_PARA_ID: u32 = 1000;
pub const PARA_ID: u32 = 1002;
pub const ED: Balance = testnet_teyrchains_constants::pezkuwichain::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = bridge_hub_pezkuwichain_runtime::RuntimeGenesisConfig {
system: bridge_hub_pezkuwichain_runtime::SystemConfig::default(),
balances: bridge_hub_pezkuwichain_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: bridge_hub_pezkuwichain_runtime::TeyrchainInfoConfig {
teyrchain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: bridge_hub_pezkuwichain_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: bridge_hub_pezkuwichain_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
bridge_hub_pezkuwichain_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: bridge_hub_pezkuwichain_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
bridge_zagros_grandpa: bridge_hub_pezkuwichain_runtime::BridgeZagrosGrandpaConfig {
owner: Some(Keyring::Bob.to_account_id()),
..Default::default()
},
bridge_zagros_messages: bridge_hub_pezkuwichain_runtime::BridgeZagrosMessagesConfig {
owner: Some(Keyring::Bob.to_account_id()),
..Default::default()
},
xcm_over_bridge_hub_zagros: bridge_hub_pezkuwichain_runtime::XcmOverBridgeHubZagrosConfig {
opened_bridges: vec![
// open AHR -> AHW bridge
(
Location::new(1, [Teyrchain(1000)]),
Junctions::from([ByGenesis(ZAGROS_GENESIS_HASH).into(), Teyrchain(1000)]),
Some(bp_messages::LegacyLaneId([0, 0, 0, 2])),
),
],
..Default::default()
},
ethereum_system: bridge_hub_pezkuwichain_runtime::EthereumSystemConfig {
para_id: PARA_ID.into(),
asset_hub_para_id: ASSETHUB_PARA_ID.into(),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
bridge_hub_pezkuwichain_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,63 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod genesis;
pub use bridge_hub_pezkuwichain_runtime::{
self as bridge_hub_pezkuwichain_runtime,
xcm_config::XcmConfig as BridgeHubPezkuwichainXcmConfig, EthereumBeaconClient,
EthereumInboundQueue, ExistentialDeposit as BridgeHubPezkuwichainExistentialDeposit,
RuntimeOrigin as BridgeHubPezkuwichainRuntimeOrigin,
};
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_emulator::decl_test_teyrchains,
AuraDigestProvider,
};
// BridgeHubPezkuwichain Teyrchain declaration
decl_test_teyrchains! {
pub struct BridgeHubPezkuwichain {
genesis = genesis::genesis(),
on_init = {
bridge_hub_pezkuwichain_runtime::AuraExt::on_initialize(1);
},
runtime = bridge_hub_pezkuwichain_runtime,
core = {
XcmpMessageHandler: bridge_hub_pezkuwichain_runtime::XcmpQueue,
LocationToAccountId: bridge_hub_pezkuwichain_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: bridge_hub_pezkuwichain_runtime::TeyrchainInfo,
MessageOrigin: bridge_hub_common::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: bridge_hub_pezkuwichain_runtime::PezkuwiXcm,
Balances: bridge_hub_pezkuwichain_runtime::Balances,
EthereumSystem: bridge_hub_pezkuwichain_runtime::EthereumSystem,
EthereumInboundQueue: bridge_hub_pezkuwichain_runtime::EthereumInboundQueue,
EthereumOutboundQueue: bridge_hub_pezkuwichain_runtime::EthereumOutboundQueue,
}
},
}
// BridgeHubPezkuwichain implementation
impl_accounts_helpers_for_teyrchain!(BridgeHubPezkuwichain);
impl_assert_events_helpers_for_teyrchain!(BridgeHubPezkuwichain);
impl_xcm_helpers_for_teyrchain!(BridgeHubPezkuwichain);
@@ -0,0 +1,45 @@
[package]
name = "bridge-hub-zagros-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Bridge Hub Zagros emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
pezsp-keyring = { workspace = true }
# Pezkuwi Dependencies
xcm = { workspace = true }
# Bridge dependencies
bp-messages = { workspace = true }
# Pezcumulus
bridge-hub-common = { workspace = true }
bridge-hub-zagros-runtime = { workspace = true, default-features = true }
emulated-integration-tests-common = { workspace = true }
testnet-teyrchains-constants = { features = [
"zagros",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"bp-messages/runtime-benchmarks",
"bridge-hub-common/runtime-benchmarks",
"bridge-hub-zagros-runtime/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"xcm/runtime-benchmarks",
]
@@ -0,0 +1,100 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsp_core::storage::Storage;
use pezsp_keyring::Sr25519Keyring as Keyring;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use teyrchains_common::Balance;
use xcm::latest::{prelude::*, PEZKUWICHAIN_GENESIS_HASH};
pub const PARA_ID: u32 = 1002;
pub const ASSETHUB_PARA_ID: u32 = 1000;
pub const ED: Balance = testnet_teyrchains_constants::zagros::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = bridge_hub_zagros_runtime::RuntimeGenesisConfig {
system: bridge_hub_zagros_runtime::SystemConfig::default(),
balances: bridge_hub_zagros_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: bridge_hub_zagros_runtime::TeyrchainInfoConfig {
teyrchain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: bridge_hub_zagros_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: bridge_hub_zagros_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
bridge_hub_zagros_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: bridge_hub_zagros_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
bridge_pezkuwichain_grandpa: bridge_hub_zagros_runtime::BridgePezkuwichainGrandpaConfig {
owner: Some(Keyring::Bob.to_account_id()),
..Default::default()
},
bridge_pezkuwichain_messages: bridge_hub_zagros_runtime::BridgePezkuwichainMessagesConfig {
owner: Some(Keyring::Bob.to_account_id()),
..Default::default()
},
xcm_over_bridge_hub_pezkuwichain:
bridge_hub_zagros_runtime::XcmOverBridgeHubPezkuwichainConfig {
opened_bridges: vec![
// open AHW -> AHR bridge
(
Location::new(1, [Teyrchain(1000)]),
Junctions::from([
NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH).into(),
Teyrchain(1000),
]),
Some(bp_messages::LegacyLaneId([0, 0, 0, 2])),
),
],
..Default::default()
},
ethereum_system: bridge_hub_zagros_runtime::EthereumSystemConfig {
para_id: PARA_ID.into(),
asset_hub_para_id: ASSETHUB_PARA_ID.into(),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
bridge_hub_zagros_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,64 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod genesis;
pub use bridge_hub_zagros_runtime::{
self, xcm_config::XcmConfig as BridgeHubZagrosXcmConfig,
ExistentialDeposit as BridgeHubZagrosExistentialDeposit,
RuntimeOrigin as BridgeHubZagrosRuntimeOrigin,
};
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_emulator::decl_test_teyrchains,
AuraDigestProvider,
};
// BridgeHubZagros Teyrchain declaration
decl_test_teyrchains! {
pub struct BridgeHubZagros {
genesis = genesis::genesis(),
on_init = {
bridge_hub_zagros_runtime::AuraExt::on_initialize(1);
},
runtime = bridge_hub_zagros_runtime,
core = {
XcmpMessageHandler: bridge_hub_zagros_runtime::XcmpQueue,
LocationToAccountId: bridge_hub_zagros_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: bridge_hub_zagros_runtime::TeyrchainInfo,
MessageOrigin: bridge_hub_common::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: bridge_hub_zagros_runtime::PezkuwiXcm,
Balances: bridge_hub_zagros_runtime::Balances,
EthereumSystem: bridge_hub_zagros_runtime::EthereumSystem,
EthereumInboundQueue: bridge_hub_zagros_runtime::EthereumInboundQueue,
EthereumOutboundQueue: bridge_hub_zagros_runtime::EthereumOutboundQueue,
EthereumSystemV2: bridge_hub_zagros_runtime::EthereumSystemV2,
BridgeRelayers: bridge_hub_zagros_runtime::BridgeRelayers,
}
},
}
// BridgeHubZagros implementation
impl_accounts_helpers_for_teyrchain!(BridgeHubZagros);
impl_assert_events_helpers_for_teyrchain!(BridgeHubZagros);
impl_xcm_helpers_for_teyrchain!(BridgeHubZagros);
@@ -0,0 +1,35 @@
[package]
name = "collectives-zagros-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Collectives Zagros emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
# Pezcumulus
collectives-zagros-runtime = { workspace = true }
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
testnet-teyrchains-constants = { features = [
"zagros",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"collectives-zagros-runtime/runtime-benchmarks",
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
]
@@ -0,0 +1,69 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsp_core::storage::Storage;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use teyrchains_common::Balance;
pub const PARA_ID: u32 = 1001;
pub const ED: Balance = testnet_teyrchains_constants::zagros::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = collectives_zagros_runtime::RuntimeGenesisConfig {
system: collectives_zagros_runtime::SystemConfig::default(),
balances: collectives_zagros_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: collectives_zagros_runtime::TeyrchainInfoConfig {
teyrchain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: collectives_zagros_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: collectives_zagros_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
collectives_zagros_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: collectives_zagros_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
collectives_zagros_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,55 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use collectives_zagros_runtime;
pub mod genesis;
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impls::Teyrchain, xcm_emulator::decl_test_teyrchains, AuraDigestProvider,
};
// CollectivesZagros Teyrchain declaration
decl_test_teyrchains! {
pub struct CollectivesZagros {
genesis = genesis::genesis(),
on_init = {
collectives_zagros_runtime::AuraExt::on_initialize(1);
},
runtime = collectives_zagros_runtime,
core = {
XcmpMessageHandler: collectives_zagros_runtime::XcmpQueue,
LocationToAccountId: collectives_zagros_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: collectives_zagros_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: collectives_zagros_runtime::PezkuwiXcm,
Balances: collectives_zagros_runtime::Balances,
FellowshipTreasury: collectives_zagros_runtime::FellowshipTreasury,
AssetRate: collectives_zagros_runtime::AssetRate,
}
},
}
// AssetHubZagros implementation
impl_accounts_helpers_for_teyrchain!(CollectivesZagros);
impl_assert_events_helpers_for_teyrchain!(CollectivesZagros);
@@ -0,0 +1,35 @@
[package]
name = "coretime-pezkuwichain-emulated-chain"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Coretime Pezkuwichain emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
# Pezcumulus
coretime-pezkuwichain-runtime = { workspace = true, default-features = true }
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
testnet-teyrchains-constants = { features = [
"pezkuwichain",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"coretime-pezkuwichain-runtime/runtime-benchmarks",
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
]
@@ -0,0 +1,69 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsp_core::storage::Storage;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use teyrchains_common::Balance;
pub const PARA_ID: u32 = 1005;
pub const ED: Balance = testnet_teyrchains_constants::pezkuwichain::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = coretime_pezkuwichain_runtime::RuntimeGenesisConfig {
system: coretime_pezkuwichain_runtime::SystemConfig::default(),
balances: coretime_pezkuwichain_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: coretime_pezkuwichain_runtime::TeyrchainInfoConfig {
teyrchain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: coretime_pezkuwichain_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: coretime_pezkuwichain_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
coretime_pezkuwichain_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: coretime_pezkuwichain_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
coretime_pezkuwichain_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,54 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use coretime_pezkuwichain_runtime;
pub mod genesis;
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impls::Teyrchain, xcm_emulator::decl_test_teyrchains, AuraDigestProvider,
};
// CoretimePezkuwichain Teyrchain declaration
decl_test_teyrchains! {
pub struct CoretimePezkuwichain {
genesis = genesis::genesis(),
on_init = {
coretime_pezkuwichain_runtime::AuraExt::on_initialize(1);
},
runtime = coretime_pezkuwichain_runtime,
core = {
XcmpMessageHandler: coretime_pezkuwichain_runtime::XcmpQueue,
LocationToAccountId: coretime_pezkuwichain_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: coretime_pezkuwichain_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: coretime_pezkuwichain_runtime::PezkuwiXcm,
Balances: coretime_pezkuwichain_runtime::Balances,
Broker: coretime_pezkuwichain_runtime::Broker,
}
},
}
// CoretimePezkuwichain implementation
impl_accounts_helpers_for_teyrchain!(CoretimePezkuwichain);
impl_assert_events_helpers_for_teyrchain!(CoretimePezkuwichain);
@@ -0,0 +1,35 @@
[package]
name = "coretime-zagros-emulated-chain"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Coretime Zagros emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
# Pezcumulus
coretime-zagros-runtime = { workspace = true, default-features = true }
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
testnet-teyrchains-constants = { features = [
"zagros",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"coretime-zagros-runtime/runtime-benchmarks",
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
]
@@ -0,0 +1,68 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsp_core::storage::Storage;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use teyrchains_common::Balance;
pub const PARA_ID: u32 = 1005;
pub const ED: Balance = testnet_teyrchains_constants::zagros::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = coretime_zagros_runtime::RuntimeGenesisConfig {
system: coretime_zagros_runtime::SystemConfig::default(),
balances: coretime_zagros_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: coretime_zagros_runtime::TeyrchainInfoConfig {
teyrchain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: coretime_zagros_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: coretime_zagros_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
coretime_zagros_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: coretime_zagros_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
coretime_zagros_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,54 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use coretime_zagros_runtime;
pub mod genesis;
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impls::Teyrchain, xcm_emulator::decl_test_teyrchains, AuraDigestProvider,
};
// CoretimeZagros Teyrchain declaration
decl_test_teyrchains! {
pub struct CoretimeZagros {
genesis = genesis::genesis(),
on_init = {
coretime_zagros_runtime::AuraExt::on_initialize(1);
},
runtime = coretime_zagros_runtime,
core = {
XcmpMessageHandler: coretime_zagros_runtime::XcmpQueue,
LocationToAccountId: coretime_zagros_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: coretime_zagros_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: coretime_zagros_runtime::PezkuwiXcm,
Balances: coretime_zagros_runtime::Balances,
Broker: coretime_zagros_runtime::Broker,
}
},
}
// CoretimeZagros implementation
impl_accounts_helpers_for_teyrchain!(CoretimeZagros);
impl_assert_events_helpers_for_teyrchain!(CoretimeZagros);
@@ -0,0 +1,35 @@
[package]
name = "people-pezkuwichain-emulated-chain"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "People Pezkuwichain emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
# Pezcumulus
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
people-pezkuwichain-runtime = { workspace = true }
testnet-teyrchains-constants = { features = [
"pezkuwichain",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"people-pezkuwichain-runtime/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
]
@@ -0,0 +1,70 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsp_core::storage::Storage;
// Pezcumulus
use cumulus_primitives_core::ParaId;
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use teyrchains_common::Balance;
pub const PARA_ID: u32 = 1004;
pub const ED: Balance = testnet_teyrchains_constants::pezkuwichain::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = people_pezkuwichain_runtime::RuntimeGenesisConfig {
system: people_pezkuwichain_runtime::SystemConfig::default(),
balances: people_pezkuwichain_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: people_pezkuwichain_runtime::TeyrchainInfoConfig {
teyrchain_id: ParaId::from(PARA_ID),
..Default::default()
},
collator_selection: people_pezkuwichain_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: people_pezkuwichain_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
people_pezkuwichain_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: people_pezkuwichain_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
people_pezkuwichain_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,54 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use people_pezkuwichain_runtime;
pub mod genesis;
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impls::Teyrchain, xcm_emulator::decl_test_teyrchains, AuraDigestProvider,
};
// PeoplePezkuwichain Teyrchain declaration
decl_test_teyrchains! {
pub struct PeoplePezkuwichain {
genesis = genesis::genesis(),
on_init = {
people_pezkuwichain_runtime::AuraExt::on_initialize(1);
},
runtime = people_pezkuwichain_runtime,
core = {
XcmpMessageHandler: people_pezkuwichain_runtime::XcmpQueue,
LocationToAccountId: people_pezkuwichain_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: people_pezkuwichain_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: people_pezkuwichain_runtime::PezkuwiXcm,
Balances: people_pezkuwichain_runtime::Balances,
Identity: people_pezkuwichain_runtime::Identity,
IdentityMigrator: people_pezkuwichain_runtime::IdentityMigrator,
}
},
}
// PeoplePezkuwichain implementation
impl_accounts_helpers_for_teyrchain!(PeoplePezkuwichain);
impl_assert_events_helpers_for_teyrchain!(PeoplePezkuwichain);
@@ -0,0 +1,35 @@
[package]
name = "people-zagros-emulated-chain"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "People Zagros emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
# Pezcumulus
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
people-zagros-runtime = { workspace = true }
testnet-teyrchains-constants = { features = [
"zagros",
], workspace = true, default-features = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"people-zagros-runtime/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
]
@@ -0,0 +1,69 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezsp_core::storage::Storage;
// Pezcumulus
use cumulus_primitives_core::ParaId;
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use teyrchains_common::Balance;
pub const PARA_ID: u32 = 1004;
pub const ED: Balance = testnet_teyrchains_constants::zagros::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = people_zagros_runtime::RuntimeGenesisConfig {
system: people_zagros_runtime::SystemConfig::default(),
balances: people_zagros_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: people_zagros_runtime::TeyrchainInfoConfig {
teyrchain_id: ParaId::from(PARA_ID),
..Default::default()
},
collator_selection: people_zagros_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: people_zagros_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
people_zagros_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: people_zagros_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
people_zagros_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,54 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use people_zagros_runtime;
pub mod genesis;
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impls::Teyrchain, xcm_emulator::decl_test_teyrchains, AuraDigestProvider,
};
// PeopleZagros Teyrchain declaration
decl_test_teyrchains! {
pub struct PeopleZagros {
genesis = genesis::genesis(),
on_init = {
people_zagros_runtime::AuraExt::on_initialize(1);
},
runtime = people_zagros_runtime,
core = {
XcmpMessageHandler: people_zagros_runtime::XcmpQueue,
LocationToAccountId: people_zagros_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: people_zagros_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: people_zagros_runtime::PezkuwiXcm,
Balances: people_zagros_runtime::Balances,
Identity: people_zagros_runtime::Identity,
IdentityMigrator: people_zagros_runtime::IdentityMigrator,
}
},
}
// PeopleZagros implementation
impl_accounts_helpers_for_teyrchain!(PeopleZagros);
impl_assert_events_helpers_for_teyrchain!(PeopleZagros);
@@ -0,0 +1,37 @@
[package]
name = "penpal-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Penpal emulated chain"
publish = false
[lints]
workspace = true
[dependencies]
# Bizinikiwi
pezframe-support = { workspace = true }
pezsp-core = { workspace = true }
pezsp-keyring = { workspace = true }
# Pezkuwi
xcm = { workspace = true }
# Pezcumulus
pezcumulus-primitives-core = { workspace = true }
emulated-integration-tests-common = { workspace = true }
penpal-runtime = { workspace = true }
teyrchains-common = { workspace = true, default-features = true }
[features]
runtime-benchmarks = [
"pezcumulus-primitives-core/runtime-benchmarks",
"emulated-integration-tests-common/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"penpal-runtime/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"xcm/runtime-benchmarks",
]
@@ -0,0 +1,99 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Bizinikiwi
use pezframe_support::parameter_types;
use pezsp_core::storage::Storage;
use pezsp_keyring::Sr25519Keyring as Keyring;
// Pezcumulus
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub};
use teyrchains_common::{AccountId, Balance};
// Penpal
pub const PARA_ID_A: u32 = 2000;
pub const PARA_ID_B: u32 = 2001;
pub const ED: Balance = penpal_runtime::EXISTENTIAL_DEPOSIT;
pub const USDT_ED: Balance = 70_000;
parameter_types! {
pub PenpalSudoAccount: AccountId = Keyring::Alice.to_account_id();
pub PenpalAssetOwner: AccountId = PenpalSudoAccount::get();
}
pub fn genesis(para_id: u32) -> Storage {
let genesis_config = penpal_runtime::RuntimeGenesisConfig {
system: penpal_runtime::SystemConfig::default(),
balances: penpal_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
..Default::default()
},
teyrchain_info: penpal_runtime::TeyrchainInfoConfig {
teyrchain_id: para_id.into(),
..Default::default()
},
collator_selection: penpal_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: penpal_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
penpal_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
..Default::default()
},
pezkuwi_xcm: penpal_runtime::PezkuwiXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
sudo: penpal_runtime::SudoConfig { key: Some(PenpalSudoAccount::get()) },
assets: penpal_runtime::AssetsConfig {
assets: vec![(
penpal_runtime::xcm_config::TELEPORTABLE_ASSET_ID,
PenpalAssetOwner::get(),
false,
ED,
)],
..Default::default()
},
foreign_assets: penpal_runtime::ForeignAssetsConfig {
assets: vec![
// Relay Native asset representation
(RelayLocation::get(), PenpalAssetOwner::get(), true, ED),
// Sufficient AssetHub asset representation
(LocalReservableFromAssetHub::get(), PenpalAssetOwner::get(), true, ED),
// USDT from AssetHub
(UsdtFromAssetHub::get(), PenpalAssetOwner::get(), true, USDT_ED),
],
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
penpal_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}
@@ -0,0 +1,104 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub use penpal_runtime::{
self, xcm_config::RelayNetworkId as PenpalRelayNetworkId, ForeignAssetReserveData,
};
mod genesis;
pub use genesis::{genesis, PenpalAssetOwner, PenpalSudoAccount, ED, PARA_ID_A, PARA_ID_B};
// Bizinikiwi
use pezframe_support::traits::OnInitialize;
use pezsp_core::Encode;
// Pezcumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_teyrchain, impl_assert_events_helpers_for_teyrchain,
impl_assets_helpers_for_teyrchain, impl_foreign_assets_helpers_for_teyrchain,
impl_xcm_helpers_for_teyrchain,
impls::{NetworkId, Teyrchain},
xcm_emulator::decl_test_teyrchains,
AuraDigestProvider,
};
// Pezkuwi
use xcm::latest::{PEZKUWICHAIN_GENESIS_HASH, ZAGROS_GENESIS_HASH};
// Penpal Teyrchain declaration
decl_test_teyrchains! {
pub struct PenpalA {
genesis = genesis(PARA_ID_A),
on_init = {
penpal_runtime::AuraExt::on_initialize(1);
pezframe_support::assert_ok!(penpal_runtime::System::set_storage(
penpal_runtime::RuntimeOrigin::root(),
vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH).encode())],
));
},
runtime = penpal_runtime,
core = {
XcmpMessageHandler: penpal_runtime::XcmpQueue,
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: penpal_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: penpal_runtime::PezkuwiXcm,
Assets: penpal_runtime::Assets,
ForeignAssets: penpal_runtime::ForeignAssets,
AssetConversion: penpal_runtime::AssetConversion,
Balances: penpal_runtime::Balances,
}
},
pub struct PenpalB {
genesis = genesis(PARA_ID_B),
on_init = {
penpal_runtime::AuraExt::on_initialize(1);
pezframe_support::assert_ok!(penpal_runtime::System::set_storage(
penpal_runtime::RuntimeOrigin::root(),
vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::ByGenesis(ZAGROS_GENESIS_HASH).encode())],
));
},
runtime = penpal_runtime,
core = {
XcmpMessageHandler: penpal_runtime::XcmpQueue,
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
TeyrchainInfo: penpal_runtime::TeyrchainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
DigestProvider: AuraDigestProvider,
},
pallets = {
PezkuwiXcm: penpal_runtime::PezkuwiXcm,
Assets: penpal_runtime::Assets,
ForeignAssets: penpal_runtime::ForeignAssets,
AssetConversion: penpal_runtime::AssetConversion,
Balances: penpal_runtime::Balances,
}
},
}
// Penpal implementation
impl_accounts_helpers_for_teyrchain!(PenpalA);
impl_accounts_helpers_for_teyrchain!(PenpalB);
impl_assert_events_helpers_for_teyrchain!(PenpalA);
impl_assert_events_helpers_for_teyrchain!(PenpalB);
impl_assets_helpers_for_teyrchain!(PenpalA);
impl_foreign_assets_helpers_for_teyrchain!(PenpalA, xcm::latest::Location, ForeignAssetReserveData);
impl_assets_helpers_for_teyrchain!(PenpalB);
impl_foreign_assets_helpers_for_teyrchain!(PenpalB, xcm::latest::Location, ForeignAssetReserveData);
impl_xcm_helpers_for_teyrchain!(PenpalA);
impl_xcm_helpers_for_teyrchain!(PenpalB);