Use serde derive feature. (#2351)

* core/primitives

* sr-primitives

* sr-primitives

* srml-treasury

* substrate-executor

* substrate-keystore

* network-libp2p

* substrate-service

* srml-system

* substrate-rpc

* sr-version

* substrate-telemetry

* substrate-test-runtime

* substrate-transaction-pool

* node-template-runtime

* node-primitives

* srml-consensus

* srml-contract

* srml-democracy

* srml-finality-tracker

* srml-grandpa

* srml-metadata

* srml-support

* Clean

* Update locks
This commit is contained in:
Sergei Pepyakin
2019-04-23 18:42:42 +02:00
committed by Bastian Köcher
parent 08fda211d8
commit e2bb429711
57 changed files with 116 additions and 173 deletions
+3 -25
View File
@@ -1980,7 +1980,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
@@ -2062,7 +2061,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -2926,6 +2924,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "serde"
version = "1.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive"
@@ -3123,7 +3124,6 @@ dependencies = [
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-std 1.0.0",
@@ -3157,7 +3157,6 @@ dependencies = [
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
]
@@ -3223,7 +3222,6 @@ dependencies = [
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -3243,7 +3241,6 @@ dependencies = [
"parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)",
"pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-sandbox 1.0.0",
@@ -3284,7 +3281,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -3335,7 +3331,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -3351,7 +3346,6 @@ version = "1.0.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -3388,7 +3382,6 @@ version = "1.0.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
]
@@ -3460,7 +3453,6 @@ dependencies = [
"paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -3506,7 +3498,6 @@ version = "0.1.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"srml-support 1.0.0",
"substrate-inherents 1.0.0",
@@ -3522,7 +3513,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -3553,7 +3543,6 @@ dependencies = [
"hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -3988,8 +3977,6 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-version 1.0.0",
"substrate-panic-handler 1.0.0",
@@ -4071,8 +4058,6 @@ dependencies = [
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
"substrate-primitives 1.0.0",
"subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4124,7 +4109,6 @@ dependencies = [
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"slog_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4207,7 +4191,6 @@ dependencies = [
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 1.0.0",
"substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)",
@@ -4234,7 +4217,6 @@ dependencies = [
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
@@ -4284,7 +4266,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
@@ -4361,7 +4342,6 @@ dependencies = [
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4397,7 +4377,6 @@ dependencies = [
"memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -4429,7 +4408,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"substrate-primitives 1.0.0",
"substrate-test-runtime 1.0.0",
-2
View File
@@ -14,8 +14,6 @@ serializer = { package = "substrate-serializer", path = "../serializer" }
state_machine = { package = "substrate-state-machine", path = "../state-machine" }
runtime_version = { package = "sr-version", path = "../sr-version" }
panic-handler = { package = "substrate-panic-handler", path = "../panic-handler" }
serde = "1.0"
serde_derive = "1.0"
wasmi = { version = "0.4.3" }
byteorder = "1.1"
lazy_static = "1.0"
-2
View File
@@ -11,8 +11,6 @@ error-chain = "0.12"
hex = "0.3"
rand = "0.6"
serde_json = "1.0"
serde = "1.0"
serde_derive = "1.0"
subtle = "2.0"
[dev-dependencies]
+1 -2
View File
@@ -18,8 +18,7 @@ parking_lot = "0.7.1"
lazy_static = "1.2"
log = "0.4"
rand = "0.6"
serde = "1.0.70"
serde_derive = "1.0.70"
serde = { version = "1.0.70", features = ["derive"] }
serde_json = "1.0.24"
smallvec = "0.6"
substrate-peerset = { path = "../peerset" }
+1 -1
View File
@@ -34,7 +34,7 @@ pub use libp2p::{Multiaddr, multiaddr, build_multiaddr};
pub use libp2p::{identity, PeerId, core::PublicKey};
use libp2p::core::nodes::ConnectedPoint;
use serde_derive::{Deserialize, Serialize};
use serde::{Deserialize, Serialize};
use slog_derive::SerdeValue;
use std::{collections::{HashMap, HashSet}, error, fmt, time::Duration};
+2 -3
View File
@@ -8,8 +8,7 @@ edition = "2018"
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
parity-codec = { version = "3.4.0", default-features = false, features = ["derive"] }
rustc-hex = { version = "2.0", default-features = false }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
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.2", default-features = false, features = ["codec"] }
@@ -61,7 +60,7 @@ std = [
"base58",
"substrate-bip39",
"tiny-bip39",
"serde_derive",
"serde",
"byteorder/std",
"rand",
"sha2",
@@ -17,7 +17,7 @@
//! Substrate changes trie configuration.
#[cfg(any(feature = "std", test))]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use parity_codec::{Encode, Decode};
/// Substrate changes trie configuration.
+1 -1
View File
@@ -38,7 +38,7 @@ use parity_codec::{Encode, Decode};
#[cfg(feature = "std")]
use std::borrow::Cow;
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
#[cfg(feature = "std")]
pub use impl_serde::serialize as bytes;
+1 -1
View File
@@ -17,7 +17,7 @@
//! Contract execution data.
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
#[cfg(feature = "std")]
use crate::bytes;
use rstd::vec::Vec;
+1 -2
View File
@@ -12,8 +12,7 @@ jsonrpc-derive = "10.0.2"
log = "0.4"
parking_lot = "0.7.1"
parity-codec = "3.3"
serde = "1.0"
serde_derive = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
client = { package = "substrate-client", path = "../client" }
substrate-executor = { path = "../executor" }
+1 -1
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use serde_derive::Deserialize;
use serde::Deserialize;
use primitives::U256;
use runtime_primitives::traits;
+1 -1
View File
@@ -17,7 +17,7 @@
//! Substrate system API helpers.
use std::fmt;
use serde_derive::{Serialize};
use serde::Serialize;
use serde_json::{Value, map::Map};
/// Node properties
+1 -2
View File
@@ -13,9 +13,8 @@ log = "0.4"
slog = {version = "^2", features = ["nested-values"]}
tokio = "0.1.7"
exit-future = "0.1"
serde = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_derive = "1.0"
target_info = "0.1"
inherents = { package = "substrate-inherents", path = "../../core/inherents" }
keystore = { package = "substrate-keystore", path = "../../core/keystore" }
+1 -1
View File
@@ -19,7 +19,7 @@
use std::collections::HashMap;
use std::fs::File;
use std::path::PathBuf;
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use primitives::storage::{StorageKey, StorageData};
use runtime_primitives::{BuildStorage, StorageOverlay, ChildrenStorageOverlay};
use serde_json as json;
+1 -3
View File
@@ -7,8 +7,7 @@ edition = "2018"
[dependencies]
num-traits = { version = "0.2", default-features = false }
integer-sqrt = { version = "0.1.2" }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
substrate-primitives = { path = "../primitives", default-features = false }
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
@@ -23,7 +22,6 @@ default = ["std"]
std = [
"num-traits/std",
"serde",
"serde_derive",
"log",
"rstd/std",
"runtime_io/std",
@@ -20,7 +20,7 @@
use std::fmt;
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
use rstd::prelude::*;
use crate::codec::{Codec, Encode, Decode};
@@ -17,7 +17,7 @@
//! Generic implementation of a digest.
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
use rstd::prelude::*;
@@ -17,7 +17,7 @@
//! Generic implementation of an unchecked (pre-verification) extrinsic.
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use crate::codec::{Decode, Encode, Input, Output};
@@ -17,7 +17,7 @@
//! Generic implementation of a block header.
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
use crate::codec::{Decode, Encode, Codec, Input, Output, HasCompact, EncodeAsRef};
use crate::traits::{self, Member, SimpleArithmetic, SimpleBitOps, MaybeDisplay,
Hash as HashT, DigestItem as DigestItemT, MaybeSerializeDebug, MaybeSerializeDebugButNotDeserialize};
@@ -191,7 +191,7 @@ mod tests {
use super::*;
use runtime_io::blake2_256;
use crate::codec::{Encode, Decode};
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
struct TestContext;
impl Lookup for TestContext {
@@ -190,7 +190,7 @@ mod tests {
use super::*;
use runtime_io::blake2_256;
use crate::codec::{Encode, Decode};
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
struct TestContext;
impl Lookup for TestContext {
+7 -9
View File
@@ -24,7 +24,7 @@
pub use parity_codec as codec;
#[cfg(feature = "std")]
#[doc(hidden)]
pub use serde_derive;
pub use serde;
#[cfg(feature = "std")]
pub use runtime_io::{StorageOverlay, ChildrenStorageOverlay};
@@ -83,9 +83,7 @@ macro_rules! create_runtime_str {
}
#[cfg(feature = "std")]
pub use serde::{Serialize, de::DeserializeOwned};
#[cfg(feature = "std")]
pub use serde_derive::{Serialize, Deserialize};
pub use serde::{Serialize, Deserialize, de::DeserializeOwned};
/// Complex storage builder stuff.
#[cfg(feature = "std")]
@@ -528,7 +526,7 @@ macro_rules! impl_outer_config {
) => {
$crate::__impl_outer_config_types! { $concrete $( $config $snake $( < $generic $(, $instance)? > )* )* }
#[cfg(any(feature = "std", test))]
#[derive($crate::serde_derive::Serialize, $crate::serde_derive::Deserialize)]
#[derive($crate::serde::Serialize, $crate::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
pub struct $main {
@@ -576,7 +574,7 @@ macro_rules! impl_outer_log {
/// Wrapper for all possible log entries for the `$trait` runtime. Provides binary-compatible
/// `Encode`/`Decode` implementations with the corresponding `generic::DigestItem`.
#[derive(Clone, PartialEq, Eq)]
#[cfg_attr(feature = "std", derive(Debug, $crate::serde_derive::Serialize))]
#[cfg_attr(feature = "std", derive(Debug, $crate::serde::Serialize))]
$(#[$attr])*
#[allow(non_camel_case_types)]
pub struct $name($internal);
@@ -584,7 +582,7 @@ macro_rules! impl_outer_log {
/// All possible log entries for the `$trait` runtime. `Encode`/`Decode` implementations
/// are auto-generated => it is not binary-compatible with `generic::DigestItem`.
#[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode)]
#[cfg_attr(feature = "std", derive(Debug, $crate::serde_derive::Serialize))]
#[cfg_attr(feature = "std", derive(Debug, $crate::serde::Serialize))]
$(#[$attr])*
#[allow(non_camel_case_types)]
pub enum InternalLog {
@@ -728,7 +726,7 @@ mod tests {
mod a {
use super::RuntimeT;
use crate::codec::{Encode, Decode};
use serde_derive::Serialize;
use serde::Serialize;
pub type Log<R> = RawLog<<R as RuntimeT>::AuthorityId>;
#[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone)]
@@ -738,7 +736,7 @@ mod tests {
mod b {
use super::RuntimeT;
use crate::codec::{Encode, Decode};
use serde_derive::Serialize;
use serde::Serialize;
pub type Log<R> = RawLog<<R as RuntimeT>::AuthorityId>;
#[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone)]
@@ -17,9 +17,6 @@
//! Testing utilities.
use serde::{Serialize, Serializer, Deserialize, de::Error as DeError, Deserializer};
use serde_derive::Serialize;
#[cfg(feature = "std")]
use serde_derive::Deserialize;
use std::{fmt::Debug, ops::Deref, fmt};
use crate::codec::{Codec, Encode, Decode};
use crate::traits::{self, Checkable, Applyable, BlakeTwo256, Convert};
+1 -3
View File
@@ -20,9 +20,7 @@ use rstd::prelude::*;
use rstd::{self, result, marker::PhantomData};
use runtime_io;
#[cfg(feature = "std")] use std::fmt::{Debug, Display};
#[cfg(feature = "std")] use serde::{Serialize, de::DeserializeOwned};
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
#[cfg(feature = "std")] use serde::{Serialize, Deserialize, de::DeserializeOwned};
use substrate_primitives::{self, Hasher, Blake2Hasher};
use crate::codec::{Codec, Encode, HasCompact};
pub use integer_sqrt::IntegerSquareRoot;
+1 -3
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
impl-serde = { version = "0.1", optional = true }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
runtime_primitives = { package = "sr-primitives", path = "../sr-primitives", default-features = false }
@@ -17,7 +16,6 @@ default = ["std"]
std = [
"impl-serde",
"serde",
"serde_derive",
"parity-codec/std",
"rstd/std",
"runtime_primitives/std",
+1 -1
View File
@@ -19,7 +19,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
#[cfg(feature = "std")]
use std::fmt;
#[cfg(feature = "std")]
+1 -2
View File
@@ -10,8 +10,7 @@ parking_lot = "0.7.1"
lazy_static = "1.0"
log = "0.4"
rand = "0.6"
serde = "1.0.81"
serde_derive = "1.0"
serde = { version = "1.0.81", features = ["derive"] }
serde_json = "1.0"
slog = { version = "^2", features = ["nested-values"] }
slog-json = { version = "^2", features = ["nested-values"] }
+1 -1
View File
@@ -29,7 +29,7 @@ use log::trace;
use rand::{thread_rng, Rng};
pub use slog_scope::with_logger;
pub use slog;
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use core::result;
/// Configuration for telemetry.
+1 -3
View File
@@ -7,8 +7,7 @@ edition = "2018"
[dependencies]
log = { version = "0.4", optional = true }
hex-literal = { version = "0.1.0", optional = true }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
keyring = { package = "substrate-keyring", path = "../keyring", optional = true }
substrate-client = { path = "../client", default-features = false }
@@ -38,7 +37,6 @@ std = [
"log",
"hex-literal",
"serde",
"serde_derive",
"substrate-client/std",
"keyring",
"parity-codec/std",
+16 -6
View File
@@ -506,6 +506,14 @@ name = "environmental"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "erased-serde"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "error-chain"
version = "0.12.0"
@@ -1892,6 +1900,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "serde"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive"
@@ -1962,6 +1973,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "slog"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "slog-async"
@@ -1979,6 +1993,7 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2057,7 +2072,6 @@ dependencies = [
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
@@ -2077,7 +2091,6 @@ dependencies = [
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
]
@@ -2164,7 +2177,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -2344,8 +2356,6 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-version 1.0.0",
"substrate-panic-handler 1.0.0",
@@ -2415,7 +2425,6 @@ dependencies = [
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 1.0.0",
"substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)",
@@ -3073,6 +3082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac"
"checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983"
"checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c"
"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60"
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
@@ -9,8 +9,7 @@ error-chain = "0.12"
futures = "0.1"
log = "0.4"
parking_lot = "0.7.1"
serde = "1.0"
serde_derive = "1.0"
serde = { version = "1.0", features = ["derive"] }
substrate-primitives = { path = "../../primitives" }
sr-primitives = { path = "../../sr-primitives" }
@@ -20,7 +20,7 @@ use futures::{
Stream,
sync::mpsc,
};
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
/// Possible extrinsic status events
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+1 -3
View File
@@ -5,8 +5,7 @@ authors = ["Anonymous"]
edition = "2018"
[dependencies]
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
safe-mix = { version = "1.0", default-features = false }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
rstd = { package = "sr-std", path = "../../core/sr-std", default_features = false }
@@ -46,7 +45,6 @@ std = [
"timestamp/std",
"sudo/std",
"version/std",
"serde_derive",
"serde",
"safe-mix/std",
"consensus-aura/std",
+1 -1
View File
@@ -6,7 +6,7 @@
#![recursion_limit="256"]
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use parity_codec::{Encode, Decode};
use rstd::prelude::*;
#[cfg(feature = "std")]
+17 -11
View File
@@ -506,6 +506,14 @@ name = "environmental"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "erased-serde"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "error-chain"
version = "0.12.0"
@@ -1275,7 +1283,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -1927,6 +1934,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "serde"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive"
@@ -1997,6 +2007,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "slog"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "slog-async"
@@ -2014,6 +2027,7 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2092,7 +2106,6 @@ dependencies = [
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
@@ -2112,7 +2125,6 @@ dependencies = [
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
]
@@ -2156,7 +2168,6 @@ dependencies = [
"hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
"srml-support 1.0.0",
@@ -2201,7 +2212,6 @@ version = "1.0.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
]
@@ -2264,7 +2274,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -2312,7 +2321,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -2506,8 +2514,6 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-version 1.0.0",
"substrate-panic-handler 1.0.0",
@@ -2577,7 +2583,6 @@ dependencies = [
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 1.0.0",
"substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)",
@@ -2621,7 +2626,7 @@ dependencies = [
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3200,6 +3205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac"
"checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983"
"checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c"
"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60"
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
+1 -3
View File
@@ -5,8 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
@@ -23,6 +22,5 @@ std = [
"primitives/std",
"rstd/std",
"runtime_primitives/std",
"serde_derive",
"serde",
]
+20 -18
View File
@@ -506,6 +506,14 @@ name = "environmental"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "erased-serde"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "error-chain"
version = "0.12.0"
@@ -1274,7 +1282,6 @@ version = "1.0.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
@@ -1960,6 +1967,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "serde"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive"
@@ -2030,6 +2040,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "slog"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "slog-async"
@@ -2047,6 +2060,7 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2125,7 +2139,6 @@ dependencies = [
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
@@ -2156,7 +2169,6 @@ dependencies = [
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
]
@@ -2200,7 +2212,6 @@ dependencies = [
"hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
"srml-support 1.0.0",
@@ -2217,7 +2228,6 @@ dependencies = [
"parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)",
"pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-sandbox 1.0.0",
@@ -2226,7 +2236,7 @@ dependencies = [
"srml-system 1.0.0",
"srml-timestamp 1.0.0",
"substrate-primitives 1.0.0",
"wasmi-validation 0.1.0",
"wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2253,7 +2263,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -2281,7 +2290,6 @@ dependencies = [
"hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
"srml-support 1.0.0",
@@ -2295,7 +2303,6 @@ version = "1.0.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
"srml-consensus 1.0.0",
@@ -2330,7 +2337,6 @@ version = "1.0.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 1.0.0",
"substrate-primitives 1.0.0",
]
@@ -2393,7 +2399,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -2441,7 +2446,6 @@ dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
@@ -2470,7 +2474,6 @@ dependencies = [
"hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 1.0.0",
"sr-std 1.0.0",
"srml-balances 1.0.0",
@@ -2650,8 +2653,6 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 1.0.0",
"sr-version 1.0.0",
"substrate-panic-handler 1.0.0",
@@ -2732,7 +2733,6 @@ dependencies = [
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 1.0.0",
"substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)",
@@ -2776,7 +2776,7 @@ dependencies = [
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3208,9 +3208,9 @@ dependencies = [
[[package]]
name = "wasmi-validation"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3364,6 +3364,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac"
"checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983"
"checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c"
"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60"
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
@@ -3576,6 +3577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d"
"checksum wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab380192444b3e8522ae79c0a1976e42a82920916ccdfbce3def89f456ea33f3"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
+1 -3
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
hex-literal = "0.1.0"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
substrate-primitives = { path = "../../core/primitives", default-features = false }
inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false }
@@ -23,7 +22,6 @@ runtime_io = { package = "sr-io", path = "../../core/sr-io" }
default = ["std"]
std = [
"serde",
"serde_derive",
"parity-codec/std",
"substrate-primitives/std",
"rstd/std",
+1 -1
View File
@@ -127,7 +127,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
use rstd::prelude::*;
use parity_codec as codec;
use codec::{Encode, Decode};
+1 -3
View File
@@ -5,8 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
pwasm-utils = { version = "0.6.1", default-features = false }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
parity-wasm = { version = "0.31", default-features = false }
@@ -34,7 +33,6 @@ core = [
]
std = [
"serde",
"serde_derive",
"parity-codec/std",
"substrate-primitives/std",
"runtime-primitives/std",
+1 -1
View File
@@ -91,7 +91,7 @@ use crate::exec::ExecutionContext;
use crate::account_db::{AccountDb, DirectAccountDb};
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use substrate_primitives::crypto::UncheckedFrom;
use rstd::prelude::*;
use rstd::marker::PhantomData;
+1 -3
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
hex-literal = "0.1.0"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
safe-mix = { version = "1.0", default-features = false}
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
@@ -24,7 +23,6 @@ balances = { package = "srml-balances", path = "../balances" }
default = ["std"]
std = [
"serde",
"serde_derive",
"safe-mix/std",
"parity-codec/std",
"rstd/std",
@@ -17,7 +17,7 @@
//! Voting thresholds.
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use parity_codec::{Encode, Decode};
use primitives::traits::{Zero, IntegerSquareRoot};
use rstd::ops::{Add, Mul, Div, Rem};
+1 -3
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
hex-literal = "0.1.0"
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false }
inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
@@ -25,7 +24,6 @@ parking_lot = "0.7"
default = ["std"]
std = [
"serde/std",
"serde_derive",
"parity-codec/std",
"rstd/std",
"srml-support/std",
+1 -4
View File
@@ -5,9 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
#hex-literal = "0.1.0"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
substrate-primitives = { path = "../../core/primitives", default-features = false }
substrate-finality-grandpa-primitives = { path = "../../core/finality-grandpa/primitives", default-features = false }
@@ -26,7 +24,6 @@ runtime_io = { package = "sr-io", path = "../../core/sr-io" }
default = ["std"]
std = [
"serde",
"serde_derive",
"parity-codec/std",
"substrate-primitives/std",
"substrate-finality-grandpa-primitives/std",
+1 -1
View File
@@ -31,7 +31,7 @@
pub use substrate_finality_grandpa_primitives as fg_primitives;
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
use rstd::prelude::*;
use parity_codec as codec;
use codec::{Encode, Decode};
+1 -3
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false }
@@ -18,5 +17,4 @@ std = [
"rstd/std",
"primitives/std",
"serde",
"serde_derive"
]
+1 -1
View File
@@ -23,7 +23,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
#[cfg(feature = "std")]
use parity_codec::{Decode, Input};
use parity_codec::{Encode, Output};
+1 -3
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
hex-literal = { version = "0.1.0", optional = true }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.5.1", default-features = false, features = ["derive"] }
srml-metadata = { path = "../metadata", default-features = false }
sr-std = { path = "../../core/sr-std", default-features = false }
@@ -29,7 +28,6 @@ std = [
"once_cell",
"bitmask/std",
"serde",
"serde_derive",
"runtime_io/std",
"parity-codec/std",
"sr-std/std",
+1 -7
View File
@@ -28,8 +28,6 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn
/// extern crate srml_support;
/// #[macro_use]
/// extern crate parity_codec as codec;
/// #[macro_use]
/// extern crate serde_derive;
///
/// decl_event!(
/// pub enum Event {
@@ -48,8 +46,6 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn
/// extern crate parity_codec as codec;
/// #[macro_use]
/// extern crate parity_codec;
/// #[macro_use]
/// extern crate serde_derive;
///
/// trait Trait {
/// type Balance;
@@ -97,8 +93,6 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn
/// extern crate parity_codec as codec;
/// #[macro_use]
/// extern crate parity_codec;
/// #[macro_use]
/// extern crate serde_derive;
///
///# struct DefaultInstance;
///# trait Instance {}
@@ -509,7 +503,7 @@ macro_rules! __impl_outer_event_json_metadata {
#[allow(dead_code)]
mod tests {
use super::*;
use serde_derive::Serialize;
use serde::Serialize;
use parity_codec::{Encode, Decode};
mod system {
+1 -1
View File
@@ -159,7 +159,7 @@ pub enum Void {}
#[cfg(feature = "std")]
#[doc(hidden)]
pub use serde_derive::*;
pub use serde::{Serialize, Deserialize};
/// Programatically create derivations for tuples of up to 19 elements. You provide a second macro
/// which is called once per tuple size, along with a number of identifiers, one for each element
+1 -2
View File
@@ -5,8 +5,7 @@ authors = ["thiolliere <gui.thiolliere@gmail.com>"]
edition = "2018"
[dev-dependencies]
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0" }
serde = { version = "1.0", default-features = false, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
runtime_io = { package = "sr-io", path = "../../../core/sr-io", default-features = false }
srml-support = { path = "../", default-features = false }
@@ -17,7 +17,7 @@
#![recursion_limit="128"]
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
use runtime_io::{with_externalities, Blake2Hasher};
use srml_support::rstd::prelude::*;
use srml_support::rstd as rstd;
@@ -168,7 +168,7 @@ mod module1 {
>;
/// A logs in this module.
#[cfg_attr(feature = "std", derive(serde_derive::Serialize, Debug))]
#[cfg_attr(feature = "std", derive(serde::Serialize, Debug))]
#[derive(parity_codec::Encode, parity_codec::Decode, PartialEq, Eq, Clone)]
pub enum RawLog<T, I> {
_Phantom(rstd::marker::PhantomData<(T, I)>),
@@ -242,7 +242,7 @@ mod module2 {
>;
/// A logs in this module.
#[cfg_attr(feature = "std", derive(serde_derive::Serialize, Debug))]
#[cfg_attr(feature = "std", derive(serde::Serialize, Debug))]
#[derive(parity_codec::Encode, parity_codec::Decode, PartialEq, Eq, Clone)]
pub enum RawLog<T, I=DefaultInstance> {
_Phantom(rstd::marker::PhantomData<(T, I)>),
+2 -4
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
hex-literal = "0.1.0"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
safe-mix = { version = "1.0", default-features = false}
parity-codec = { version = "3.5", default-features = false, features = ["derive"] }
substrate-primitives = { path = "../../core/primitives", default-features = false }
@@ -23,7 +22,6 @@ criterion = "0.2"
default = ["std"]
std = [
"serde",
"serde_derive",
"safe-mix/std",
"parity-codec/std",
"substrate-primitives/std",
@@ -35,4 +33,4 @@ std = [
[[bench]]
name = "bench"
harness = false
harness = false
+1 -1
View File
@@ -72,7 +72,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]
use serde_derive::Serialize;
use serde::Serialize;
use rstd::prelude::*;
#[cfg(any(feature = "std", test))]
use rstd::map;
+1 -3
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies]
hex-literal = "0.1.0"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
@@ -23,7 +22,6 @@ substrate-primitives = { path = "../../core/primitives" }
default = ["std"]
std = [
"serde",
"serde_derive",
"parity-codec/std",
"rstd/std",
"runtime_primitives/std",
+1 -1
View File
@@ -19,7 +19,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]
use serde_derive::{Serialize, Deserialize};
use serde::{Serialize, Deserialize};
use rstd::prelude::*;
use srml_support::{StorageValue, StorageMap, decl_module, decl_storage, decl_event, ensure};
use srml_support::traits::{Currency, ReservableCurrency, OnDilution, OnUnbalanced, Imbalance};