mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 05:41:07 +00:00
fix for substrate master (#29)
This commit is contained in:
@@ -20,12 +20,13 @@ use futures::future::{
|
|||||||
};
|
};
|
||||||
use parity_scale_codec::Codec;
|
use parity_scale_codec::Codec;
|
||||||
use runtime_primitives::traits::{
|
use runtime_primitives::traits::{
|
||||||
MaybeSerializeDebug,
|
MaybeSerialize,
|
||||||
Member,
|
Member,
|
||||||
SimpleArithmetic,
|
SimpleArithmetic,
|
||||||
};
|
};
|
||||||
use runtime_support::Parameter;
|
use runtime_support::Parameter;
|
||||||
use substrate_primitives::Pair;
|
use substrate_primitives::Pair;
|
||||||
|
use std::fmt::Debug;
|
||||||
|
|
||||||
/// The subset of the `srml_balances::Trait` that a client must implement.
|
/// The subset of the `srml_balances::Trait` that a client must implement.
|
||||||
pub trait Balances: System {
|
pub trait Balances: System {
|
||||||
@@ -36,12 +37,13 @@ pub trait Balances: System {
|
|||||||
+ Codec
|
+ Codec
|
||||||
+ Default
|
+ Default
|
||||||
+ Copy
|
+ Copy
|
||||||
+ MaybeSerializeDebug
|
+ MaybeSerialize
|
||||||
|
+ Debug
|
||||||
+ From<<Self as System>::BlockNumber>;
|
+ From<<Self as System>::BlockNumber>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Blanket impl for using existing runtime types
|
/// Blanket impl for using existing runtime types
|
||||||
impl<T: srml_system::Trait + srml_balances::Trait + std::fmt::Debug> Balances for T
|
impl<T: srml_system::Trait + srml_balances::Trait + Debug> Balances for T
|
||||||
where
|
where
|
||||||
<T as srml_system::Trait>::Header: serde::de::DeserializeOwned,
|
<T as srml_system::Trait>::Header: serde::de::DeserializeOwned,
|
||||||
{
|
{
|
||||||
|
|||||||
+14
-10
@@ -21,10 +21,9 @@ use runtime_primitives::traits::{
|
|||||||
CheckEqual,
|
CheckEqual,
|
||||||
Hash,
|
Hash,
|
||||||
Header,
|
Header,
|
||||||
MaybeDebug,
|
|
||||||
MaybeDisplay,
|
MaybeDisplay,
|
||||||
MaybeSerializeDebug,
|
MaybeSerialize,
|
||||||
MaybeSerializeDebugButNotDeserialize,
|
MaybeSerializeDeserialize,
|
||||||
Member,
|
Member,
|
||||||
SimpleArithmetic,
|
SimpleArithmetic,
|
||||||
SimpleBitOps,
|
SimpleBitOps,
|
||||||
@@ -33,14 +32,16 @@ use runtime_primitives::traits::{
|
|||||||
use runtime_support::Parameter;
|
use runtime_support::Parameter;
|
||||||
use serde::de::DeserializeOwned;
|
use serde::de::DeserializeOwned;
|
||||||
use substrate_primitives::Pair;
|
use substrate_primitives::Pair;
|
||||||
|
use std::fmt::Debug;
|
||||||
|
|
||||||
/// The subset of the `srml_system::Trait` that a client must implement.
|
/// 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
|
/// Account index (aka nonce) type. This stores the number of previous
|
||||||
/// transactions associated with a sender account.
|
/// transactions associated with a sender account.
|
||||||
type Index: Parameter
|
type Index: Parameter
|
||||||
+ Member
|
+ Member
|
||||||
+ MaybeSerializeDebugButNotDeserialize
|
+ MaybeSerialize
|
||||||
|
+ Debug
|
||||||
+ Default
|
+ Default
|
||||||
+ MaybeDisplay
|
+ MaybeDisplay
|
||||||
+ SimpleArithmetic
|
+ SimpleArithmetic
|
||||||
@@ -49,7 +50,8 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug {
|
|||||||
/// The block number type used by the runtime.
|
/// The block number type used by the runtime.
|
||||||
type BlockNumber: Parameter
|
type BlockNumber: Parameter
|
||||||
+ Member
|
+ Member
|
||||||
+ MaybeSerializeDebug
|
+ MaybeSerializeDeserialize
|
||||||
|
+ Debug
|
||||||
+ MaybeDisplay
|
+ MaybeDisplay
|
||||||
+ SimpleArithmetic
|
+ SimpleArithmetic
|
||||||
+ Default
|
+ Default
|
||||||
@@ -60,7 +62,8 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug {
|
|||||||
/// The output of the `Hashing` function.
|
/// The output of the `Hashing` function.
|
||||||
type Hash: Parameter
|
type Hash: Parameter
|
||||||
+ Member
|
+ Member
|
||||||
+ MaybeSerializeDebug
|
+ MaybeSerializeDeserialize
|
||||||
|
+ Debug
|
||||||
+ MaybeDisplay
|
+ MaybeDisplay
|
||||||
+ SimpleBitOps
|
+ SimpleBitOps
|
||||||
+ Default
|
+ Default
|
||||||
@@ -76,13 +79,14 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug {
|
|||||||
/// The user account identifier type for the runtime.
|
/// The user account identifier type for the runtime.
|
||||||
type AccountId: Parameter
|
type AccountId: Parameter
|
||||||
+ Member
|
+ Member
|
||||||
+ MaybeSerializeDebug
|
+ MaybeSerialize
|
||||||
|
+ Debug
|
||||||
+ MaybeDisplay
|
+ MaybeDisplay
|
||||||
+ Ord
|
+ Ord
|
||||||
+ Default;
|
+ Default;
|
||||||
|
|
||||||
/// The address type. This instead of `<srml_system::Trait::Lookup as StaticLookup>::Source`.
|
/// The address type. This instead of `<srml_system::Trait::Lookup as StaticLookup>::Source`.
|
||||||
type Address: Codec + Clone + PartialEq + MaybeDebug;
|
type Address: Codec + Clone + PartialEq + Debug;
|
||||||
|
|
||||||
/// The block header.
|
/// The block header.
|
||||||
type Header: Parameter
|
type Header: Parameter
|
||||||
@@ -91,7 +95,7 @@ pub trait System: 'static + Eq + Clone + std::fmt::Debug {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Blanket impl for using existing runtime types
|
/// Blanket impl for using existing runtime types
|
||||||
impl<T: srml_system::Trait + std::fmt::Debug> System for T
|
impl<T: srml_system::Trait + Debug> System for T
|
||||||
where
|
where
|
||||||
<T as srml_system::Trait>::Header: serde::de::DeserializeOwned,
|
<T as srml_system::Trait>::Header: serde::de::DeserializeOwned,
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user