Add sudo module to polkadot-runtime (#735)

This commit is contained in:
Bastian Köcher
2020-01-07 19:07:54 +01:00
committed by Gavin Wood
parent 0d055c9640
commit 263dc43da3
4 changed files with 34 additions and 2 deletions
+2
View File
@@ -55,6 +55,7 @@ system = { package = "frame-system", git = "https://github.com/paritytech/substr
system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sudo = { package = "pallet-sudo", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
@@ -126,4 +127,5 @@ std = [
"sp-session/std",
"randomness-collective-flip/std",
"runtime-common/std",
"sudo/std",
]
+8
View File
@@ -506,6 +506,11 @@ impl claims::Trait for Runtime {
type Prefix = Prefix;
}
impl sudo::Trait for Runtime {
type Event = Event;
type Proposal = Call;
}
construct_runtime! {
pub enum Runtime where
Block = Block,
@@ -534,6 +539,9 @@ construct_runtime! {
ImOnline: im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
AuthorityDiscovery: authority_discovery::{Module, Call, Config},
// Sudo. Usable initially.
Sudo: sudo,
// Governance stuff; uncallable initially.
Democracy: democracy::{Module, Call, Storage, Config, Event<T>},
Council: collective::<Instance1>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},