diff --git a/runtime/mainnet/src/config/xcm.rs b/runtime/mainnet/src/config/xcm.rs index 8c7597629..f2d9bbb61 100644 --- a/runtime/mainnet/src/config/xcm.rs +++ b/runtime/mainnet/src/config/xcm.rs @@ -13,9 +13,7 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - xcm_config::{ - AllSiblingSystemParachains, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, - }, + xcm_config::ParentRelayOrSiblingParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; @@ -156,11 +154,6 @@ impl> Contains<(Location, Vec)> for NativeAssetFrom { /// Combinations of (Asset, Location) pairs which we trust as reserves. pub type TrustedReserves = NativeAssetFrom; -/// Locations that will not be charged fees in the executor, -/// either execution or delivery. -/// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = (RelayOrOtherSystemParachains,); - parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); @@ -179,8 +172,9 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type Barrier = Barrier; type CallDispatcher = RuntimeCall; + // No locations have waived fees. type FeeManager = XcmFeeManagerFromComponents< - WaivedLocations, + (), SendXcmFeeToAccount, >; type HrmpChannelAcceptedHandler = (); @@ -278,6 +272,8 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { mod tests { use std::any::TypeId; + use xcm_executor::traits::{FeeManager, FeeReason}; + use super::*; mod reserves_config { @@ -563,7 +559,7 @@ mod tests { TypeId::of::<::FeeManager>(), TypeId::of::< XcmFeeManagerFromComponents< - WaivedLocations, + (), SendXcmFeeToAccount< ::AssetTransactor, TreasuryAccount, @@ -573,6 +569,26 @@ mod tests { ); } + #[test] + fn no_locations_are_waived() { + let locations = [ + Location::here(), + Location::parent(), + Location::new(1, [Parachain(1000)]), + Location::new(1, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)]), + Location::new( + 1, + [Parachain(1000), AccountId32 { network: None, id: Default::default() }], + ), + ]; + for location in locations { + assert!(!<::FeeManager>::is_waived( + Some(&location), + FeeReason::TransferReserveAsset + )); + } + } + #[test] fn hrmp_accepted_handler_is_disabled() { assert_eq!(