mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
Make priviledged functions explicity use origin (#3045)
* Make priviledged functions explicity use `origin` * Fix typo in docs * Fix more tests * Remove `root` pathway, add semicolons
This commit is contained in:
committed by
Bastian Köcher
parent
29311e98b4
commit
3d72844710
@@ -53,7 +53,8 @@ mod module1 {
|
||||
|
||||
fn deposit_event<T, I>() = default;
|
||||
|
||||
fn one() {
|
||||
fn one(origin) {
|
||||
system::ensure_root(origin)?;
|
||||
Self::deposit_event(RawEvent::AnotherVariant(3));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ macro_rules! reserved {
|
||||
|
||||
srml_support::decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
|
||||
fn $reserved() -> Result { unreachable!() }
|
||||
fn $reserved(_origin) -> Result { unreachable!() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user