From fdb605dd3d316cc7a6fdf63a0f4c87f11b2d7295 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Mon, 12 Oct 2020 21:47:00 +0200 Subject: [PATCH] fix upgrade --- Cargo.lock | 1 + node/src/chain_spec.rs | 2 +- pallets/template/Cargo.toml | 2 ++ runtime/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d9f0312..9e8700c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3595,6 +3595,7 @@ dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "serde", "sp-core", "sp-io", "sp-runtime", diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 6a518d2..5c9e221 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -153,7 +153,7 @@ fn testnet_genesis( // Assign network admin rights. key: root_key, }), - template: Some(TemplateModuleConfig { + pallet_template: Some(TemplateModuleConfig { some_double_map: vec![(1, 2, 3)], }) } diff --git a/pallets/template/Cargo.toml b/pallets/template/Cargo.toml index dc48468..f7e02b0 100644 --- a/pallets/template/Cargo.toml +++ b/pallets/template/Cargo.toml @@ -19,6 +19,7 @@ package = 'parity-scale-codec' version = '1.3.4' [dependencies] +serde = { features = ['derive'], optional = true, version = '1.0.101' } frame-support = { default-features = false, version = '2.0.0' } frame-system = { default-features = false, version = '2.0.0' } @@ -31,6 +32,7 @@ sp-runtime = { default-features = false, version = '2.0.0' } default = ['std'] std = [ 'codec/std', + 'serde', 'frame-support/std', 'frame-system/std', ] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 1e84ad7..0b7c775 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -282,7 +282,7 @@ construct_runtime!( TransactionPayment: pallet_transaction_payment::{Module, Storage}, Sudo: pallet_sudo::{Module, Call, Config, Storage, Event}, // Include the custom logic from the template pallet in the runtime. - TemplateModule: pallet_template::{Module, Call, Storage, Event}, + TemplateModule: pallet_template::{Module, Call, Storage, Event, Config}, } );