frame: support for serde added (#14261)

* frame: support for serde added

- enabled `serde` features in dependent crates, no gate feature introduced, linker should do the job and strip unused code.

- frame::staking: added impl of `serde::Serialize, serde::Deserialize` for `enum Forcing`

- primitives::runtime: impl_opaque_keys macro provides `Serialize/Deserialize` impl if `serde` is enabled

- primitives::staking: added impl of `serde::Serialize`, `serde::Deserialize` for `enum StakerStatus`

* frame::support: serde for pallets' GenesisConfig enabled in no-std

* Cargo.lock updated

* Update primitives/staking/Cargo.toml

Co-authored-by: Bastian Köcher <git@kchr.de>

* fix

* Cargo.lock update + missed serde/std in beefy

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Michal Kucharczyk
2023-06-01 16:35:34 +01:00
committed by GitHub
parent 372708d7a2
commit dc7161276d
16 changed files with 70 additions and 71 deletions
+2 -2
View File
@@ -1772,7 +1772,7 @@ macro_rules! impl_opaque_keys_inner {
/// }
/// ```
#[macro_export]
#[cfg(feature = "std")]
#[cfg(any(feature = "serde", feature = "std"))]
macro_rules! impl_opaque_keys {
{
$( #[ $attr:meta ] )*
@@ -1802,7 +1802,7 @@ macro_rules! impl_opaque_keys {
}
#[macro_export]
#[cfg(not(feature = "std"))]
#[cfg(all(not(feature = "std"), not(feature = "serde")))]
#[doc(hidden)]
macro_rules! impl_opaque_keys {
{