-
Notifications
You must be signed in to change notification settings - Fork 71
Modules: Adding a Module
Raymond Zhong edited this page Jul 16, 2019
·
1 revision
To add a module:
- Add its github repo to:
- Cargo.toml
- node/runtime/Cargo.toml
-
node/runtime/wasm/Cargo.toml (be sure to have
default-features = false
)
- Changes to the runtime:
- Add it as an
extern crate
. - Implement its
Trait
with production types. - Add it to the
construct_runtime
macro with all implemented components.
- If its storage contains
config
elements, then you need to modify the chain spec:
- Add it to the
edgeware_runtime
's list ofConfig
types. - Add it to the
testnet_genesis
function, initializing all storage fields set toconfig()
.
- Build and run the chain.