mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 04:07:57 +00:00
Renames of Trait to Config in README.md, weight templates and few minor ones (#7636)
* manual rename * renamse in README.md * fix template
This commit is contained in:
committed by
GitHub
parent
35efc8e4b0
commit
15b0dece54
@@ -1,6 +1,6 @@
|
||||
# Sudo Module
|
||||
|
||||
- [`sudo::Trait`](https://docs.rs/pallet-sudo/latest/pallet_sudo/trait.Trait.html)
|
||||
- [`sudo::Config`](https://docs.rs/pallet-sudo/latest/pallet_sudo/trait.Config.html)
|
||||
- [`Call`](https://docs.rs/pallet-sudo/latest/pallet_sudo/enum.Call.html)
|
||||
|
||||
## Overview
|
||||
@@ -38,10 +38,10 @@ This is an example of a module that exposes a privileged function:
|
||||
use frame_support::{decl_module, dispatch};
|
||||
use frame_system::ensure_root;
|
||||
|
||||
pub trait Trait: frame_system::Trait {}
|
||||
pub trait Config: frame_system::Config {}
|
||||
|
||||
decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
|
||||
pub struct Module<T: Config> for enum Call where origin: T::Origin {
|
||||
#[weight = 0]
|
||||
pub fn privileged_function(origin) -> dispatch::DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
@@ -64,7 +64,7 @@ You need to set an initial superuser account as the sudo `key`.
|
||||
* [Democracy](https://docs.rs/pallet-democracy/latest/pallet_democracy/)
|
||||
|
||||
[`Call`]: ./enum.Call.html
|
||||
[`Trait`]: ./trait.Trait.html
|
||||
[`Config`]: ./trait.Config.html
|
||||
[`Origin`]: https://docs.substrate.dev/docs/substrate-types
|
||||
|
||||
License: Apache-2.0
|
||||
Reference in New Issue
Block a user