Refactoring Checkpoint: (WIP)
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ pub mod genesis;
|
||||
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,
|
||||
xcm_pez_emulator::decl_test_relay_chains,
|
||||
};
|
||||
|
||||
// Pezkuwichain declaration
|
||||
|
||||
@@ -20,7 +20,7 @@ pub mod genesis;
|
||||
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,
|
||||
xcm_pez_emulator::decl_test_relay_chains,
|
||||
};
|
||||
|
||||
// Zagros declaration
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ use pezsp_keyring::Sr25519Keyring as Keyring;
|
||||
use emulated_integration_tests_common::{
|
||||
accounts, build_genesis_storage, collators,
|
||||
snowbridge::{ETHER_MIN_BALANCE, WETH},
|
||||
xcm_emulator::ConvertLocation,
|
||||
xcm_pez_emulator::ConvertLocation,
|
||||
PenpalALocation, PenpalASiblingSovereignAccount, PenpalATeleportableAssetLocation,
|
||||
PenpalBLocation, PenpalBSiblingSovereignAccount, PenpalBTeleportableAssetLocation,
|
||||
RESERVABLE_ASSET_ID, SAFE_XCM_VERSION, USDT_ID,
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ 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,
|
||||
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains,
|
||||
AuraDigestProvider,
|
||||
};
|
||||
use pezkuwichain_emulated_chain::Pezkuwichain;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ use pezsp_keyring::Sr25519Keyring as Keyring;
|
||||
use emulated_integration_tests_common::{
|
||||
accounts, build_genesis_storage, collators,
|
||||
snowbridge::{ETHER_MIN_BALANCE, WETH},
|
||||
xcm_emulator::ConvertLocation,
|
||||
xcm_pez_emulator::ConvertLocation,
|
||||
PenpalALocation, PenpalASiblingSovereignAccount, PenpalATeleportableAssetLocation,
|
||||
PenpalBLocation, PenpalBSiblingSovereignAccount, PenpalBTeleportableAssetLocation,
|
||||
RESERVABLE_ASSET_ID, SAFE_XCM_VERSION, USDT_ID,
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ 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,
|
||||
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains,
|
||||
AuraDigestProvider,
|
||||
};
|
||||
use zagros_emulated_chain::Zagros;
|
||||
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "bridge-hub-pezkuwichain-emulated-chain"
|
||||
name = "pezbridge-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
|
||||
documentation = "https://docs.rs/bridge-hub-pezkuwichain-emulated-chain"
|
||||
documentation = "https://docs.rs/pezbridge-hub-pezkuwichain-emulated-chain"
|
||||
repository = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
||||
@@ -27,7 +27,7 @@ bp-messages = { workspace = true }
|
||||
|
||||
# Pezcumulus
|
||||
bridge-hub-common = { workspace = true }
|
||||
bridge-hub-pezkuwichain-runtime = { workspace = true, default-features = true }
|
||||
pezbridge-hub-pezkuwichain-runtime = { workspace = true, default-features = true }
|
||||
emulated-integration-tests-common = { workspace = true }
|
||||
testnet-teyrchains-constants = { features = [
|
||||
"pezkuwichain",
|
||||
@@ -38,7 +38,7 @@ teyrchains-common = { workspace = true, default-features = true }
|
||||
runtime-benchmarks = [
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bridge-hub-common/runtime-benchmarks",
|
||||
"bridge-hub-pezkuwichain-runtime/runtime-benchmarks",
|
||||
"pezbridge-hub-pezkuwichain-runtime/runtime-benchmarks",
|
||||
"emulated-integration-tests-common/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezsp-keyring/runtime-benchmarks",
|
||||
|
||||
+13
-13
@@ -29,47 +29,47 @@ 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 {
|
||||
let genesis_config = pezbridge_hub_pezkuwichain_runtime::RuntimeGenesisConfig {
|
||||
system: pezbridge_hub_pezkuwichain_runtime::SystemConfig::default(),
|
||||
balances: pezbridge_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_info: pezbridge_hub_pezkuwichain_runtime::TeyrchainInfoConfig {
|
||||
teyrchain_id: PARA_ID.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: bridge_hub_pezkuwichain_runtime::CollatorSelectionConfig {
|
||||
collator_selection: pezbridge_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 {
|
||||
session: pezbridge_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
|
||||
pezbridge_hub_pezkuwichain_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
..Default::default()
|
||||
},
|
||||
pezkuwi_xcm: bridge_hub_pezkuwichain_runtime::PezkuwiXcmConfig {
|
||||
pezkuwi_xcm: pezbridge_hub_pezkuwichain_runtime::PezkuwiXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_zagros_grandpa: bridge_hub_pezkuwichain_runtime::BridgeZagrosGrandpaConfig {
|
||||
bridge_zagros_grandpa: pezbridge_hub_pezkuwichain_runtime::BridgeZagrosGrandpaConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_zagros_messages: bridge_hub_pezkuwichain_runtime::BridgeZagrosMessagesConfig {
|
||||
bridge_zagros_messages: pezbridge_hub_pezkuwichain_runtime::BridgeZagrosMessagesConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
xcm_over_bridge_hub_zagros: bridge_hub_pezkuwichain_runtime::XcmOverBridgeHubZagrosConfig {
|
||||
xcm_over_bridge_hub_zagros: pezbridge_hub_pezkuwichain_runtime::XcmOverBridgeHubZagrosConfig {
|
||||
opened_bridges: vec![
|
||||
// open AHR -> AHW bridge
|
||||
(
|
||||
@@ -80,7 +80,7 @@ pub fn genesis() -> Storage {
|
||||
],
|
||||
..Default::default()
|
||||
},
|
||||
ethereum_system: bridge_hub_pezkuwichain_runtime::EthereumSystemConfig {
|
||||
ethereum_system: pezbridge_hub_pezkuwichain_runtime::EthereumSystemConfig {
|
||||
para_id: PARA_ID.into(),
|
||||
asset_hub_para_id: ASSETHUB_PARA_ID.into(),
|
||||
..Default::default()
|
||||
@@ -90,7 +90,7 @@ pub fn genesis() -> Storage {
|
||||
|
||||
build_genesis_storage(
|
||||
&genesis_config,
|
||||
bridge_hub_pezkuwichain_runtime::WASM_BINARY
|
||||
pezbridge_hub_pezkuwichain_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
|
||||
+13
-13
@@ -15,8 +15,8 @@
|
||||
|
||||
pub mod genesis;
|
||||
|
||||
pub use bridge_hub_pezkuwichain_runtime::{
|
||||
self as bridge_hub_pezkuwichain_runtime,
|
||||
pub use pezbridge_hub_pezkuwichain_runtime::{
|
||||
self as pezbridge_hub_pezkuwichain_runtime,
|
||||
xcm_config::XcmConfig as BridgeHubPezkuwichainXcmConfig, EthereumBeaconClient,
|
||||
EthereumInboundQueue, ExistentialDeposit as BridgeHubPezkuwichainExistentialDeposit,
|
||||
RuntimeOrigin as BridgeHubPezkuwichainRuntimeOrigin,
|
||||
@@ -28,7 +28,7 @@ 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,
|
||||
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains,
|
||||
AuraDigestProvider,
|
||||
};
|
||||
|
||||
@@ -37,22 +37,22 @@ decl_test_teyrchains! {
|
||||
pub struct BridgeHubPezkuwichain {
|
||||
genesis = genesis::genesis(),
|
||||
on_init = {
|
||||
bridge_hub_pezkuwichain_runtime::AuraExt::on_initialize(1);
|
||||
pezbridge_hub_pezkuwichain_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = bridge_hub_pezkuwichain_runtime,
|
||||
runtime = pezbridge_hub_pezkuwichain_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: bridge_hub_pezkuwichain_runtime::XcmpQueue,
|
||||
LocationToAccountId: bridge_hub_pezkuwichain_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: bridge_hub_pezkuwichain_runtime::TeyrchainInfo,
|
||||
XcmpMessageHandler: pezbridge_hub_pezkuwichain_runtime::XcmpQueue,
|
||||
LocationToAccountId: pezbridge_hub_pezkuwichain_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: pezbridge_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,
|
||||
PezkuwiXcm: pezbridge_hub_pezkuwichain_runtime::PezkuwiXcm,
|
||||
Balances: pezbridge_hub_pezkuwichain_runtime::Balances,
|
||||
EthereumSystem: pezbridge_hub_pezkuwichain_runtime::EthereumSystem,
|
||||
EthereumInboundQueue: pezbridge_hub_pezkuwichain_runtime::EthereumInboundQueue,
|
||||
EthereumOutboundQueue: pezbridge_hub_pezkuwichain_runtime::EthereumOutboundQueue,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "bridge-hub-zagros-emulated-chain"
|
||||
name = "pezbridge-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
|
||||
documentation = "https://docs.rs/bridge-hub-zagros-emulated-chain"
|
||||
documentation = "https://docs.rs/pezbridge-hub-zagros-emulated-chain"
|
||||
repository = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
||||
@@ -27,7 +27,7 @@ bp-messages = { workspace = true }
|
||||
|
||||
# Pezcumulus
|
||||
bridge-hub-common = { workspace = true }
|
||||
bridge-hub-zagros-runtime = { workspace = true, default-features = true }
|
||||
pezbridge-hub-zagros-runtime = { workspace = true, default-features = true }
|
||||
emulated-integration-tests-common = { workspace = true }
|
||||
testnet-teyrchains-constants = { features = [
|
||||
"zagros",
|
||||
@@ -38,7 +38,7 @@ teyrchains-common = { workspace = true, default-features = true }
|
||||
runtime-benchmarks = [
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bridge-hub-common/runtime-benchmarks",
|
||||
"bridge-hub-zagros-runtime/runtime-benchmarks",
|
||||
"pezbridge-hub-zagros-runtime/runtime-benchmarks",
|
||||
"emulated-integration-tests-common/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezsp-keyring/runtime-benchmarks",
|
||||
|
||||
+13
-13
@@ -29,48 +29,48 @@ 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 {
|
||||
let genesis_config = pezbridge_hub_zagros_runtime::RuntimeGenesisConfig {
|
||||
system: pezbridge_hub_zagros_runtime::SystemConfig::default(),
|
||||
balances: pezbridge_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_info: pezbridge_hub_zagros_runtime::TeyrchainInfoConfig {
|
||||
teyrchain_id: PARA_ID.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: bridge_hub_zagros_runtime::CollatorSelectionConfig {
|
||||
collator_selection: pezbridge_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 {
|
||||
session: pezbridge_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
|
||||
pezbridge_hub_zagros_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
..Default::default()
|
||||
},
|
||||
pezkuwi_xcm: bridge_hub_zagros_runtime::PezkuwiXcmConfig {
|
||||
pezkuwi_xcm: pezbridge_hub_zagros_runtime::PezkuwiXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_pezkuwichain_grandpa: bridge_hub_zagros_runtime::BridgePezkuwichainGrandpaConfig {
|
||||
bridge_pezkuwichain_grandpa: pezbridge_hub_zagros_runtime::BridgePezkuwichainGrandpaConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_pezkuwichain_messages: bridge_hub_zagros_runtime::BridgePezkuwichainMessagesConfig {
|
||||
bridge_pezkuwichain_messages: pezbridge_hub_zagros_runtime::BridgePezkuwichainMessagesConfig {
|
||||
owner: Some(Keyring::Bob.to_account_id()),
|
||||
..Default::default()
|
||||
},
|
||||
xcm_over_bridge_hub_pezkuwichain:
|
||||
bridge_hub_zagros_runtime::XcmOverBridgeHubPezkuwichainConfig {
|
||||
pezbridge_hub_zagros_runtime::XcmOverBridgeHubPezkuwichainConfig {
|
||||
opened_bridges: vec![
|
||||
// open AHW -> AHR bridge
|
||||
(
|
||||
@@ -84,7 +84,7 @@ pub fn genesis() -> Storage {
|
||||
],
|
||||
..Default::default()
|
||||
},
|
||||
ethereum_system: bridge_hub_zagros_runtime::EthereumSystemConfig {
|
||||
ethereum_system: pezbridge_hub_zagros_runtime::EthereumSystemConfig {
|
||||
para_id: PARA_ID.into(),
|
||||
asset_hub_para_id: ASSETHUB_PARA_ID.into(),
|
||||
..Default::default()
|
||||
@@ -94,7 +94,7 @@ pub fn genesis() -> Storage {
|
||||
|
||||
build_genesis_storage(
|
||||
&genesis_config,
|
||||
bridge_hub_zagros_runtime::WASM_BINARY
|
||||
pezbridge_hub_zagros_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
|
||||
+14
-14
@@ -15,7 +15,7 @@
|
||||
|
||||
pub mod genesis;
|
||||
|
||||
pub use bridge_hub_zagros_runtime::{
|
||||
pub use pezbridge_hub_zagros_runtime::{
|
||||
self, xcm_config::XcmConfig as BridgeHubZagrosXcmConfig,
|
||||
ExistentialDeposit as BridgeHubZagrosExistentialDeposit,
|
||||
RuntimeOrigin as BridgeHubZagrosRuntimeOrigin,
|
||||
@@ -27,7 +27,7 @@ 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,
|
||||
impl_xcm_helpers_for_teyrchain, impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains,
|
||||
AuraDigestProvider,
|
||||
};
|
||||
|
||||
@@ -36,24 +36,24 @@ decl_test_teyrchains! {
|
||||
pub struct BridgeHubZagros {
|
||||
genesis = genesis::genesis(),
|
||||
on_init = {
|
||||
bridge_hub_zagros_runtime::AuraExt::on_initialize(1);
|
||||
pezbridge_hub_zagros_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = bridge_hub_zagros_runtime,
|
||||
runtime = pezbridge_hub_zagros_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: bridge_hub_zagros_runtime::XcmpQueue,
|
||||
LocationToAccountId: bridge_hub_zagros_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: bridge_hub_zagros_runtime::TeyrchainInfo,
|
||||
XcmpMessageHandler: pezbridge_hub_zagros_runtime::XcmpQueue,
|
||||
LocationToAccountId: pezbridge_hub_zagros_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: pezbridge_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,
|
||||
PezkuwiXcm: pezbridge_hub_zagros_runtime::PezkuwiXcm,
|
||||
Balances: pezbridge_hub_zagros_runtime::Balances,
|
||||
EthereumSystem: pezbridge_hub_zagros_runtime::EthereumSystem,
|
||||
EthereumInboundQueue: pezbridge_hub_zagros_runtime::EthereumInboundQueue,
|
||||
EthereumOutboundQueue: pezbridge_hub_zagros_runtime::EthereumOutboundQueue,
|
||||
EthereumSystemV2: pezbridge_hub_zagros_runtime::EthereumSystemV2,
|
||||
BridgeRelayers: pezbridge_hub_zagros_runtime::BridgeRelayers,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ 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,
|
||||
impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains, AuraDigestProvider,
|
||||
};
|
||||
|
||||
// CollectivesZagros Teyrchain declaration
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ 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,
|
||||
impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains, AuraDigestProvider,
|
||||
};
|
||||
|
||||
// CoretimePezkuwichain Teyrchain declaration
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ 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,
|
||||
impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains, AuraDigestProvider,
|
||||
};
|
||||
|
||||
// CoretimeZagros Teyrchain declaration
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ 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,
|
||||
impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains, AuraDigestProvider,
|
||||
};
|
||||
|
||||
// PeoplePezkuwichain Teyrchain declaration
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ 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,
|
||||
impls::Teyrchain, xcm_pez_emulator::decl_test_teyrchains, AuraDigestProvider,
|
||||
};
|
||||
|
||||
// PeopleZagros Teyrchain declaration
|
||||
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "penpal-emulated-chain"
|
||||
name = "pez-penpal-emulated-chain"
|
||||
version = "0.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
description = "Penpal emulated chain"
|
||||
publish = false
|
||||
documentation = "https://docs.rs/penpal-emulated-chain"
|
||||
documentation = "https://docs.rs/pez-penpal-emulated-chain"
|
||||
repository = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
||||
@@ -25,7 +25,7 @@ xcm = { workspace = true }
|
||||
# Pezcumulus
|
||||
pezcumulus-primitives-core = { workspace = true }
|
||||
emulated-integration-tests-common = { workspace = true }
|
||||
penpal-runtime = { workspace = true }
|
||||
pez-penpal-runtime = { workspace = true }
|
||||
teyrchains-common = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
@@ -33,7 +33,7 @@ runtime-benchmarks = [
|
||||
"pezcumulus-primitives-core/runtime-benchmarks",
|
||||
"emulated-integration-tests-common/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"penpal-runtime/runtime-benchmarks",
|
||||
"pez-penpal-runtime/runtime-benchmarks",
|
||||
"pezsp-keyring/runtime-benchmarks",
|
||||
"teyrchains-common/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
|
||||
+15
-15
@@ -22,12 +22,12 @@ use pezsp_keyring::Sr25519Keyring as Keyring;
|
||||
use emulated_integration_tests_common::{
|
||||
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
|
||||
};
|
||||
use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub};
|
||||
use pez_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 ED: Balance = pez_penpal_runtime::EXISTENTIAL_DEPOSIT;
|
||||
pub const USDT_ED: Balance = 70_000;
|
||||
|
||||
parameter_types! {
|
||||
@@ -36,49 +36,49 @@ parameter_types! {
|
||||
}
|
||||
|
||||
pub fn genesis(para_id: u32) -> Storage {
|
||||
let genesis_config = penpal_runtime::RuntimeGenesisConfig {
|
||||
system: penpal_runtime::SystemConfig::default(),
|
||||
balances: penpal_runtime::BalancesConfig {
|
||||
let genesis_config = pez_penpal_runtime::RuntimeGenesisConfig {
|
||||
system: pez_penpal_runtime::SystemConfig::default(),
|
||||
balances: pez_penpal_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
|
||||
..Default::default()
|
||||
},
|
||||
teyrchain_info: penpal_runtime::TeyrchainInfoConfig {
|
||||
teyrchain_info: pez_penpal_runtime::TeyrchainInfoConfig {
|
||||
teyrchain_id: para_id.into(),
|
||||
..Default::default()
|
||||
},
|
||||
collator_selection: penpal_runtime::CollatorSelectionConfig {
|
||||
collator_selection: pez_penpal_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: penpal_runtime::SessionConfig {
|
||||
session: pez_penpal_runtime::SessionConfig {
|
||||
keys: collators::invulnerables()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
penpal_runtime::SessionKeys { aura }, // session keys
|
||||
pez_penpal_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
..Default::default()
|
||||
},
|
||||
pezkuwi_xcm: penpal_runtime::PezkuwiXcmConfig {
|
||||
pezkuwi_xcm: pez_penpal_runtime::PezkuwiXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
..Default::default()
|
||||
},
|
||||
sudo: penpal_runtime::SudoConfig { key: Some(PenpalSudoAccount::get()) },
|
||||
assets: penpal_runtime::AssetsConfig {
|
||||
sudo: pez_penpal_runtime::SudoConfig { key: Some(PenpalSudoAccount::get()) },
|
||||
assets: pez_penpal_runtime::AssetsConfig {
|
||||
assets: vec![(
|
||||
penpal_runtime::xcm_config::TELEPORTABLE_ASSET_ID,
|
||||
pez_penpal_runtime::xcm_config::TELEPORTABLE_ASSET_ID,
|
||||
PenpalAssetOwner::get(),
|
||||
false,
|
||||
ED,
|
||||
)],
|
||||
..Default::default()
|
||||
},
|
||||
foreign_assets: penpal_runtime::ForeignAssetsConfig {
|
||||
foreign_assets: pez_penpal_runtime::ForeignAssetsConfig {
|
||||
assets: vec![
|
||||
// Relay Native asset representation
|
||||
(RelayLocation::get(), PenpalAssetOwner::get(), true, ED),
|
||||
@@ -94,6 +94,6 @@ pub fn genesis(para_id: u32) -> Storage {
|
||||
|
||||
build_genesis_storage(
|
||||
&genesis_config,
|
||||
penpal_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
|
||||
pez_penpal_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
|
||||
+26
-26
@@ -13,7 +13,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub use penpal_runtime::{
|
||||
pub use pez_penpal_runtime::{
|
||||
self, xcm_config::RelayNetworkId as PenpalRelayNetworkId, ForeignAssetReserveData,
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ use emulated_integration_tests_common::{
|
||||
impl_assets_helpers_for_teyrchain, impl_foreign_assets_helpers_for_teyrchain,
|
||||
impl_xcm_helpers_for_teyrchain,
|
||||
impls::{NetworkId, Teyrchain},
|
||||
xcm_emulator::decl_test_teyrchains,
|
||||
xcm_pez_emulator::decl_test_teyrchains,
|
||||
AuraDigestProvider,
|
||||
};
|
||||
|
||||
@@ -42,51 +42,51 @@ 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(),
|
||||
pez_penpal_runtime::AuraExt::on_initialize(1);
|
||||
pezframe_support::assert_ok!(pez_penpal_runtime::System::set_storage(
|
||||
pez_penpal_runtime::RuntimeOrigin::root(),
|
||||
vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH).encode())],
|
||||
));
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
runtime = pez_penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: penpal_runtime::TeyrchainInfo,
|
||||
XcmpMessageHandler: pez_penpal_runtime::XcmpQueue,
|
||||
LocationToAccountId: pez_penpal_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: pez_penpal_runtime::TeyrchainInfo,
|
||||
MessageOrigin: pezcumulus_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,
|
||||
PezkuwiXcm: pez_penpal_runtime::PezkuwiXcm,
|
||||
Assets: pez_penpal_runtime::Assets,
|
||||
ForeignAssets: pez_penpal_runtime::ForeignAssets,
|
||||
AssetConversion: pez_penpal_runtime::AssetConversion,
|
||||
Balances: pez_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(),
|
||||
pez_penpal_runtime::AuraExt::on_initialize(1);
|
||||
pezframe_support::assert_ok!(pez_penpal_runtime::System::set_storage(
|
||||
pez_penpal_runtime::RuntimeOrigin::root(),
|
||||
vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::ByGenesis(ZAGROS_GENESIS_HASH).encode())],
|
||||
));
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
runtime = pez_penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: penpal_runtime::TeyrchainInfo,
|
||||
XcmpMessageHandler: pez_penpal_runtime::XcmpQueue,
|
||||
LocationToAccountId: pez_penpal_runtime::xcm_config::LocationToAccountId,
|
||||
TeyrchainInfo: pez_penpal_runtime::TeyrchainInfo,
|
||||
MessageOrigin: pezcumulus_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,
|
||||
PezkuwiXcm: pez_penpal_runtime::PezkuwiXcm,
|
||||
Assets: pez_penpal_runtime::Assets,
|
||||
ForeignAssets: pez_penpal_runtime::ForeignAssets,
|
||||
AssetConversion: pez_penpal_runtime::AssetConversion,
|
||||
Balances: pez_penpal_runtime::Balances,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user