mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
remove stale polkadot call filter (#5969)
* Remove stale polkadot call filter * fix build * really fix it * unused import * Fix Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -52,7 +52,7 @@ use frame_election_provider_support::{
|
|||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
ConstU32, Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
||||||
PrivilegeCmp,
|
PrivilegeCmp,
|
||||||
},
|
},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
@@ -142,14 +142,6 @@ pub fn native_version() -> NativeVersion {
|
|||||||
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// We currently allow all calls.
|
|
||||||
pub struct BaseFilter;
|
|
||||||
impl Contains<Call> for BaseFilter {
|
|
||||||
fn contains(_c: &Call) -> bool {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type MoreThanHalfCouncil = EitherOfDiverse<
|
type MoreThanHalfCouncil = EitherOfDiverse<
|
||||||
EnsureRoot<AccountId>,
|
EnsureRoot<AccountId>,
|
||||||
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
|
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
|
||||||
@@ -161,7 +153,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
type BaseCallFilter = BaseFilter;
|
type BaseCallFilter = frame_support::traits::Everything;
|
||||||
type BlockWeights = BlockWeights;
|
type BlockWeights = BlockWeights;
|
||||||
type BlockLength = BlockLength;
|
type BlockLength = BlockLength;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
|
|||||||
@@ -40,10 +40,7 @@ use beefy_primitives::crypto::AuthorityId as BeefyId;
|
|||||||
use frame_election_provider_support::{generate_solution_type, onchain, SequentialPhragmen};
|
use frame_election_provider_support::{generate_solution_type, onchain, SequentialPhragmen};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{
|
traits::{EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp},
|
||||||
Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
|
||||||
PrivilegeCmp,
|
|
||||||
},
|
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
@@ -135,62 +132,6 @@ pub fn native_version() -> NativeVersion {
|
|||||||
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct BaseFilter;
|
|
||||||
impl Contains<Call> for BaseFilter {
|
|
||||||
fn contains(call: &Call) -> bool {
|
|
||||||
match call {
|
|
||||||
// These modules are all allowed to be called by transactions:
|
|
||||||
Call::Democracy(_) |
|
|
||||||
Call::Council(_) |
|
|
||||||
Call::TechnicalCommittee(_) |
|
|
||||||
Call::TechnicalMembership(_) |
|
|
||||||
Call::Treasury(_) |
|
|
||||||
Call::PhragmenElection(_) |
|
|
||||||
Call::System(_) |
|
|
||||||
Call::Scheduler(_) |
|
|
||||||
Call::Preimage(_) |
|
|
||||||
Call::Indices(_) |
|
|
||||||
Call::Babe(_) |
|
|
||||||
Call::Timestamp(_) |
|
|
||||||
Call::Balances(_) |
|
|
||||||
Call::Authorship(_) |
|
|
||||||
Call::Staking(_) |
|
|
||||||
Call::Session(_) |
|
|
||||||
Call::Grandpa(_) |
|
|
||||||
Call::ImOnline(_) |
|
|
||||||
Call::Utility(_) |
|
|
||||||
Call::Claims(_) |
|
|
||||||
Call::Vesting(_) |
|
|
||||||
Call::Identity(_) |
|
|
||||||
Call::Proxy(_) |
|
|
||||||
Call::Multisig(_) |
|
|
||||||
Call::Bounties(_) |
|
|
||||||
Call::ChildBounties(_) |
|
|
||||||
Call::Tips(_) |
|
|
||||||
Call::ElectionProviderMultiPhase(_) |
|
|
||||||
Call::Configuration(_) |
|
|
||||||
Call::ParasShared(_) |
|
|
||||||
Call::ParaInclusion(_) |
|
|
||||||
Call::Paras(_) |
|
|
||||||
Call::Initializer(_) |
|
|
||||||
Call::ParaInherent(_) |
|
|
||||||
Call::ParasDisputes(_) |
|
|
||||||
Call::Dmp(_) |
|
|
||||||
Call::Ump(_) |
|
|
||||||
Call::Hrmp(_) |
|
|
||||||
Call::Slots(_) |
|
|
||||||
Call::Registrar(_) |
|
|
||||||
Call::Auctions(_) |
|
|
||||||
Call::Crowdloan(_) |
|
|
||||||
Call::VoterList(_) |
|
|
||||||
Call::XcmPallet(_) |
|
|
||||||
Call::NominationPools(_) => true,
|
|
||||||
// All pallets are allowed, but exhaustive match is defensive
|
|
||||||
// in the case of adding new pallets.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type MoreThanHalfCouncil = EitherOfDiverse<
|
type MoreThanHalfCouncil = EitherOfDiverse<
|
||||||
EnsureRoot<AccountId>,
|
EnsureRoot<AccountId>,
|
||||||
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
|
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
|
||||||
@@ -202,7 +143,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
type BaseCallFilter = BaseFilter;
|
type BaseCallFilter = frame_support::traits::Everything;
|
||||||
type BlockWeights = BlockWeights;
|
type BlockWeights = BlockWeights;
|
||||||
type BlockLength = BlockLength;
|
type BlockLength = BlockLength;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use beefy_primitives::crypto::AuthorityId as BeefyId;
|
|||||||
use frame_election_provider_support::{onchain, SequentialPhragmen};
|
use frame_election_provider_support::{onchain, SequentialPhragmen};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{ConstU32, Contains, InstanceFilter, KeyOwnerProofSystem},
|
traits::{ConstU32, InstanceFilter, KeyOwnerProofSystem},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
@@ -129,21 +129,13 @@ pub fn native_version() -> NativeVersion {
|
|||||||
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Allow everything.
|
|
||||||
pub struct BaseFilter;
|
|
||||||
impl Contains<Call> for BaseFilter {
|
|
||||||
fn contains(_: &Call) -> bool {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const Version: RuntimeVersion = VERSION;
|
pub const Version: RuntimeVersion = VERSION;
|
||||||
pub const SS58Prefix: u8 = 42;
|
pub const SS58Prefix: u8 = 42;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
type BaseCallFilter = BaseFilter;
|
type BaseCallFilter = frame_support::traits::Everything;
|
||||||
type BlockWeights = BlockWeights;
|
type BlockWeights = BlockWeights;
|
||||||
type BlockLength = BlockLength;
|
type BlockLength = BlockLength;
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
|
|||||||
Reference in New Issue
Block a user