mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
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:
@@ -44,7 +44,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
|||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{AsEnsureOriginWithArg, Contains, EnsureOneOf, InstanceFilter},
|
traits::{AsEnsureOriginWithArg, EnsureOneOf, InstanceFilter},
|
||||||
weights::{DispatchClass, Weight},
|
weights::{DispatchClass, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
@@ -121,21 +121,9 @@ parameter_types! {
|
|||||||
pub const SS58Prefix: u8 = 0;
|
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.
|
// Configure FRAME pallets to include in runtime.
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
type BaseCallFilter = BaseFilter;
|
type BaseCallFilter = frame_support::traits::Everything;
|
||||||
type BlockWeights = RuntimeBlockWeights;
|
type BlockWeights = RuntimeBlockWeights;
|
||||||
type BlockLength = RuntimeBlockLength;
|
type BlockLength = RuntimeBlockLength;
|
||||||
type AccountId = AccountId;
|
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.
|
// ... but disallow generic XCM execution. As a result only teleports and reserve transfers are allowed.
|
||||||
type XcmExecuteFilter = Nothing;
|
type XcmExecuteFilter = Nothing;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Nothing;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing;
|
type XcmReserveTransferFilter = Everything;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
|
|||||||
Reference in New Issue
Block a user