mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Use EncodeLike for storages traits (#3676)
* impl * patch * lock * some refactor * some avoided copy * new api without ref for doublemap * fix * version bump * fix * point to incoming release * use codec latest * bumpd impl version * fix unused * fix * Update srml/support/src/storage/mod.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
83d4764d46
commit
53e0ddee4e
@@ -11,7 +11,7 @@ rustc-hex = { version = "2.0", default-features = false }
|
||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
twox-hash = { version = "1.2.0", optional = true }
|
||||
byteorder = { version = "1.3.1", default-features = false }
|
||||
primitive-types = { version = "0.5.0", default-features = false, features = ["codec"] }
|
||||
primitive-types = { version = "0.5.1", default-features = false, features = ["codec"] }
|
||||
impl-serde = { version = "0.1", optional = true }
|
||||
log = { version = "0.4", optional = true }
|
||||
wasmi = { version = "0.5.0", optional = true }
|
||||
|
||||
@@ -20,7 +20,7 @@ impl-trait-for-tuples = "0.1.1"
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = "1.0"
|
||||
primitive-types = "0.5.0"
|
||||
primitive-types = "0.5.1"
|
||||
rand = "0.7.2"
|
||||
|
||||
[features]
|
||||
|
||||
@@ -21,7 +21,7 @@ use std::fmt;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use runtime_io::blake2_256;
|
||||
use codec::{Decode, Encode, Input, Error};
|
||||
use codec::{Decode, Encode, EncodeLike, Input, Error};
|
||||
use crate::{
|
||||
traits::{self, Member, MaybeDisplay, SignedExtension, Checkable, Extrinsic},
|
||||
generic::CheckedExtrinsic, transaction_validity::{TransactionValidityError, InvalidTransaction},
|
||||
@@ -185,6 +185,12 @@ impl<Call, Extra> Encode for SignedPayload<Call, Extra> where
|
||||
}
|
||||
}
|
||||
|
||||
impl<Call, Extra> EncodeLike for SignedPayload<Call, Extra>
|
||||
where
|
||||
Call: Encode,
|
||||
Extra: SignedExtension,
|
||||
{}
|
||||
|
||||
impl<Address, Call, Signature, Extra> Decode
|
||||
for UncheckedExtrinsic<Address, Call, Signature, Extra>
|
||||
where
|
||||
@@ -240,6 +246,15 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<Address, Call, Signature, Extra> EncodeLike
|
||||
for UncheckedExtrinsic<Address, Call, Signature, Extra>
|
||||
where
|
||||
Address: Encode,
|
||||
Signature: Encode,
|
||||
Call: Encode,
|
||||
Extra: SignedExtension,
|
||||
{}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension> serde::Serialize
|
||||
for UncheckedExtrinsic<Address, Call, Signature, Extra>
|
||||
|
||||
Reference in New Issue
Block a user