mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 04:31:08 +00:00
Move EnsureOneOf into the dispatch.rs, make an interface more general (#10379)
* move EnsureOneOf into the dispatch.rs, make an interface more general * Update frame/support/src/traits/dispatch.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -21,8 +21,10 @@ use super::*;
|
||||
use crate as pallet_identity;
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
use frame_support::{assert_noop, assert_ok, ord_parameter_types, parameter_types, BoundedVec};
|
||||
use frame_system::{EnsureOneOf, EnsureRoot, EnsureSignedBy};
|
||||
use frame_support::{
|
||||
assert_noop, assert_ok, ord_parameter_types, parameter_types, traits::EnsureOneOf, BoundedVec,
|
||||
};
|
||||
use frame_system::{EnsureRoot, EnsureSignedBy};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
testing::Header,
|
||||
@@ -100,8 +102,8 @@ ord_parameter_types! {
|
||||
pub const One: u64 = 1;
|
||||
pub const Two: u64 = 2;
|
||||
}
|
||||
type EnsureOneOrRoot = EnsureOneOf<u64, EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
|
||||
type EnsureTwoOrRoot = EnsureOneOf<u64, EnsureRoot<u64>, EnsureSignedBy<Two, u64>>;
|
||||
type EnsureOneOrRoot = EnsureOneOf<EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
|
||||
type EnsureTwoOrRoot = EnsureOneOf<EnsureRoot<u64>, EnsureSignedBy<Two, u64>>;
|
||||
impl pallet_identity::Config for Test {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
|
||||
Reference in New Issue
Block a user