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 <kungfukeith11@gmail.com>
This commit is contained in:
joe petrowski
2022-03-23 20:22:23 +01:00
committed by GitHub
parent d6d1eb7b14
commit f1d3607262
2 changed files with 4 additions and 16 deletions
@@ -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<Call> 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;
@@ -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<XcmConfig>;
type XcmTeleportFilter = Nothing;
type XcmReserveTransferFilter = Nothing;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
type LocationInverter = LocationInverter<Ancestry>;
type Origin = Origin;