Companion for #10379 (EnsureOneOf) (#810)

* new ensure one of

* Update Cargo.lock

* Update SUbstrate & Polkadot

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Shawn Tabrizi
2021-12-01 19:06:50 -04:00
committed by GitHub
parent 3b6822d6ed
commit 17cad2efc8
4 changed files with 251 additions and 266 deletions
+6 -12
View File
@@ -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::{EnsureOneOf, Everything, InstanceFilter, Nothing},
weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
DispatchClass, IdentityFee, Weight,
@@ -52,7 +52,7 @@ use frame_support::{
};
use frame_system::{
limits::{BlockLength, BlockWeights},
EnsureOneOf, EnsureRoot,
EnsureRoot,
};
pub use parachains_common as common;
use parachains_common::{
@@ -224,11 +224,8 @@ parameter_types! {
}
/// We allow root and the Relay Chain council to execute privileged asset operations.
pub type AssetsForceOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>,
>;
pub type AssetsForceOrigin =
EnsureOneOf<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
impl pallet_assets::Config for Runtime {
type Event = Event;
@@ -643,11 +640,8 @@ parameter_types! {
}
/// We allow root and the Relay Chain council to execute privileged collator selection operations.
pub type CollatorSelectionUpdateOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>,
>;
pub type CollatorSelectionUpdateOrigin =
EnsureOneOf<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
impl pallet_collator_selection::Config for Runtime {
type Event = Event;