diff --git a/integration-tests/src/chains/pop_network/mod.rs b/integration-tests/src/chains/pop_network/mod.rs index ee8e4731..bec90394 100644 --- a/integration-tests/src/chains/pop_network/mod.rs +++ b/integration-tests/src/chains/pop_network/mod.rs @@ -18,7 +18,7 @@ decl_test_parachains! { runtime = pop_runtime_devnet, core = { XcmpMessageHandler: pop_runtime_devnet::XcmpQueue, - LocationToAccountId: pop_runtime_devnet::xcm_config::LocationToAccountId, + LocationToAccountId: pop_runtime_devnet::config::xcm::LocationToAccountId, ParachainInfo: pop_runtime_devnet::ParachainInfo, MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 6ef2b235..31e9860b 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -23,7 +23,7 @@ use frame_support::{ use polkadot_runtime_parachains::assigner_on_demand; use pop_runtime_common::Balance; use pop_runtime_devnet as pop_runtime; -use pop_runtime_devnet::xcm_config::XcmConfig as PopNetworkXcmConfig; +use pop_runtime_devnet::config::xcm::XcmConfig as PopNetworkXcmConfig; use rococo_runtime::xcm_config::XcmConfig as RococoXcmConfig; use sp_core::Encode; use xcm::prelude::*; diff --git a/runtime/devnet/src/assets_config.rs b/runtime/devnet/src/config/assets.rs similarity index 100% rename from runtime/devnet/src/assets_config.rs rename to runtime/devnet/src/config/assets.rs diff --git a/runtime/devnet/src/contracts_config.rs b/runtime/devnet/src/config/contracts.rs similarity index 100% rename from runtime/devnet/src/contracts_config.rs rename to runtime/devnet/src/config/contracts.rs diff --git a/runtime/devnet/src/config/mod.rs b/runtime/devnet/src/config/mod.rs new file mode 100644 index 00000000..a3a64c92 --- /dev/null +++ b/runtime/devnet/src/config/mod.rs @@ -0,0 +1,5 @@ +mod assets; +mod contracts; +mod proxy; +// Public due to integration tests crate. +pub mod xcm; diff --git a/runtime/devnet/src/proxy_config.rs b/runtime/devnet/src/config/proxy.rs similarity index 97% rename from runtime/devnet/src/proxy_config.rs rename to runtime/devnet/src/config/proxy.rs index fad05383..a4fd479a 100644 --- a/runtime/devnet/src/proxy_config.rs +++ b/runtime/devnet/src/config/proxy.rs @@ -1,11 +1,11 @@ -use crate::{assets_config::TrustBackedAssetsCall, Balances, Runtime, RuntimeCall, RuntimeEvent}; -use sp_runtime::traits::BlakeTwo256; - +use super::assets::TrustBackedAssetsCall; +use crate::{Balances, Runtime, RuntimeCall, RuntimeEvent}; use frame_support::traits::InstanceFilter; use pop_runtime_common::proxy::{ AnnouncementDepositBase, AnnouncementDepositFactor, MaxPending, MaxProxies, ProxyDepositBase, ProxyDepositFactor, ProxyType, }; +use sp_runtime::traits::BlakeTwo256; impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { diff --git a/runtime/devnet/src/xcm_config.rs b/runtime/devnet/src/config/xcm.rs similarity index 99% rename from runtime/devnet/src/xcm_config.rs rename to runtime/devnet/src/config/xcm.rs index ff6d6136..a210f7a4 100644 --- a/runtime/devnet/src/xcm_config.rs +++ b/runtime/devnet/src/config/xcm.rs @@ -1,4 +1,4 @@ -use super::{ +use crate::{ AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index 95af3a5f..ffca8a12 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -6,12 +6,10 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -mod assets_config; -mod contracts_config; mod extensions; -mod proxy_config; mod weights; -pub mod xcm_config; +// Public due to integration tests crate. +pub mod config; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; @@ -30,6 +28,7 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use config::xcm::{RelayLocation, XcmOriginToTransactDispatchOrigin}; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ construct_runtime, derive_impl, @@ -60,7 +59,6 @@ pub use pop_runtime_common::{ RELAY_CHAIN_SLOT_DURATION_MILLIS, SLOT_DURATION, UNINCLUDED_SEGMENT_CAPACITY, UNIT, }; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{RelayLocation, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -433,7 +431,7 @@ impl pallet_message_queue::Config for Runtime { #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = xcm_builder::ProcessXcmMessage< AggregateMessageOrigin, - xcm_executor::XcmExecutor, + xcm_executor::XcmExecutor, RuntimeCall, >; type Size = u32; diff --git a/runtime/testnet/src/assets_config.rs b/runtime/testnet/src/config/assets.rs similarity index 100% rename from runtime/testnet/src/assets_config.rs rename to runtime/testnet/src/config/assets.rs diff --git a/runtime/testnet/src/contracts_config.rs b/runtime/testnet/src/config/contracts.rs similarity index 100% rename from runtime/testnet/src/contracts_config.rs rename to runtime/testnet/src/config/contracts.rs diff --git a/runtime/testnet/src/config/mod.rs b/runtime/testnet/src/config/mod.rs new file mode 100644 index 00000000..a3a64c92 --- /dev/null +++ b/runtime/testnet/src/config/mod.rs @@ -0,0 +1,5 @@ +mod assets; +mod contracts; +mod proxy; +// Public due to integration tests crate. +pub mod xcm; diff --git a/runtime/testnet/src/proxy_config.rs b/runtime/testnet/src/config/proxy.rs similarity index 97% rename from runtime/testnet/src/proxy_config.rs rename to runtime/testnet/src/config/proxy.rs index fad05383..a4fd479a 100644 --- a/runtime/testnet/src/proxy_config.rs +++ b/runtime/testnet/src/config/proxy.rs @@ -1,11 +1,11 @@ -use crate::{assets_config::TrustBackedAssetsCall, Balances, Runtime, RuntimeCall, RuntimeEvent}; -use sp_runtime::traits::BlakeTwo256; - +use super::assets::TrustBackedAssetsCall; +use crate::{Balances, Runtime, RuntimeCall, RuntimeEvent}; use frame_support::traits::InstanceFilter; use pop_runtime_common::proxy::{ AnnouncementDepositBase, AnnouncementDepositFactor, MaxPending, MaxProxies, ProxyDepositBase, ProxyDepositFactor, ProxyType, }; +use sp_runtime::traits::BlakeTwo256; impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { diff --git a/runtime/testnet/src/xcm_config.rs b/runtime/testnet/src/config/xcm.rs similarity index 99% rename from runtime/testnet/src/xcm_config.rs rename to runtime/testnet/src/config/xcm.rs index ff6d6136..a210f7a4 100644 --- a/runtime/testnet/src/xcm_config.rs +++ b/runtime/testnet/src/config/xcm.rs @@ -1,4 +1,4 @@ -use super::{ +use crate::{ AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index 95af3a5f..37f378f7 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -6,12 +6,9 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -mod assets_config; -mod contracts_config; +mod config; mod extensions; -mod proxy_config; mod weights; -pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; @@ -30,6 +27,7 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use config::xcm::{RelayLocation, XcmOriginToTransactDispatchOrigin}; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ construct_runtime, derive_impl, @@ -60,7 +58,6 @@ pub use pop_runtime_common::{ RELAY_CHAIN_SLOT_DURATION_MILLIS, SLOT_DURATION, UNINCLUDED_SEGMENT_CAPACITY, UNIT, }; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{RelayLocation, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -433,7 +430,7 @@ impl pallet_message_queue::Config for Runtime { #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = xcm_builder::ProcessXcmMessage< AggregateMessageOrigin, - xcm_executor::XcmExecutor, + xcm_executor::XcmExecutor, RuntimeCall, >; type Size = u32;