diff --git a/runtime/common/src/xcm_configs.rs b/runtime/common/src/xcm_configs.rs index ad47ef8e..436c1dc2 100644 --- a/runtime/common/src/xcm_configs.rs +++ b/runtime/common/src/xcm_configs.rs @@ -70,9 +70,9 @@ where { fn should_execute( origin: &MultiLocation, - message: &mut Xcm, - max_weight: XcmWeight, - weight_credit: &mut XcmWeight, + message: &mut [Instruction], + max_weight: Weight, + weight_credit: &mut Weight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -84,12 +84,11 @@ pub struct DenyReserveTransferToRelayChain; impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, - - message: &mut Xcm, - _max_weight: XcmWeight, - _weight_credit: &mut XcmWeight, + message: &mut [Instruction], + _max_weight: Weight, + _weight_credit: &mut Weight, ) -> Result<(), ()> { - if message.0.iter().any(|inst| { + if message.iter().any(|inst| { matches!( inst, InitiateReserveWithdraw { @@ -108,7 +107,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { // An unexpected reserve transfer has arrived from the Relay Chain. Generally, `IsReserve` // should not allow this, but we just log it here. if matches!(origin, MultiLocation { parents: 1, interior: Here }) - && message.0.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) + && message.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) { log::warn!( target: "xcm::barriers", diff --git a/runtime/crab/src/pallets/polkadot_xcm.rs b/runtime/crab/src/pallets/polkadot_xcm.rs index ba637531..b3ed0165 100644 --- a/runtime/crab/src/pallets/polkadot_xcm.rs +++ b/runtime/crab/src/pallets/polkadot_xcm.rs @@ -36,7 +36,7 @@ pub type LocalAssetTransactor = xcm_builder::CurrencyAdapter< >; frame_support::parameter_types! { - pub const RelayNetwork: xcm::latest::prelude::NetworkId = xcm::latest::prelude::NetworkId::Kusama; + pub const RelayNetwork: Option = Some(xcm::latest::NetworkId::Kusama); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -77,27 +77,36 @@ pub type Barrier = darwinia_common_runtime::xcm_configs::DenyThenTry< darwinia_common_runtime::xcm_configs::DenyReserveTransferToRelayChain, ( xcm_builder::TakeWeightCredit, - xcm_builder::AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - xcm_builder::AllowUnpaidExecutionFrom< - darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + WithComputedOrigin< + ( + xcm_builder::AllowTopLevelPaidExecutionFrom, + // Parent and its exec plurality get free execution + xcm_builder::AllowUnpaidExecutionFrom< + darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + >, + // Subscriptions for version tracking are OK. + xcm_builder::AllowSubscriptionsFrom< + darwinia_common_runtime::xcm_configs::ParentOrSiblings, + >, + ), + UniversalLocation, + ConstU32<8>, >, // Expected responses are OK. xcm_builder::AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - xcm_builder::AllowSubscriptionsFrom, ), >; frame_support::parameter_types! { + pub const MaxAssetsIntoHolding: u32 = 64; pub const MaxInstructions: u32 = 100; pub AnchoringSelfReserve: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::MultiLocation::new( 0, xcm::latest::prelude::X1(xcm::latest::prelude::PalletInstance(::index() as u8)) ); + pub UniversalLocation: xcm::latest::prelude::InteriorMultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub Ancestry: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); - pub UnitWeightCost: u64 = 1_000_000_000; + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); } pub struct ToTreasury; @@ -122,17 +131,23 @@ impl xcm_builder::TakeRevenue for ToTreasury { pub struct XcmExecutorConfig; impl xcm_executor::Config for XcmExecutorConfig { type AssetClaims = PolkadotXcm; + type AssetExchanger = (); + type AssetLocker = (); // How to withdraw and deposit an asset. type AssetTransactor = LocalAssetTransactor; type AssetTrap = PolkadotXcm; type Barrier = Barrier; + type CallDispatcher = RuntimeCall; + type FeeManager = (); type IsReserve = xcm_builder::NativeAsset; type IsTeleporter = (); - // Teleporting is disabled. - type LocationInverter = xcm_builder::LocationInverter; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type MessageExporter = (); type OriginConverter = XcmOriginToTransactDispatchOrigin; + type PalletInstancesInfo = AllPalletsWithSystem; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; + type SafeCallFilter = Everything; type SubscriptionService = PolkadotXcm; type Trader = xcm_configs::LocalAssetTrader< frame_support::weights::ConstantMultiplier< @@ -145,6 +160,9 @@ impl xcm_executor::Config for XcmExecutorConfig { DealWithFees, ToTreasury, >; + type UniversalAliases = Nothing; + // Teleporting is disabled. + type UniversalLocation = UniversalLocation; type Weigher = xcm_builder::FixedWeightBounds; type XcmSender = XcmRouter; } @@ -156,21 +174,34 @@ pub type LocalOriginToLocation = /// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - type LocationInverter = xcm_builder::LocationInverter; + type MaxLockers = ConstU32<8>; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SovereignAccountOf = LocationToAccountId; + type TrustedLockers = (); + type UniversalLocation = UniversalLocation; type Weigher = xcm_builder::FixedWeightBounds; + type WeightInfo = pallet_xcm::TestWeightInfo; type XcmExecuteFilter = frame_support::traits::Everything; type XcmExecutor = xcm_executor::XcmExecutor; type XcmReserveTransferFilter = frame_support::traits::Everything; diff --git a/runtime/crab/src/pallets/xcmp_queue.rs b/runtime/crab/src/pallets/xcmp_queue.rs index f3f8d642..9931ff3c 100644 --- a/runtime/crab/src/pallets/xcmp_queue.rs +++ b/runtime/crab/src/pallets/xcmp_queue.rs @@ -28,4 +28,5 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = (); type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type XcmExecutor = xcm_executor::XcmExecutor; + type PriceForSiblingDelivery = (); } diff --git a/runtime/darwinia/src/pallets/polkadot_xcm.rs b/runtime/darwinia/src/pallets/polkadot_xcm.rs index 7eb1fbef..98cb926c 100644 --- a/runtime/darwinia/src/pallets/polkadot_xcm.rs +++ b/runtime/darwinia/src/pallets/polkadot_xcm.rs @@ -36,7 +36,7 @@ pub type LocalAssetTransactor = xcm_builder::CurrencyAdapter< >; frame_support::parameter_types! { - pub const RelayNetwork: xcm::latest::prelude::NetworkId = xcm::latest::prelude::NetworkId::Polkadot; + pub const RelayNetwork: Option = Some(xcm::latest::NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -77,10 +77,20 @@ pub type Barrier = darwinia_common_runtime::xcm_configs::DenyThenTry< darwinia_common_runtime::xcm_configs::DenyReserveTransferToRelayChain, ( xcm_builder::TakeWeightCredit, - xcm_builder::AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - xcm_builder::AllowUnpaidExecutionFrom< - darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + WithComputedOrigin< + ( + xcm_builder::AllowTopLevelPaidExecutionFrom, + // Parent and its exec plurality get free execution + xcm_builder::AllowUnpaidExecutionFrom< + darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + >, + // Subscriptions for version tracking are OK. + xcm_builder::AllowSubscriptionsFrom< + darwinia_common_runtime::xcm_configs::ParentOrSiblings, + >, + ), + UniversalLocation, + ConstU32<8>, >, // Expected responses are OK. xcm_builder::AllowKnownQueryResponses, @@ -90,14 +100,15 @@ pub type Barrier = darwinia_common_runtime::xcm_configs::DenyThenTry< >; frame_support::parameter_types! { + pub const MaxAssetsIntoHolding: u32 = 64; pub const MaxInstructions: u32 = 100; pub AnchoringSelfReserve: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::MultiLocation::new( 0, xcm::latest::prelude::X1(xcm::latest::prelude::PalletInstance(::index() as u8)) ); + pub UniversalLocation: xcm::latest::prelude::InteriorMultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub Ancestry: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); - pub UnitWeightCost: u64 = 1_000_000_000; + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); } pub struct ToTreasury; @@ -129,7 +140,7 @@ impl xcm_executor::Config for XcmExecutorConfig { type IsReserve = xcm_builder::NativeAsset; type IsTeleporter = (); // Teleporting is disabled. - type LocationInverter = xcm_builder::LocationInverter; + type UniversalLocation = UniversalLocation; type OriginConverter = XcmOriginToTransactDispatchOrigin; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; @@ -147,6 +158,15 @@ impl xcm_executor::Config for XcmExecutorConfig { >; type Weigher = xcm_builder::FixedWeightBounds; type XcmSender = XcmRouter; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -156,16 +176,21 @@ pub type LocalOriginToLocation = /// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - type LocationInverter = xcm_builder::LocationInverter; + type UniversalLocation = UniversalLocation; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; @@ -178,6 +203,14 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = frame_support::traits::Nothing; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/runtime/darwinia/src/pallets/xcmp_queue.rs b/runtime/darwinia/src/pallets/xcmp_queue.rs index f3f8d642..9931ff3c 100644 --- a/runtime/darwinia/src/pallets/xcmp_queue.rs +++ b/runtime/darwinia/src/pallets/xcmp_queue.rs @@ -28,4 +28,5 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = (); type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type XcmExecutor = xcm_executor::XcmExecutor; + type PriceForSiblingDelivery = (); } diff --git a/runtime/pangolin/src/pallets/polkadot_xcm.rs b/runtime/pangolin/src/pallets/polkadot_xcm.rs index 4aec5bbe..0bcc91f4 100644 --- a/runtime/pangolin/src/pallets/polkadot_xcm.rs +++ b/runtime/pangolin/src/pallets/polkadot_xcm.rs @@ -36,7 +36,7 @@ pub type LocalAssetTransactor = xcm_builder::CurrencyAdapter< >; frame_support::parameter_types! { - pub const RelayNetwork: xcm::latest::prelude::NetworkId = xcm::latest::prelude::NetworkId::Any; + pub const RelayNetwork: Option = None; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -77,10 +77,20 @@ pub type Barrier = darwinia_common_runtime::xcm_configs::DenyThenTry< darwinia_common_runtime::xcm_configs::DenyReserveTransferToRelayChain, ( xcm_builder::TakeWeightCredit, - xcm_builder::AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - xcm_builder::AllowUnpaidExecutionFrom< - darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + WithComputedOrigin< + ( + xcm_builder::AllowTopLevelPaidExecutionFrom, + // Parent and its exec plurality get free execution + xcm_builder::AllowUnpaidExecutionFrom< + darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + >, + // Subscriptions for version tracking are OK. + xcm_builder::AllowSubscriptionsFrom< + darwinia_common_runtime::xcm_configs::ParentOrSiblings, + >, + ), + UniversalLocation, + ConstU32<8>, >, // Expected responses are OK. xcm_builder::AllowKnownQueryResponses, @@ -90,14 +100,15 @@ pub type Barrier = darwinia_common_runtime::xcm_configs::DenyThenTry< >; frame_support::parameter_types! { + pub const MaxAssetsIntoHolding: u32 = 64; pub const MaxInstructions: u32 = 100; pub AnchoringSelfReserve: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::MultiLocation::new( 0, xcm::latest::prelude::X1(xcm::latest::prelude::PalletInstance(::index() as u8)) ); + pub UniversalLocation: xcm::latest::prelude::InteriorMultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub Ancestry: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); - pub UnitWeightCost: u64 = 1_000_000_000; + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); } pub struct ToTreasury; @@ -129,7 +140,7 @@ impl xcm_executor::Config for XcmExecutorConfig { type IsReserve = xcm_builder::NativeAsset; type IsTeleporter = (); // Teleporting is disabled. - type LocationInverter = xcm_builder::LocationInverter; + type UniversalLocation = UniversalLocation; type OriginConverter = XcmOriginToTransactDispatchOrigin; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; @@ -147,6 +158,15 @@ impl xcm_executor::Config for XcmExecutorConfig { >; type Weigher = xcm_builder::FixedWeightBounds; type XcmSender = XcmRouter; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -156,16 +176,21 @@ pub type LocalOriginToLocation = /// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - type LocationInverter = xcm_builder::LocationInverter; + type UniversalLocation = UniversalLocation; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; @@ -178,6 +203,14 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = frame_support::traits::Nothing; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/runtime/pangolin/src/pallets/xcmp_queue.rs b/runtime/pangolin/src/pallets/xcmp_queue.rs index f3f8d642..9931ff3c 100644 --- a/runtime/pangolin/src/pallets/xcmp_queue.rs +++ b/runtime/pangolin/src/pallets/xcmp_queue.rs @@ -28,4 +28,5 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = (); type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type XcmExecutor = xcm_executor::XcmExecutor; + type PriceForSiblingDelivery = (); } diff --git a/runtime/pangoro/src/pallets/polkadot_xcm.rs b/runtime/pangoro/src/pallets/polkadot_xcm.rs index 4aec5bbe..0bcc91f4 100644 --- a/runtime/pangoro/src/pallets/polkadot_xcm.rs +++ b/runtime/pangoro/src/pallets/polkadot_xcm.rs @@ -36,7 +36,7 @@ pub type LocalAssetTransactor = xcm_builder::CurrencyAdapter< >; frame_support::parameter_types! { - pub const RelayNetwork: xcm::latest::prelude::NetworkId = xcm::latest::prelude::NetworkId::Any; + pub const RelayNetwork: Option = None; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -77,10 +77,20 @@ pub type Barrier = darwinia_common_runtime::xcm_configs::DenyThenTry< darwinia_common_runtime::xcm_configs::DenyReserveTransferToRelayChain, ( xcm_builder::TakeWeightCredit, - xcm_builder::AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - xcm_builder::AllowUnpaidExecutionFrom< - darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + WithComputedOrigin< + ( + xcm_builder::AllowTopLevelPaidExecutionFrom, + // Parent and its exec plurality get free execution + xcm_builder::AllowUnpaidExecutionFrom< + darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality, + >, + // Subscriptions for version tracking are OK. + xcm_builder::AllowSubscriptionsFrom< + darwinia_common_runtime::xcm_configs::ParentOrSiblings, + >, + ), + UniversalLocation, + ConstU32<8>, >, // Expected responses are OK. xcm_builder::AllowKnownQueryResponses, @@ -90,14 +100,15 @@ pub type Barrier = darwinia_common_runtime::xcm_configs::DenyThenTry< >; frame_support::parameter_types! { + pub const MaxAssetsIntoHolding: u32 = 64; pub const MaxInstructions: u32 = 100; pub AnchoringSelfReserve: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::MultiLocation::new( 0, xcm::latest::prelude::X1(xcm::latest::prelude::PalletInstance(::index() as u8)) ); + pub UniversalLocation: xcm::latest::prelude::InteriorMultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub Ancestry: xcm::latest::prelude::MultiLocation = xcm::latest::prelude::Parachain(ParachainInfo::parachain_id().into()).into(); - pub UnitWeightCost: u64 = 1_000_000_000; + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); } pub struct ToTreasury; @@ -129,7 +140,7 @@ impl xcm_executor::Config for XcmExecutorConfig { type IsReserve = xcm_builder::NativeAsset; type IsTeleporter = (); // Teleporting is disabled. - type LocationInverter = xcm_builder::LocationInverter; + type UniversalLocation = UniversalLocation; type OriginConverter = XcmOriginToTransactDispatchOrigin; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; @@ -147,6 +158,15 @@ impl xcm_executor::Config for XcmExecutorConfig { >; type Weigher = xcm_builder::FixedWeightBounds; type XcmSender = XcmRouter; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -156,16 +176,21 @@ pub type LocalOriginToLocation = /// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - type LocationInverter = xcm_builder::LocationInverter; + type UniversalLocation = UniversalLocation; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; @@ -178,6 +203,14 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = frame_support::traits::Nothing; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/runtime/pangoro/src/pallets/xcmp_queue.rs b/runtime/pangoro/src/pallets/xcmp_queue.rs index f3f8d642..9931ff3c 100644 --- a/runtime/pangoro/src/pallets/xcmp_queue.rs +++ b/runtime/pangoro/src/pallets/xcmp_queue.rs @@ -28,4 +28,5 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = (); type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type XcmExecutor = xcm_executor::XcmExecutor; + type PriceForSiblingDelivery = (); }