mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
Council motions for approving treasury proposals (#694)
* Treasury in runtime, generic approve/reject * Add logic for council origin * Add tests. * Configurable number of members in EnsureMembers * Fix grumbles * Fix spelling * Comment
This commit is contained in:
@@ -45,7 +45,7 @@ extern crate safe_mix;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use primitives::traits::{self, CheckEqual, SimpleArithmetic, SimpleBitOps, Zero, One, Bounded,
|
||||
Hash, Member, MaybeDisplay};
|
||||
Hash, Member, MaybeDisplay, EnsureOrigin};
|
||||
use runtime_support::{StorageValue, StorageMap, Parameter};
|
||||
use safe_mix::TripletMix;
|
||||
|
||||
@@ -168,6 +168,14 @@ decl_storage! {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EnsureRoot<AccountId>(::rstd::marker::PhantomData<AccountId>);
|
||||
impl<O: Into<Option<RawOrigin<AccountId>>>, AccountId> EnsureOrigin<O> for EnsureRoot<AccountId> {
|
||||
type Success = ();
|
||||
fn ensure_origin(o: O) -> Result<Self::Success, &'static str> {
|
||||
ensure_root(o)
|
||||
}
|
||||
}
|
||||
|
||||
/// Ensure that the origin `o` represents a signed extrinsic (i.e. transaction).
|
||||
/// Returns `Ok` with the account that signed the extrinsic or an `Err` otherwise.
|
||||
pub fn ensure_signed<OuterOrigin, AccountId>(o: OuterOrigin) -> Result<AccountId, &'static str>
|
||||
|
||||
Reference in New Issue
Block a user