mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Companion for 10379 (EnsureOneOf) (#4405)
* new ensure one of * fmt * Update lib.rs * Update substrate Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -50,13 +50,13 @@ use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use frame_support::{
|
||||
construct_runtime, match_type, parameter_types,
|
||||
traits::{
|
||||
Contains, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing,
|
||||
OnRuntimeUpgrade, PrivilegeCmp,
|
||||
Contains, EnsureOneOf, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
||||
Nothing, OnRuntimeUpgrade, PrivilegeCmp,
|
||||
},
|
||||
weights::Weight,
|
||||
PalletId, RuntimeDebug,
|
||||
};
|
||||
use frame_system::{EnsureOneOf, EnsureRoot};
|
||||
use frame_system::EnsureRoot;
|
||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use pallet_mmr_primitives as mmr;
|
||||
@@ -150,7 +150,6 @@ impl Contains<Call> for BaseFilter {
|
||||
}
|
||||
|
||||
type MoreThanHalfCouncil = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>,
|
||||
>;
|
||||
@@ -193,7 +192,6 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type ScheduleOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>,
|
||||
>;
|
||||
@@ -428,7 +426,6 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
>;
|
||||
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
|
||||
type ForceOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
|
||||
>;
|
||||
@@ -521,7 +518,6 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type SlashCancelOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>,
|
||||
>;
|
||||
@@ -602,7 +598,6 @@ impl pallet_democracy::Config for Runtime {
|
||||
type FastTrackVotingPeriod = FastTrackVotingPeriod;
|
||||
// To cancel a proposal which has been passed, 2/3 of the council must agree to it.
|
||||
type CancellationOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
|
||||
>;
|
||||
@@ -610,7 +605,6 @@ impl pallet_democracy::Config for Runtime {
|
||||
// To cancel a proposal before it has been passed, the technical committee must be unanimous or
|
||||
// Root must agree.
|
||||
type CancelProposalOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>,
|
||||
>;
|
||||
@@ -736,7 +730,6 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type ApproveOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>,
|
||||
>;
|
||||
@@ -1278,7 +1271,6 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type AuctionInitiate = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user