Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Enable DOT-over-XCM and Lift Asset Creation Restrictions (#1057)
Browse files Browse the repository at this point in the history
* enable DOT-over-XCM and lift asset creation restrictions

* no Contains

* Remove unused import

Co-authored-by: Keith Yeung <[email protected]>
  • Loading branch information
joepetrowski and KiChjang authored Mar 23, 2022
1 parent 571b20f commit 61c2097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
16 changes: 2 additions & 14 deletions polkadot-parachains/statemint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions polkadot-parachains/statemint/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 61c2097

Please sign in to comment.