diff --git a/src/srml/balances.rs b/src/srml/balances.rs index 425815f391de7..affd02ce315ee 100644 --- a/src/srml/balances.rs +++ b/src/srml/balances.rs @@ -20,12 +20,13 @@ use futures::future::{ }; use parity_scale_codec::Codec; use runtime_primitives::traits::{ - MaybeSerializeDebug, + MaybeSerialize, Member, SimpleArithmetic, }; use runtime_support::Parameter; use substrate_primitives::Pair; +use std::fmt::Debug; /// The subset of the `srml_balances::Trait` that a client must implement. pub trait Balances: System { @@ -36,12 +37,13 @@ pub trait Balances: System { + Codec + Default + Copy - + MaybeSerializeDebug + + MaybeSerialize + + Debug + From<::BlockNumber>; } /// Blanket impl for using existing runtime types -impl Balances for T +impl Balances for T where ::Header: serde::de::DeserializeOwned, { diff --git a/src/srml/system.rs b/src/srml/system.rs index 921d3c5b0c2c1..3867df3b4e36f 100644 --- a/src/srml/system.rs +++ b/src/srml/system.rs @@ -21,10 +21,9 @@ use runtime_primitives::traits::{ CheckEqual, Hash, Header, - MaybeDebug, MaybeDisplay, - MaybeSerializeDebug, - MaybeSerializeDebugButNotDeserialize, + MaybeSerialize, + MaybeSerializeDeserialize, Member, SimpleArithmetic, SimpleBitOps, @@ -33,14 +32,16 @@ use runtime_primitives::traits::{ use runtime_support::Parameter; use serde::de::DeserializeOwned; use substrate_primitives::Pair; +use std::fmt::Debug; /// The subset of the `srml_system::Trait` that a client must implement. -pub trait System: 'static + Eq + Clone + std::fmt::Debug { +pub trait System: 'static + Eq + Clone + Debug { /// Account index (aka nonce) type. This stores the number of previous /// transactions associated with a sender account. type Index: Parameter + Member - + MaybeSerializeDebugButNotDeserialize + + MaybeSerialize + + Debug + Default + MaybeDisplay + SimpleArithmetic @@ -49,7 +50,8 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug { /// The block number type used by the runtime. type BlockNumber: Parameter + Member - + MaybeSerializeDebug + + MaybeSerializeDeserialize + + Debug + MaybeDisplay + SimpleArithmetic + Default @@ -60,7 +62,8 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug { /// The output of the `Hashing` function. type Hash: Parameter + Member - + MaybeSerializeDebug + + MaybeSerializeDeserialize + + Debug + MaybeDisplay + SimpleBitOps + Default @@ -76,13 +79,14 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug { /// The user account identifier type for the runtime. type AccountId: Parameter + Member - + MaybeSerializeDebug + + MaybeSerialize + + Debug + MaybeDisplay + Ord + Default; /// The address type. This instead of `::Source`. - type Address: Codec + Clone + PartialEq + MaybeDebug; + type Address: Codec + Clone + PartialEq + Debug; /// The block header. type Header: Parameter @@ -91,7 +95,7 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug { } /// Blanket impl for using existing runtime types -impl System for T +impl System for T where ::Header: serde::de::DeserializeOwned, {