Sudo module (#1315)

* Sudo module

* Fix comment

* Fix errors

* Fix test

* Update hashes

* Final test fixes and build

* Final hex change
This commit is contained in:
Gav Wood
2018-12-21 13:43:34 +01:00
committed by GitHub
parent d67821a580
commit ef8b94656e
10 changed files with 184 additions and 8 deletions
+2
View File
@@ -25,6 +25,7 @@ srml-staking = { path = "../../srml/staking", default-features = false }
srml-system = { path = "../../srml/system", default-features = false }
srml-timestamp = { path = "../../srml/timestamp", default-features = false }
srml-treasury = { path = "../../srml/treasury", default-features = false }
srml-sudo = { path = "../../srml/sudo", default-features = false }
srml-upgrade-key = { path = "../../srml/upgrade-key", default-features = false }
srml-grandpa = { path = "../../srml/grandpa", default-features = false }
sr-version = { path = "../../core/sr-version", default-features = false }
@@ -55,6 +56,7 @@ std = [
"srml-system/std",
"srml-timestamp/std",
"srml-treasury/std",
"srml-sudo/std",
"srml-upgrade-key/std",
"sr-version/std",
"node-primitives/std",
+9 -2
View File
@@ -47,6 +47,7 @@ extern crate srml_executive as executive;
extern crate srml_grandpa as grandpa;
extern crate srml_session as session;
extern crate srml_staking as staking;
extern crate srml_sudo as sudo;
extern crate srml_system as system;
extern crate srml_timestamp as timestamp;
extern crate srml_treasury as treasury;
@@ -96,8 +97,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("node"),
impl_name: create_runtime_str!("substrate-node"),
authoring_version: 10,
spec_version: 10,
impl_version: 0,
spec_version: 11,
impl_version: 11,
apis: RUNTIME_API_VERSIONS,
};
@@ -205,6 +206,11 @@ impl upgrade_key::Trait for Runtime {
type Event = Event;
}
impl sudo::Trait for Runtime {
type Event = Event;
type Proposal = Call;
}
impl grandpa::Trait for Runtime {
type SessionKey = SessionKey;
type Log = Log;
@@ -233,6 +239,7 @@ construct_runtime!(
Treasury: treasury,
Contract: contract::{Module, Call, Config<T>, Event<T>},
UpgradeKey: upgrade_key,
Sudo: sudo,
}
);
+19
View File
@@ -520,6 +520,7 @@ dependencies = [
"srml-grandpa 0.1.0",
"srml-session 0.1.0",
"srml-staking 0.1.0",
"srml-sudo 0.1.0",
"srml-support 0.1.0",
"srml-system 0.1.0",
"srml-timestamp 0.1.0",
@@ -1282,6 +1283,24 @@ dependencies = [
"substrate-primitives 0.1.0",
]
[[package]]
name = "srml-sudo"
version = "0.1.0"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 0.1.0",
"sr-primitives 0.1.0",
"sr-std 0.1.0",
"srml-consensus 0.1.0",
"srml-support 0.1.0",
"srml-support-procedural 0.1.0",
"srml-system 0.1.0",
"substrate-primitives 0.1.0",
]
[[package]]
name = "srml-support"
version = "0.1.0"