mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
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:
@@ -313,8 +313,6 @@ use sp_staking::{
|
||||
SessionIndex,
|
||||
offence::{OnOffenceHandler, OffenceDetails, Offence, ReportOffence, OffenceError},
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_runtime::{Serialize, Deserialize};
|
||||
use frame_system::{
|
||||
self as system, ensure_signed, ensure_root,
|
||||
offchain::SendTransactionTypes,
|
||||
@@ -380,7 +378,7 @@ pub struct EraRewardPoints<AccountId: Ord> {
|
||||
|
||||
/// Indicates the initial status of the staker.
|
||||
#[derive(RuntimeDebug)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum StakerStatus<AccountId> {
|
||||
/// Chilling.
|
||||
Idle,
|
||||
@@ -793,7 +791,7 @@ pub trait Config: frame_system::Config + SendTransactionTypes<Call<Self>> {
|
||||
|
||||
/// Mode of era-forcing.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum Forcing {
|
||||
/// Not forcing anything - just let whatever happen.
|
||||
NotForcing,
|
||||
|
||||
Reference in New Issue
Block a user