diff --git a/parachain/runtime/kintsugi/src/lib.rs b/parachain/runtime/kintsugi/src/lib.rs index 1459b5d45c..a85792464f 100644 --- a/parachain/runtime/kintsugi/src/lib.rs +++ b/parachain/runtime/kintsugi/src/lib.rs @@ -13,6 +13,7 @@ use codec::Encode; use currency::Amount; use frame_support::{ dispatch::{DispatchError, DispatchResult}, + match_type, traits::{ Contains, Currency as PalletCurrency, EnsureOneOf, EnsureOrigin, EqualPrivilegeOnly, ExistenceRequirement, FindAuthor, Imbalance, OnUnbalanced, @@ -904,6 +905,17 @@ impl Convert for AccountIdToMultiLocation { } } +match_type! { + pub type ParentOrParachains: impl Contains = { + // Kusama + MultiLocation { parents: 1, interior: Here } | + // Karura + MultiLocation { parents: 1, interior: X1(Parachain(2000)) } | + // Moonriver + MultiLocation { parents: 1, interior: X1(Parachain(2023)) } + }; +} + impl orml_xtokens::Config for Runtime { type Event = Event; type Balance = Balance; @@ -917,7 +929,7 @@ impl orml_xtokens::Config for Runtime { type LocationInverter = ::LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type MultiLocationsFilter = ParentOrParachains; type ReserveProvider = AbsoluteReserveProvider; }