Added demo module to show explicit imports of macros (#1770)

* added demo module to node template

* updated comments

* replaced demo with updated template module

* Personal preferences here

* fixed comment inside macro
This commit is contained in:
Gautam Dhameja
2019-02-13 16:45:43 +01:00
committed by Bastian Köcher
parent e15ce25757
commit 7708490b27
2 changed files with 134 additions and 0 deletions
@@ -46,6 +46,9 @@ pub type BlockNumber = u64;
/// Index of an account's extrinsic in the chain.
pub type Nonce = u64;
/// Used for the module template in `./template.rs`
mod template;
/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
/// the specifics of the runtime. They can then be made to be agnostic over specific formats
/// of data like extrinsics, allowing for them to continue syncing the network through upgrades
@@ -167,6 +170,11 @@ impl sudo::Trait for Runtime {
type Proposal = Call;
}
/// Used for the module template in `./template.rs`
impl template::Trait for Runtime {
type Event = Event;
}
construct_runtime!(
pub enum Runtime with Log(InternalLog: DigestItem<Hash, Ed25519AuthorityId>) where
Block = Block,
@@ -180,6 +188,8 @@ construct_runtime!(
Indices: indices,
Balances: balances,
Sudo: sudo,
// Used for the module template in `./template.rs`
TemplateModule: template::{Module, Call, Storage, Event<T>},
}
);