From 61c20971d3873dce6920c11ecd18f99072935cef Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Wed, 23 Mar 2022 20:22:23 +0100 Subject: [PATCH] Enable DOT-over-XCM and Lift Asset Creation Restrictions (#1057) * enable DOT-over-XCM and lift asset creation restrictions * no Contains * Remove unused import Co-authored-by: Keith Yeung --- polkadot-parachains/statemint/src/lib.rs | 16 ++-------------- polkadot-parachains/statemint/src/xcm_config.rs | 4 ++-- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/polkadot-parachains/statemint/src/lib.rs b/polkadot-parachains/statemint/src/lib.rs index 566f4bac85..d054cd5f8e 100644 --- a/polkadot-parachains/statemint/src/lib.rs +++ b/polkadot-parachains/statemint/src/lib.rs @@ -44,7 +44,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use constants::{currency::*, fee::WeightToFee}; use frame_support::{ construct_runtime, parameter_types, - traits::{AsEnsureOriginWithArg, Contains, EnsureOneOf, InstanceFilter}, + traits::{AsEnsureOriginWithArg, EnsureOneOf, InstanceFilter}, weights::{DispatchClass, Weight}, PalletId, RuntimeDebug, }; @@ -121,21 +121,9 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } -pub struct BaseFilter; -impl Contains for BaseFilter { - fn contains(c: &Call) -> bool { - // Disable permissionless asset creation. - !matches!( - c, - Call::Assets(pallet_assets::Call::create { .. }) | - Call::Uniques(pallet_uniques::Call::create { .. }) - ) - } -} - // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { - type BaseCallFilter = BaseFilter; + type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; diff --git a/polkadot-parachains/statemint/src/xcm_config.rs b/polkadot-parachains/statemint/src/xcm_config.rs index c5386f1dde..bb4d16b474 100644 --- a/polkadot-parachains/statemint/src/xcm_config.rs +++ b/polkadot-parachains/statemint/src/xcm_config.rs @@ -192,8 +192,8 @@ impl pallet_xcm::Config for Runtime { // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are allowed. type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Nothing; - type XcmReserveTransferFilter = Nothing; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin;