Remove serde requirement from FRAME macros (#8628)

* Remove `serde` requirement from FRAME macros

Currently there is some implicit requirement on `serde` being present in
the `Cargo.toml` of a pallet when `GenesisConfig` is used. This pr
removes this requirement by using the serde attribute `serde(crate = "..")`.

* build a unique reexport of serde in impl_opaque_keys, by abusing paste doc concatenation

* Optimize

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Bastian Köcher
2021-04-16 12:42:37 +02:00
committed by GitHub
parent 7527bd758c
commit c8136bd1df
43 changed files with 29 additions and 128 deletions
-2
View File
@@ -18,7 +18,6 @@ pallet-authorship = { version = "3.0.0", default-features = false, path = "../au
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
sp-core = { version = "3.0.0", default-features = false, path = "../../primitives/core" }
sp-std = { version = "3.0.0", default-features = false, path = "../../primitives/std" }
serde = { version = "1.0.101", optional = true }
sp-io = { version = "3.0.0", default-features = false, path = "../../primitives/io" }
sp-runtime = { version = "3.0.0", default-features = false, path = "../../primitives/runtime" }
sp-staking = { version = "3.0.0", default-features = false, path = "../../primitives/staking" }
@@ -39,7 +38,6 @@ std = [
"codec/std",
"sp-core/std",
"sp-std/std",
"serde",
"sp-io/std",
"sp-runtime/std",
"sp-staking/std",