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

Enable DOT-over-XCM and Lift Asset Creation Restrictions #1057

Merged
merged 5 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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