mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 13:37:57 +00:00
disable permissionless asset creation for Statemint (#669)
* disable permissionless asset creation for Statemint * cargo fmt * fix import and call format
This commit is contained in:
@@ -43,7 +43,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use constants::{currency::*, fee::WeightToFee};
|
||||
use frame_support::{
|
||||
construct_runtime, match_type, parameter_types,
|
||||
traits::{Everything, InstanceFilter, Nothing},
|
||||
traits::{Contains, Everything, InstanceFilter, Nothing},
|
||||
weights::{
|
||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
||||
DispatchClass, IdentityFee, Weight,
|
||||
@@ -127,9 +127,21 @@ 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 = frame_support::traits::Everything;
|
||||
type BaseCallFilter = BaseFilter;
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
type AccountId = AccountId;
|
||||
|
||||
Reference in New Issue
Block a user