mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Migrate srml-assets, srml-aura, srml-balances and srml-consens to the 2018 edition (#1633)
This commit is contained in:
committed by
Bastian Köcher
parent
0242cee284
commit
1cb02c318b
Generated
-2
@@ -2927,7 +2927,6 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
@@ -2965,7 +2964,6 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.0.0 (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.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
|
||||
+1
@@ -1090,6 +1090,7 @@ dependencies = [
|
||||
"mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"once_cell 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.0.0 (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.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
||||
BIN
Binary file not shown.
Generated
+1
-7
@@ -1165,16 +1165,13 @@ dependencies = [
|
||||
"parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
"sr-std 0.1.0",
|
||||
"srml-consensus 0.1.0",
|
||||
"srml-staking 0.1.0",
|
||||
"srml-support 0.1.0",
|
||||
"srml-system 0.1.0",
|
||||
"srml-timestamp 0.1.0",
|
||||
"substrate-inherents 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1183,16 +1180,13 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.0.0 (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.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
"sr-std 0.1.0",
|
||||
"srml-support 0.1.0",
|
||||
"srml-system 0.1.0",
|
||||
"substrate-keyring 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1203,7 +1197,6 @@ dependencies = [
|
||||
"parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
"sr-std 0.1.0",
|
||||
"srml-support 0.1.0",
|
||||
@@ -1398,6 +1391,7 @@ dependencies = [
|
||||
"mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"once_cell 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.0.0 (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.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
||||
BIN
Binary file not shown.
@@ -2,29 +2,30 @@
|
||||
name = "srml-assets"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hex-literal = "0.1.0"
|
||||
serde = { version = "1.0", default-features = false }
|
||||
parity-codec = { version = "3.0", default-features = false }
|
||||
parity-codec-derive = { version = "3.0", default-features = false }
|
||||
# Needed for various traits. In our case, `OnFinalise`.
|
||||
primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
|
||||
# Needed for type-safe access to storage DB.
|
||||
srml-support = { path = "../support", default-features = false }
|
||||
# `system` module provides us with all sorts of useful stuff and macros depend on it being around.
|
||||
system = { package = "srml-system", path = "../system", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
sr-std = { path = "../../core/sr-std", default-features = false }
|
||||
sr-io = { path = "../../core/sr-io", default-features = false }
|
||||
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
|
||||
srml-support = { path = "../support", default-features = false }
|
||||
srml-system = { path = "../system", default-features = false }
|
||||
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"serde/std",
|
||||
"parity-codec/std",
|
||||
"parity-codec-derive/std",
|
||||
"substrate-primitives/std",
|
||||
"sr-std/std",
|
||||
"sr-io/std",
|
||||
"sr-primitives/std",
|
||||
"primitives/std",
|
||||
"srml-support/std",
|
||||
"srml-system/std",
|
||||
"system/std",
|
||||
]
|
||||
|
||||
@@ -19,32 +19,10 @@
|
||||
// Ensure we're `no_std` when compiling for Wasm.
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
// Assert macros used in tests.
|
||||
extern crate sr_std;
|
||||
|
||||
// Needed for tests (`with_externalities`).
|
||||
#[cfg(test)]
|
||||
extern crate sr_io as runtime_io;
|
||||
|
||||
// Needed for the set of mock primitives used in our tests.
|
||||
#[cfg(test)]
|
||||
extern crate substrate_primitives;
|
||||
|
||||
// Needed for deriving `Encode` and `Decode` for `RawEvent`.
|
||||
#[macro_use]
|
||||
extern crate parity_codec_derive;
|
||||
extern crate parity_codec as codec;
|
||||
|
||||
// Needed for type-safe access to storage DB.
|
||||
#[macro_use]
|
||||
extern crate srml_support as runtime_support;
|
||||
|
||||
// Needed for various traits. In our case, `OnFinalise`.
|
||||
extern crate sr_primitives as primitives;
|
||||
// `system` module provides us with all sorts of useful stuff and macros
|
||||
// depend on it being around.
|
||||
extern crate srml_system as system;
|
||||
|
||||
use runtime_support::{StorageValue, StorageMap, Parameter};
|
||||
use primitives::traits::{Member, SimpleArithmetic, Zero, StaticLookup};
|
||||
use system::ensure_signed;
|
||||
|
||||
@@ -2,41 +2,38 @@
|
||||
name = "srml-aura"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hex-literal = "0.1.0"
|
||||
parity-codec = { version = "3.0", default-features = false }
|
||||
parity-codec-derive = { version = "3.0", default-features = false }
|
||||
serde = { version = "1.0", default-features = false }
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
substrate-inherents = { path = "../../core/inherents", default-features = false }
|
||||
sr-std = { path = "../../core/sr-std", default-features = false }
|
||||
sr-io = { path = "../../core/sr-io", default-features = false }
|
||||
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
|
||||
inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
|
||||
primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
|
||||
srml-support = { path = "../support", default-features = false }
|
||||
srml-system = { path = "../system", default-features = false }
|
||||
srml-consensus = { path = "../consensus", default-features = false }
|
||||
srml-timestamp = { path = "../timestamp", default-features = false }
|
||||
srml-staking = { path = "../staking", default-features = false }
|
||||
system = { package = "srml-system", path = "../system", default-features = false }
|
||||
timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false }
|
||||
staking = { package = "srml-staking", path = "../staking", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
lazy_static = "1.0"
|
||||
parking_lot = "0.7.1"
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
|
||||
consensus = { package = "srml-consensus", path = "../consensus", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"serde/std",
|
||||
"parity-codec/std",
|
||||
"parity-codec-derive/std",
|
||||
"substrate-primitives/std",
|
||||
"sr-std/std",
|
||||
"sr-io/std",
|
||||
"rstd/std",
|
||||
"srml-support/std",
|
||||
"sr-primitives/std",
|
||||
"srml-system/std",
|
||||
"srml-consensus/std",
|
||||
"srml-timestamp/std",
|
||||
"srml-staking/std",
|
||||
"substrate-inherents/std",
|
||||
"primitives/std",
|
||||
"system/std",
|
||||
"timestamp/std",
|
||||
"staking/std",
|
||||
"inherents/std",
|
||||
]
|
||||
|
||||
@@ -18,34 +18,10 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
extern crate sr_std as rstd;
|
||||
|
||||
#[macro_use]
|
||||
extern crate parity_codec_derive;
|
||||
extern crate parity_codec;
|
||||
|
||||
#[macro_use]
|
||||
extern crate srml_support as runtime_support;
|
||||
|
||||
extern crate sr_primitives as primitives;
|
||||
extern crate srml_system as system;
|
||||
pub extern crate srml_timestamp as timestamp;
|
||||
extern crate srml_staking as staking;
|
||||
extern crate substrate_primitives;
|
||||
extern crate substrate_inherents as inherents;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate srml_consensus as consensus;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate sr_io as runtime_io;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate parking_lot;
|
||||
pub use timestamp;
|
||||
|
||||
use rstd::{result, prelude::*};
|
||||
use runtime_support::storage::StorageValue;
|
||||
@@ -55,6 +31,7 @@ use timestamp::OnTimestampSet;
|
||||
use timestamp::TimestampInherentData;
|
||||
#[cfg(feature = "std")]
|
||||
use parity_codec::Decode;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use inherents::{RuntimeString, InherentIdentifier, InherentData, ProvideInherent, MakeFatalError};
|
||||
#[cfg(feature = "std")]
|
||||
use inherents::{InherentDataProviders, ProvideInherentData};
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use primitives::{BuildStorage, traits::IdentityLookup, testing::{Digest, DigestItem, Header, UintAuthorityId}};
|
||||
use runtime_io;
|
||||
use substrate_primitives::{H256, Blake2Hasher};
|
||||
use {Trait, Module, consensus, system, timestamp};
|
||||
use crate::{Trait, Module};
|
||||
|
||||
impl_outer_origin!{
|
||||
pub enum Origin for Test {}
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
|
||||
#![cfg(test)]
|
||||
|
||||
use mock::{System, Aura, new_test_ext};
|
||||
use lazy_static::lazy_static;
|
||||
use crate::mock::{System, Aura, new_test_ext};
|
||||
use primitives::traits::Header;
|
||||
use runtime_io::with_externalities;
|
||||
use parking_lot::Mutex;
|
||||
use {AuraReport, HandleReport};
|
||||
use crate::{AuraReport, HandleReport};
|
||||
|
||||
#[test]
|
||||
fn aura_report_gets_skipped_correctly() {
|
||||
|
||||
@@ -2,20 +2,22 @@
|
||||
name = "srml-balances"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hex-literal = "0.1.0"
|
||||
serde = { version = "1.0", default-features = false }
|
||||
safe-mix = { version = "1.0", default-features = false}
|
||||
parity-codec = { version = "3.0", default-features = false }
|
||||
parity-codec-derive = { version = "3.0", default-features = false }
|
||||
substrate-keyring = { path = "../../core/keyring", optional = true }
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
sr-std = { path = "../../core/sr-std", default-features = false }
|
||||
sr-io = { path = "../../core/sr-io", default-features = false }
|
||||
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
|
||||
primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
|
||||
srml-support = { path = "../support", default-features = false }
|
||||
srml-system = { path = "../system", default-features = false }
|
||||
system = { package = "srml-system", path = "../system", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@@ -24,11 +26,8 @@ std = [
|
||||
"safe-mix/std",
|
||||
"substrate-keyring",
|
||||
"parity-codec/std",
|
||||
"parity-codec-derive/std",
|
||||
"substrate-primitives/std",
|
||||
"sr-std/std",
|
||||
"sr-io/std",
|
||||
"rstd/std",
|
||||
"srml-support/std",
|
||||
"sr-primitives/std",
|
||||
"srml-system/std",
|
||||
"primitives/std",
|
||||
"system/std",
|
||||
]
|
||||
|
||||
@@ -27,23 +27,9 @@
|
||||
#[macro_use]
|
||||
extern crate srml_support as runtime_support;
|
||||
|
||||
extern crate sr_std as rstd;
|
||||
|
||||
#[macro_use]
|
||||
extern crate parity_codec_derive;
|
||||
|
||||
extern crate parity_codec as codec;
|
||||
extern crate sr_primitives as primitives;
|
||||
extern crate srml_system as system;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate sr_io as runtime_io;
|
||||
#[cfg(test)]
|
||||
extern crate substrate_primitives;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::{cmp, result};
|
||||
use codec::Codec;
|
||||
use parity_codec::Codec;
|
||||
use runtime_support::{StorageValue, StorageMap, Parameter};
|
||||
use runtime_support::dispatch::Result;
|
||||
use primitives::traits::{Zero, SimpleArithmetic, MakePayment,
|
||||
|
||||
@@ -22,7 +22,7 @@ use primitives::BuildStorage;
|
||||
use primitives::{traits::{IdentityLookup}, testing::{Digest, DigestItem, Header}};
|
||||
use substrate_primitives::{H256, Blake2Hasher};
|
||||
use runtime_io;
|
||||
use {GenesisConfig, Module, Trait, system};
|
||||
use crate::{GenesisConfig, Module, Trait};
|
||||
|
||||
impl_outer_origin!{
|
||||
pub enum Origin for Runtime {}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "srml-consensus"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hex-literal = "0.1.0"
|
||||
@@ -9,12 +10,14 @@ serde = { version = "1.0", default-features = false }
|
||||
parity-codec = { version = "3.0", default-features = false }
|
||||
parity-codec-derive = { version = "3.0", default-features = false }
|
||||
substrate-primitives = { path = "../../core/primitives", default-features = false }
|
||||
substrate-inherents = { path = "../../core/inherents", default-features = false }
|
||||
sr-std = { path = "../../core/sr-std", default-features = false }
|
||||
sr-io = { path = "../../core/sr-io", default-features = false }
|
||||
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
|
||||
inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
|
||||
primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false }
|
||||
srml-support = { path = "../support", default-features = false }
|
||||
srml-system = { path = "../system", default-features = false }
|
||||
system = { package = "srml-system", path = "../system", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@@ -22,10 +25,9 @@ std = [
|
||||
"serde/std",
|
||||
"parity-codec/std",
|
||||
"substrate-primitives/std",
|
||||
"sr-std/std",
|
||||
"sr-io/std",
|
||||
"rstd/std",
|
||||
"srml-support/std",
|
||||
"sr-primitives/std",
|
||||
"srml-system/std",
|
||||
"substrate-inherents/std",
|
||||
"primitives/std",
|
||||
"system/std",
|
||||
"inherents/std",
|
||||
]
|
||||
|
||||
@@ -18,27 +18,13 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
extern crate sr_std as rstd;
|
||||
|
||||
#[macro_use]
|
||||
extern crate srml_support as runtime_support;
|
||||
|
||||
extern crate parity_codec;
|
||||
#[macro_use]
|
||||
extern crate parity_codec_derive;
|
||||
|
||||
extern crate sr_primitives as primitives;
|
||||
extern crate parity_codec as codec;
|
||||
extern crate srml_system as system;
|
||||
extern crate substrate_primitives;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate sr_io as runtime_io;
|
||||
|
||||
extern crate substrate_inherents as inherents;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use parity_codec::Encode;
|
||||
use parity_codec as codec;
|
||||
use codec::Encode;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use runtime_support::{storage, Parameter};
|
||||
use runtime_support::storage::StorageValue;
|
||||
use runtime_support::storage::unhashed::StorageVec;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use primitives::{BuildStorage, traits::IdentityLookup, testing::{Digest, DigestItem, Header, UintAuthorityId}};
|
||||
use runtime_io;
|
||||
use substrate_primitives::{H256, Blake2Hasher};
|
||||
use {GenesisConfig, Trait, Module, system};
|
||||
use crate::{GenesisConfig, Trait, Module};
|
||||
|
||||
impl_outer_origin!{
|
||||
pub enum Origin for Test {}
|
||||
@@ -33,7 +33,7 @@ pub struct Test;
|
||||
impl Trait for Test {
|
||||
type Log = DigestItem;
|
||||
type SessionKey = UintAuthorityId;
|
||||
type InherentOfflineReport = ::InstantFinalityReportVec<()>;
|
||||
type InherentOfflineReport = crate::InstantFinalityReportVec<()>;
|
||||
}
|
||||
impl system::Trait for Test {
|
||||
type Origin = Origin;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use primitives::{generic, testing::{self, UintAuthorityId}, traits::OnFinalise};
|
||||
use runtime_io::with_externalities;
|
||||
use mock::{Consensus, System, new_test_ext};
|
||||
use crate::mock::{Consensus, System, new_test_ext};
|
||||
use inherents::{InherentData, ProvideInherent};
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user