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
@@ -38,7 +38,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates.
pub use frame_support::{
construct_runtime, match_type, parameter_types,
traits::{Everything, IsInVec, Randomness},
traits::{EnsureOneOf, Everything, IsInVec, Randomness},
weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
DispatchClass, IdentityFee, Weight,
@@ -47,7 +47,7 @@ pub use frame_support::{
};
use frame_system::{
limits::{BlockLength, BlockWeights},
EnsureOneOf, EnsureRoot,
EnsureRoot,
};
pub use pallet_balances::Call as BalancesCall;
pub use pallet_timestamp::Call as TimestampCall;
@@ -473,11 +473,8 @@ parameter_types! {
}
/// A majority of the Unit body from Rococo over XCM is our required administration origin.
pub type AdminOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
EnsureXcm<IsMajorityOfBody<RocLocation, UnitBody>>,
>;
pub type AdminOrigin =
EnsureOneOf<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<RocLocation, UnitBody>>>;
impl pallet_assets::Config for Runtime {
type Event = Event;