diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 825ac0f9b2..9a6afd5c11 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -4210,7 +4210,6 @@ dependencies = [ "sr-primitives 2.0.0", "sr-std 2.0.0", "srml-support 2.0.0", - "srml-support-procedural 2.0.0", "srml-system 2.0.0", "substrate-primitives 2.0.0", ] diff --git a/substrate/core/application-crypto/Cargo.toml b/substrate/core/application-crypto/Cargo.toml index 6d39b12653..4e4f896f29 100644 --- a/substrate/core/application-crypto/Cargo.toml +++ b/substrate/core/application-crypto/Cargo.toml @@ -10,7 +10,7 @@ primitives = { package = "substrate-primitives", path = "../primitives", default codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true, features = ["derive"] } rstd = { package = "sr-std", path = "../sr-std", default-features = false } -rio = { package = "sr-io", path = "../sr-io", default-features = false } +runtime-io = { package = "sr-io", path = "../sr-io", default-features = false } [dev-dependencies] test-client = { package = "substrate-test-runtime-client", path = "../test-runtime/client" } @@ -18,4 +18,4 @@ sr-primitives = { path = "../sr-primitives" } [features] default = [ "std" ] -std = [ "primitives/std", "codec/std", "serde", "rstd/std", "rio/std" ] +std = [ "primitives/std", "codec/std", "serde", "rstd/std", "runtime-io/std" ] diff --git a/substrate/core/application-crypto/src/ed25519.rs b/substrate/core/application-crypto/src/ed25519.rs index 6c5458492b..209743bd28 100644 --- a/substrate/core/application-crypto/src/ed25519.rs +++ b/substrate/core/application-crypto/src/ed25519.rs @@ -34,19 +34,19 @@ impl RuntimePublic for Public { type Signature = Signature; fn all(key_type: KeyTypeId) -> crate::Vec { - rio::ed25519_public_keys(key_type) + runtime_io::ed25519_public_keys(key_type) } fn generate_pair(key_type: KeyTypeId, seed: Option<&str>) -> Self { - rio::ed25519_generate(key_type, seed) + runtime_io::ed25519_generate(key_type, seed) } fn sign>(&self, key_type: KeyTypeId, msg: &M) -> Option { - rio::ed25519_sign(key_type, self, msg) + runtime_io::ed25519_sign(key_type, self, msg) } fn verify>(&self, msg: &M, signature: &Self::Signature) -> bool { - rio::ed25519_verify(&signature, msg.as_ref(), self) + runtime_io::ed25519_verify(&signature, msg.as_ref(), self) } } diff --git a/substrate/core/application-crypto/src/sr25519.rs b/substrate/core/application-crypto/src/sr25519.rs index af112dc70e..e333208966 100644 --- a/substrate/core/application-crypto/src/sr25519.rs +++ b/substrate/core/application-crypto/src/sr25519.rs @@ -34,19 +34,19 @@ impl RuntimePublic for Public { type Signature = Signature; fn all(key_type: KeyTypeId) -> crate::Vec { - rio::sr25519_public_keys(key_type) + runtime_io::sr25519_public_keys(key_type) } fn generate_pair(key_type: KeyTypeId, seed: Option<&str>) -> Self { - rio::sr25519_generate(key_type, seed) + runtime_io::sr25519_generate(key_type, seed) } fn sign>(&self, key_type: KeyTypeId, msg: &M) -> Option { - rio::sr25519_sign(key_type, self, msg) + runtime_io::sr25519_sign(key_type, self, msg) } fn verify>(&self, msg: &M, signature: &Self::Signature) -> bool { - rio::sr25519_verify(&signature, msg.as_ref(), self) + runtime_io::sr25519_verify(&signature, msg.as_ref(), self) } } diff --git a/substrate/srml/assets/Cargo.toml b/substrate/srml/assets/Cargo.toml index d5924cfdda..ea5973254e 100644 --- a/substrate/srml/assets/Cargo.toml +++ b/substrate/srml/assets/Cargo.toml @@ -10,14 +10,14 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = # Needed for various traits. In our case, `OnFinalize`. sr-primitives = { path = "../../core/sr-primitives", default-features = false } # Needed for type-safe access to storage DB. -srml-support = { path = "../support", default-features = false } +support = { package = "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] primitives = { package = "substrate-primitives", path = "../../core/primitives" } rstd = { package = "sr-std", path = "../../core/sr-std" } -runtime_io = { package = "sr-io", path = "../../core/sr-io" } +runtime-io = { package = "sr-io", path = "../../core/sr-io" } [features] default = ["std"] @@ -25,6 +25,6 @@ std = [ "serde", "codec/std", "sr-primitives/std", - "srml-support/std", + "support/std", "system/std", ] diff --git a/substrate/srml/assets/src/lib.rs b/substrate/srml/assets/src/lib.rs index a8268d1463..33bf32503f 100644 --- a/substrate/srml/assets/src/lib.rs +++ b/substrate/srml/assets/src/lib.rs @@ -130,7 +130,7 @@ // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -use srml_support::{StorageValue, StorageMap, Parameter, decl_module, decl_event, decl_storage, ensure}; +use support::{StorageValue, StorageMap, Parameter, decl_module, decl_event, decl_storage, ensure}; use sr_primitives::traits::{Member, SimpleArithmetic, Zero, StaticLookup}; use system::ensure_signed; use sr_primitives::traits::One; @@ -240,7 +240,7 @@ mod tests { use super::*; use runtime_io::with_externalities; - use srml_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types}; + use support::{impl_outer_origin, assert_ok, assert_noop, parameter_types}; use primitives::{H256, Blake2Hasher}; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. diff --git a/substrate/srml/aura/Cargo.toml b/substrate/srml/aura/Cargo.toml index 06a5a94635..961c178c34 100644 --- a/substrate/srml/aura/Cargo.toml +++ b/substrate/srml/aura/Cargo.toml @@ -13,8 +13,8 @@ rstd = { package = "sr-std", path = "../../core/sr-std", default-features = fals serde = { version = "1.0", optional = true } session = { package = "srml-session", path = "../session", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false, features = [ "wasm-nice-panic-message" ] } -srml-support = { path = "../support", default-features = false } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false, features = [ "wasm-nice-panic-message" ] } +support = { package = "srml-support", path = "../support", default-features = false } substrate-consensus-aura-primitives = { path = "../../core/consensus/aura/primitives", default-features = false} system = { package = "srml-system", path = "../system", default-features = false } timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false } @@ -29,12 +29,12 @@ std = [ "app-crypto/std", "codec/std", "inherents/std", - "runtime_io/std", + "runtime-io/std", "primitives/std", "rstd/std", "serde", "sr-primitives/std", - "srml-support/std", + "support/std", "substrate-consensus-aura-primitives/std", "system/std", "timestamp/std", diff --git a/substrate/srml/aura/src/lib.rs b/substrate/srml/aura/src/lib.rs index f3ce6a9e09..f2b6818a45 100644 --- a/substrate/srml/aura/src/lib.rs +++ b/substrate/srml/aura/src/lib.rs @@ -49,7 +49,7 @@ pub use timestamp; use rstd::{result, prelude::*}; use codec::{Encode, Decode}; -use srml_support::{ +use support::{ decl_storage, decl_module, Parameter, storage::StorageValue, traits::{Get, FindAuthor}, ConsensusEngineId, }; diff --git a/substrate/srml/aura/src/mock.rs b/substrate/srml/aura/src/mock.rs index 5861b11e07..6dc8953e88 100644 --- a/substrate/srml/aura/src/mock.rs +++ b/substrate/srml/aura/src/mock.rs @@ -24,7 +24,7 @@ use sr_primitives::{ traits::IdentityLookup, Perbill, testing::{Header, UintAuthorityId}, }; -use srml_support::{impl_outer_origin, parameter_types}; +use support::{impl_outer_origin, parameter_types}; use runtime_io; use primitives::{H256, Blake2Hasher}; diff --git a/substrate/srml/authority-discovery/Cargo.toml b/substrate/srml/authority-discovery/Cargo.toml index f4c2d4e2b0..0657348457 100644 --- a/substrate/srml/authority-discovery/Cargo.toml +++ b/substrate/srml/authority-discovery/Cargo.toml @@ -13,8 +13,8 @@ rstd = { package = "sr-std", path = "../../core/sr-std", default-features = fals serde = { version = "1.0", optional = true } session = { package = "srml-session", path = "../session", default-features = false } im-online = { package = "srml-im-online", path = "../im-online", default-features = false } -srml-support = { path = "../support", default-features = false } -sr-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } +runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] @@ -30,8 +30,8 @@ std = [ "serde", "session/std", "im-online/std", - "srml-support/std", - "sr-io/std", + "support/std", + "runtime-io/std", "system/std", "app-crypto/std", ] diff --git a/substrate/srml/authority-discovery/src/lib.rs b/substrate/srml/authority-discovery/src/lib.rs index d52b225d2c..76b0c93c4f 100644 --- a/substrate/srml/authority-discovery/src/lib.rs +++ b/substrate/srml/authority-discovery/src/lib.rs @@ -31,7 +31,7 @@ use app_crypto::RuntimeAppPublic; use codec::{Decode, Encode}; use rstd::prelude::*; -use srml_support::{decl_module, decl_storage, StorageValue}; +use support::{decl_module, decl_storage, StorageValue}; pub trait Trait: system::Trait + session::Trait + im_online::Trait {} @@ -132,13 +132,13 @@ mod tests { use app_crypto::Pair; use primitives::testing::KeyStore; use primitives::{crypto::key_types, sr25519, traits::BareCryptoStore, H256}; - use sr_io::{with_externalities, TestExternalities}; + use runtime_io::{with_externalities, TestExternalities}; use sr_primitives::generic::UncheckedExtrinsic; use sr_primitives::testing::{Header, UintAuthorityId}; use sr_primitives::traits::{ConvertInto, IdentityLookup, OpaqueKeys}; use sr_primitives::Perbill; use sr_staking_primitives::CurrentElectedSet; - use srml_support::{impl_outer_origin, parameter_types}; + use support::{impl_outer_origin, parameter_types}; type AuthorityDiscovery = Module; type SessionIndex = u32; diff --git a/substrate/srml/authorship/Cargo.toml b/substrate/srml/authorship/Cargo.toml index e7f7b0941b..db3cb133f4 100644 --- a/substrate/srml/authorship/Cargo.toml +++ b/substrate/srml/authorship/Cargo.toml @@ -11,9 +11,9 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false } [features] default = ["std"] @@ -23,7 +23,7 @@ std = [ "inherents/std", "sr-primitives/std", "rstd/std", - "srml-support/std", + "support/std", "system/std", - "runtime_io/std", + "runtime-io/std", ] diff --git a/substrate/srml/authorship/src/lib.rs b/substrate/srml/authorship/src/lib.rs index c71c26df02..e7055dddb8 100644 --- a/substrate/srml/authorship/src/lib.rs +++ b/substrate/srml/authorship/src/lib.rs @@ -22,9 +22,9 @@ use rstd::{result, prelude::*}; use rstd::collections::btree_set::BTreeSet; -use srml_support::{decl_module, decl_storage, for_each_tuple, StorageValue}; -use srml_support::traits::{FindAuthor, VerifySeal, Get}; -use srml_support::dispatch::Result as DispatchResult; +use support::{decl_module, decl_storage, for_each_tuple, StorageValue}; +use support::traits::{FindAuthor, VerifySeal, Get}; +use support::dispatch::Result as DispatchResult; use codec::{Encode, Decode}; use system::ensure_none; use sr_primitives::traits::{Header as HeaderT, One, Zero}; @@ -441,7 +441,7 @@ mod tests { use sr_primitives::testing::Header; use sr_primitives::generic::DigestItem; use sr_primitives::Perbill; - use srml_support::{parameter_types, impl_outer_origin, ConsensusEngineId}; + use support::{parameter_types, impl_outer_origin, ConsensusEngineId}; impl_outer_origin!{ pub enum Origin for Test {} diff --git a/substrate/srml/babe/Cargo.toml b/substrate/srml/babe/Cargo.toml index 039ccea3df..35828fdb1c 100644 --- a/substrate/srml/babe/Cargo.toml +++ b/substrate/srml/babe/Cargo.toml @@ -12,12 +12,12 @@ inherents = { package = "substrate-inherents", path = "../../core/inherents", de rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } sr-staking-primitives = { path = "../../core/sr-staking-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false } session = { package = "srml-session", path = "../session", default-features = false } babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../core/consensus/babe/primitives", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false, features = [ "wasm-nice-panic-message" ] } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false, features = [ "wasm-nice-panic-message" ] } [dev-dependencies] lazy_static = "1.3.0" @@ -30,7 +30,7 @@ std = [ "serde", "codec/std", "rstd/std", - "srml-support/std", + "support/std", "sr-primitives/std", "sr-staking-primitives/std", "system/std", @@ -38,5 +38,5 @@ std = [ "inherents/std", "babe-primitives/std", "session/std", - "runtime_io/std", + "runtime-io/std", ] diff --git a/substrate/srml/babe/src/lib.rs b/substrate/srml/babe/src/lib.rs index e21f083eb6..17c405dc25 100644 --- a/substrate/srml/babe/src/lib.rs +++ b/substrate/srml/babe/src/lib.rs @@ -26,7 +26,7 @@ pub use timestamp; use rstd::{result, prelude::*}; -use srml_support::{decl_storage, decl_module, StorageValue, StorageMap, traits::FindAuthor, traits::Get}; +use support::{decl_storage, decl_module, StorageValue, StorageMap, traits::FindAuthor, traits::Get}; use timestamp::{OnTimestampSet}; use sr_primitives::{generic::DigestItem, ConsensusEngineId, Perbill}; use sr_primitives::traits::{IsMember, SaturatedConversion, Saturating, RandomnessBeacon}; diff --git a/substrate/srml/balances/Cargo.toml b/substrate/srml/balances/Cargo.toml index d3ac0c96b3..ca885de678 100644 --- a/substrate/srml/balances/Cargo.toml +++ b/substrate/srml/balances/Cargo.toml @@ -11,11 +11,11 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = substrate-keyring = { path = "../../core/keyring", optional = true } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", 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 } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false } primitives = { package = "substrate-primitives", path = "../../core/primitives" } [features] @@ -26,7 +26,7 @@ std = [ "substrate-keyring", "codec/std", "rstd/std", - "srml-support/std", + "support/std", "sr-primitives/std", "system/std", ] diff --git a/substrate/srml/balances/src/lib.rs b/substrate/srml/balances/src/lib.rs index 289dfbf93f..80caa59f21 100644 --- a/substrate/srml/balances/src/lib.rs +++ b/substrate/srml/balances/src/lib.rs @@ -106,7 +106,7 @@ //! The Contract module uses the `Currency` trait to handle gas payment, and its types inherit from `Currency`: //! //! ``` -//! use srml_support::traits::Currency; +//! use support::traits::Currency; //! # pub trait Trait: system::Trait { //! # type Currency: Currency; //! # } @@ -120,14 +120,14 @@ //! The Staking module uses the `LockableCurrency` trait to lock a stash account's funds: //! //! ``` -//! use srml_support::traits::{WithdrawReasons, LockableCurrency}; +//! use support::traits::{WithdrawReasons, LockableCurrency}; //! use sr_primitives::traits::Bounded; //! pub trait Trait: system::Trait { //! type Currency: LockableCurrency; //! } //! # struct StakingLedger { //! # stash: ::AccountId, -//! # total: <::Currency as srml_support::traits::Currency<::AccountId>>::Balance, +//! # total: <::Currency as support::traits::Currency<::AccountId>>::Balance, //! # phantom: std::marker::PhantomData, //! # } //! # const STAKING_ID: [u8; 8] = *b"staking "; @@ -161,13 +161,13 @@ use rstd::prelude::*; use rstd::{cmp, result, mem}; use codec::{Codec, Encode, Decode}; -use srml_support::{StorageValue, StorageMap, Parameter, decl_event, decl_storage, decl_module}; -use srml_support::traits::{ +use support::{StorageValue, StorageMap, Parameter, decl_event, decl_storage, decl_module}; +use support::traits::{ UpdateBalanceOutcome, Currency, OnFreeBalanceZero, OnUnbalanced, WithdrawReason, WithdrawReasons, LockIdentifier, LockableCurrency, ExistenceRequirement, Imbalance, SignedImbalance, ReservableCurrency, Get, }; -use srml_support::dispatch::Result; +use support::dispatch::Result; use sr_primitives::traits::{ Zero, SimpleArithmetic, StaticLookup, Member, CheckedAdd, CheckedSub, MaybeSerializeDebug, Saturating, Bounded, SignedExtension, SaturatedConversion, DispatchError, Convert, diff --git a/substrate/srml/balances/src/mock.rs b/substrate/srml/balances/src/mock.rs index a90c5d56b2..12a49fc90d 100644 --- a/substrate/srml/balances/src/mock.rs +++ b/substrate/srml/balances/src/mock.rs @@ -22,8 +22,8 @@ use sr_primitives::{Perbill, traits::{Convert, IdentityLookup}, testing::Header, weights::{DispatchInfo, Weight}}; use primitives::{H256, Blake2Hasher}; use runtime_io; -use srml_support::{impl_outer_origin, parameter_types}; -use srml_support::traits::Get; +use support::{impl_outer_origin, parameter_types}; +use support::traits::Get; use std::cell::RefCell; use crate::{GenesisConfig, Module, Trait}; diff --git a/substrate/srml/balances/src/tests.rs b/substrate/srml/balances/src/tests.rs index 1af3ce6ba0..777206910d 100644 --- a/substrate/srml/balances/src/tests.rs +++ b/substrate/srml/balances/src/tests.rs @@ -21,7 +21,7 @@ use super::*; use mock::{Balances, ExtBuilder, Runtime, System, info_from_weight, CALL}; use runtime_io::with_externalities; -use srml_support::{ +use support::{ assert_noop, assert_ok, assert_err, traits::{LockableCurrency, LockIdentifier, WithdrawReason, WithdrawReasons, Currency, ReservableCurrency} diff --git a/substrate/srml/collective/Cargo.toml b/substrate/srml/collective/Cargo.toml index 7aaba7c29f..dce2920a12 100644 --- a/substrate/srml/collective/Cargo.toml +++ b/substrate/srml/collective/Cargo.toml @@ -10,9 +10,9 @@ safe-mix = { version = "1.0", default-features = false} codec = { package = "parity-scale-codec", version = "1.0.0", 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 } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "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 } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] @@ -27,8 +27,8 @@ std = [ "primitives/std", "rstd/std", "serde", - "runtime_io/std", - "srml-support/std", + "runtime-io/std", + "support/std", "sr-primitives/std", "system/std", ] diff --git a/substrate/srml/collective/src/lib.rs b/substrate/srml/collective/src/lib.rs index 03f5362021..24208f2697 100644 --- a/substrate/srml/collective/src/lib.rs +++ b/substrate/srml/collective/src/lib.rs @@ -27,7 +27,7 @@ use rstd::{prelude::*, result}; use primitives::u32_trait::Value as U32; use sr_primitives::traits::{Hash, EnsureOrigin}; use sr_primitives::weights::SimpleDispatchInfo; -use srml_support::{ +use support::{ dispatch::{Dispatchable, Parameter}, codec::{Encode, Decode}, traits::{ChangeMembers, InitializeMembers}, StorageValue, StorageMap, decl_module, decl_event, decl_storage, ensure, @@ -379,7 +379,7 @@ impl< #[cfg(test)] mod tests { use super::*; - use srml_support::{Hashable, assert_ok, assert_noop, parameter_types}; + use support::{Hashable, assert_ok, assert_noop, parameter_types}; use system::{EventRecord, Phase}; use hex_literal::hex; use runtime_io::with_externalities; @@ -427,7 +427,7 @@ mod tests { pub type Block = sr_primitives::generic::Block; pub type UncheckedExtrinsic = sr_primitives::generic::UncheckedExtrinsic; - srml_support::construct_runtime!( + support::construct_runtime!( pub enum Test where Block = Block, NodeBlock = Block, diff --git a/substrate/srml/contracts/Cargo.toml b/substrate/srml/contracts/Cargo.toml index a013571edf..13aa8d32de 100644 --- a/substrate/srml/contracts/Cargo.toml +++ b/substrate/srml/contracts/Cargo.toml @@ -15,7 +15,7 @@ sr-primitives = { path = "../../core/sr-primitives", default-features = false } runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sandbox = { package = "sr-sandbox", path = "../../core/sr-sandbox", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false } @@ -39,7 +39,7 @@ std = [ "runtime-io/std", "rstd/std", "sandbox/std", - "srml-support/std", + "support/std", "system/std", "timestamp/std", "parity-wasm/std", diff --git a/substrate/srml/contracts/src/account_db.rs b/substrate/srml/contracts/src/account_db.rs index 9f8b29e0bd..6ce1dff22b 100644 --- a/substrate/srml/contracts/src/account_db.rs +++ b/substrate/srml/contracts/src/account_db.rs @@ -26,8 +26,8 @@ use rstd::collections::btree_map::{BTreeMap, Entry}; use rstd::prelude::*; use runtime_io::blake2_256; use sr_primitives::traits::{Bounded, Zero}; -use srml_support::traits::{Currency, Get, Imbalance, SignedImbalance, UpdateBalanceOutcome}; -use srml_support::{storage::child, StorageMap}; +use support::traits::{Currency, Get, Imbalance, SignedImbalance, UpdateBalanceOutcome}; +use support::{storage::child, StorageMap}; use system; // Note: we don't provide Option because we can't create diff --git a/substrate/srml/contracts/src/exec.rs b/substrate/srml/contracts/src/exec.rs index 586ee3746b..8308a9180c 100644 --- a/substrate/srml/contracts/src/exec.rs +++ b/substrate/srml/contracts/src/exec.rs @@ -22,7 +22,7 @@ use crate::rent; use rstd::prelude::*; use sr_primitives::traits::{Bounded, CheckedAdd, CheckedSub, Zero}; -use srml_support::traits::{WithdrawReason, Currency}; +use support::traits::{WithdrawReason, Currency}; use timestamp; pub type AccountIdOf = ::AccountId; diff --git a/substrate/srml/contracts/src/gas.rs b/substrate/srml/contracts/src/gas.rs index a5811e81a0..8e1ffbca0b 100644 --- a/substrate/srml/contracts/src/gas.rs +++ b/substrate/srml/contracts/src/gas.rs @@ -18,8 +18,8 @@ use crate::{GasSpent, Module, Trait, BalanceOf, NegativeImbalanceOf}; use rstd::convert::TryFrom; use sr_primitives::BLOCK_FULL; use sr_primitives::traits::{CheckedMul, Zero, SaturatedConversion, SimpleArithmetic, UniqueSaturatedInto}; -use srml_support::StorageValue; -use srml_support::traits::{Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced, WithdrawReason}; +use support::StorageValue; +use support::traits::{Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced, WithdrawReason}; #[cfg(test)] use std::{any::Any, fmt::Debug}; diff --git a/substrate/srml/contracts/src/lib.rs b/substrate/srml/contracts/src/lib.rs index 7618551298..37299d4488 100644 --- a/substrate/srml/contracts/src/lib.rs +++ b/substrate/srml/contracts/src/lib.rs @@ -103,12 +103,12 @@ use runtime_io::blake2_256; use sr_primitives::traits::{ Hash, StaticLookup, Zero, MaybeSerializeDebug, Member }; -use srml_support::dispatch::{Result, Dispatchable}; -use srml_support::{ +use support::dispatch::{Result, Dispatchable}; +use support::{ Parameter, StorageMap, StorageValue, decl_module, decl_event, decl_storage, storage::child, parameter_types, }; -use srml_support::traits::{OnFreeBalanceZero, OnUnbalanced, Currency, Get}; +use support::traits::{OnFreeBalanceZero, OnUnbalanced, Currency, Get}; use system::{ensure_signed, RawOrigin, ensure_root}; use primitives::storage::well_known_keys::CHILD_STORAGE_KEY_PREFIX; use timestamp; diff --git a/substrate/srml/contracts/src/rent.rs b/substrate/srml/contracts/src/rent.rs index fea6cdc7f3..776f804ee7 100644 --- a/substrate/srml/contracts/src/rent.rs +++ b/substrate/srml/contracts/src/rent.rs @@ -17,8 +17,8 @@ use crate::{BalanceOf, ContractInfo, ContractInfoOf, TombstoneContractInfo, Trait, AliveContractInfo}; use sr_primitives::traits::{Bounded, CheckedDiv, CheckedMul, Saturating, Zero, SaturatedConversion}; -use srml_support::traits::{Currency, ExistenceRequirement, Get, WithdrawReason}; -use srml_support::StorageMap; +use support::traits::{Currency, ExistenceRequirement, Get, WithdrawReason}; +use support::StorageMap; #[derive(PartialEq, Eq, Copy, Clone)] #[must_use] diff --git a/substrate/srml/contracts/src/tests.rs b/substrate/srml/contracts/src/tests.rs index 6ac1a50764..91c3e4f712 100644 --- a/substrate/srml/contracts/src/tests.rs +++ b/substrate/srml/contracts/src/tests.rs @@ -33,7 +33,7 @@ use runtime_io::with_externalities; use sr_primitives::testing::{Digest, DigestItem, Header, UintAuthorityId, H256}; use sr_primitives::traits::{BlakeTwo256, Hash, IdentityLookup}; use sr_primitives::{Perbill, BuildStorage}; -use srml_support::{ +use support::{ assert_ok, assert_err, impl_outer_dispatch, impl_outer_event, impl_outer_origin, parameter_types, storage::child, StorageMap, StorageValue, traits::{Currency, Get}, }; @@ -49,7 +49,7 @@ mod contract { // needs to give a name for the current crate. // This hack is required for `impl_outer_event!`. pub use super::super::*; - use srml_support::impl_outer_event; + use support::impl_outer_event; } impl_outer_event! { pub enum MetaEvent for Test { diff --git a/substrate/srml/contracts/src/wasm/code_cache.rs b/substrate/srml/contracts/src/wasm/code_cache.rs index 9e8fcab8c2..80fb3e18f6 100644 --- a/substrate/srml/contracts/src/wasm/code_cache.rs +++ b/substrate/srml/contracts/src/wasm/code_cache.rs @@ -31,7 +31,7 @@ use crate::wasm::{prepare, runtime::Env, PrefabWasmModule}; use crate::{CodeHash, CodeStorage, PristineCode, Schedule, Trait}; use rstd::prelude::*; use sr_primitives::traits::{Hash, Bounded}; -use srml_support::StorageMap; +use support::StorageMap; /// Gas metering token that used for charging storing code into the code storage. /// diff --git a/substrate/srml/council/src/lib.rs b/substrate/srml/council/src/lib.rs index 635d62fd2c..3ec76a15e1 100644 --- a/substrate/srml/council/src/lib.rs +++ b/substrate/srml/council/src/lib.rs @@ -39,8 +39,8 @@ mod tests { // These re-exports are here for a reason, edit with care pub use super::*; pub use runtime_io::with_externalities; - use srml_support::{impl_outer_origin, impl_outer_event, impl_outer_dispatch, parameter_types}; - use srml_support::traits::Get; + use support::{impl_outer_origin, impl_outer_event, impl_outer_dispatch, parameter_types}; + use support::traits::Get; pub use primitives::{H256, Blake2Hasher, u32_trait::{_1, _2, _3, _4}}; pub use sr_primitives::traits::{BlakeTwo256, IdentityLookup}; pub use sr_primitives::testing::{Digest, DigestItem, Header}; diff --git a/substrate/srml/democracy/Cargo.toml b/substrate/srml/democracy/Cargo.toml index b6341a8225..22f091e4d3 100644 --- a/substrate/srml/democracy/Cargo.toml +++ b/substrate/srml/democracy/Cargo.toml @@ -9,9 +9,9 @@ serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false} codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "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 } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] @@ -25,8 +25,8 @@ std = [ "safe-mix/std", "codec/std", "rstd/std", - "runtime_io/std", - "srml-support/std", + "runtime-io/std", + "support/std", "sr-primitives/std", "system/std", ] diff --git a/substrate/srml/democracy/src/lib.rs b/substrate/srml/democracy/src/lib.rs index f267763217..1fc694bece 100644 --- a/substrate/srml/democracy/src/lib.rs +++ b/substrate/srml/democracy/src/lib.rs @@ -23,7 +23,7 @@ use rstd::{result, convert::TryFrom}; use sr_primitives::traits::{Zero, Bounded, CheckedMul, CheckedDiv, EnsureOrigin, Hash}; use sr_primitives::weights::SimpleDispatchInfo; use codec::{Encode, Decode, Input, Output, Error}; -use srml_support::{ +use support::{ decl_module, decl_storage, decl_event, ensure, StorageValue, StorageMap, StorageLinkedMap, Parameter, Dispatchable, traits::{ @@ -31,7 +31,7 @@ use srml_support::{ OnFreeBalanceZero } }; -use srml_support::dispatch::Result; +use support::dispatch::Result; use system::{ensure_signed, ensure_root}; mod vote_threshold; @@ -970,7 +970,7 @@ impl OnFreeBalanceZero for Module { mod tests { use super::*; use runtime_io::with_externalities; - use srml_support::{ + use support::{ impl_outer_origin, impl_outer_dispatch, assert_noop, assert_ok, parameter_types, traits::Contains }; diff --git a/substrate/srml/elections/Cargo.toml b/substrate/srml/elections/Cargo.toml index d6043bb2d0..d479906737 100644 --- a/substrate/srml/elections/Cargo.toml +++ b/substrate/srml/elections/Cargo.toml @@ -10,9 +10,9 @@ safe-mix = { version = "1.0", default-features = false} codec = { package = "parity-scale-codec", version = "1.0.0", 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 } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "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 } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] @@ -27,8 +27,8 @@ std = [ "primitives/std", "rstd/std", "serde", - "runtime_io/std", - "srml-support/std", + "runtime-io/std", + "support/std", "sr-primitives/std", "system/std", ] diff --git a/substrate/srml/elections/src/lib.rs b/substrate/srml/elections/src/lib.rs index c9aec6df4c..b14ffa9463 100644 --- a/substrate/srml/elections/src/lib.rs +++ b/substrate/srml/elections/src/lib.rs @@ -27,7 +27,7 @@ use rstd::prelude::*; use sr_primitives::traits::{Zero, One, StaticLookup, Bounded, Saturating}; use sr_primitives::weights::SimpleDispatchInfo; use runtime_io::print; -use srml_support::{ +use support::{ StorageValue, StorageMap, dispatch::Result, decl_storage, decl_event, ensure, decl_module, traits::{ @@ -1102,7 +1102,7 @@ impl Module { mod tests { use super::*; use std::cell::RefCell; - use srml_support::{assert_ok, assert_err, assert_noop, parameter_types}; + use support::{assert_ok, assert_err, assert_noop, parameter_types}; use runtime_io::with_externalities; use primitives::{H256, Blake2Hasher}; use sr_primitives::{ @@ -1227,7 +1227,7 @@ mod tests { pub type Block = sr_primitives::generic::Block; pub type UncheckedExtrinsic = sr_primitives::generic::UncheckedExtrinsic; - srml_support::construct_runtime!( + support::construct_runtime!( pub enum Test where Block = Block, NodeBlock = Block, diff --git a/substrate/srml/example/Cargo.toml b/substrate/srml/example/Cargo.toml index 73e280605a..30addfa727 100644 --- a/substrate/srml/example/Cargo.toml +++ b/substrate/srml/example/Cargo.toml @@ -7,12 +7,12 @@ edition = "2018" [dependencies] serde = { version = "1.0", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } balances = { package = "srml-balances", path = "../balances", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } -rio = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } [dev-dependencies] primitives = { package = "substrate-primitives", path = "../../core/primitives" } @@ -23,9 +23,9 @@ std = [ "serde", "codec/std", "sr-primitives/std", - "srml-support/std", + "support/std", "system/std", "balances/std", - "rio/std", + "runtime-io/std", "rstd/std" ] diff --git a/substrate/srml/example/src/lib.rs b/substrate/srml/example/src/lib.rs index 247be01239..596defae04 100644 --- a/substrate/srml/example/src/lib.rs +++ b/substrate/srml/example/src/lib.rs @@ -254,7 +254,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::marker::PhantomData; -use srml_support::{StorageValue, dispatch::Result, decl_module, decl_storage, decl_event}; +use support::{StorageValue, dispatch::Result, decl_module, decl_storage, decl_event}; use system::{ensure_signed, ensure_root}; use codec::{Encode, Decode}; use sr_primitives::{ @@ -576,7 +576,7 @@ impl SignedExtension for WatchDummy { // check for `set_dummy` match call { Call::set_dummy(..) => { - rio::print("set_dummy was received."); + runtime_io::print("set_dummy was received."); let mut valid_tx = ValidTransaction::default(); valid_tx.priority = Bounded::max_value(); @@ -591,8 +591,8 @@ impl SignedExtension for WatchDummy { mod tests { use super::*; - use srml_support::{assert_ok, impl_outer_origin, parameter_types}; - use rio::with_externalities; + use support::{assert_ok, impl_outer_origin, parameter_types}; + use runtime_io::with_externalities; use primitives::{H256, Blake2Hasher}; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. @@ -662,7 +662,7 @@ mod tests { // This function basically just builds a genesis storage key/value store according to // our desired mockup. - fn new_test_ext() -> rio::TestExternalities { + fn new_test_ext() -> runtime_io::TestExternalities { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); // We use default for brevity, but you can configure as desired if needed. balances::GenesisConfig::::default().assimilate_storage(&mut t).unwrap(); diff --git a/substrate/srml/executive/Cargo.toml b/substrate/srml/executive/Cargo.toml index e398a95189..c937855148 100644 --- a/substrate/srml/executive/Cargo.toml +++ b/substrate/srml/executive/Cargo.toml @@ -8,9 +8,9 @@ edition = "2018" serde = { version = "1.0", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "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 } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] @@ -23,10 +23,10 @@ balances = { package = "srml-balances", path = "../balances" } default = ["std"] std = [ "rstd/std", - "srml-support/std", + "support/std", "serde", "codec/std", "sr-primitives/std", - "runtime_io/std", + "runtime-io/std", "system/std", ] diff --git a/substrate/srml/executive/src/lib.rs b/substrate/srml/executive/src/lib.rs index d25cacf446..c6931af0a1 100644 --- a/substrate/srml/executive/src/lib.rs +++ b/substrate/srml/executive/src/lib.rs @@ -81,7 +81,7 @@ use sr_primitives::{generic::Digest, traits::{ self, Header, Zero, One, Checkable, Applyable, CheckEqual, OnFinalize, OnInitialize, NumberFor, Block as BlockT, OffchainWorker, ValidateUnsigned }}; -use srml_support::Dispatchable; +use support::Dispatchable; use codec::{Codec, Encode}; use system::{extrinsics_root, DigestOf}; use sr_primitives::{ApplyOutcome, ApplyError}; @@ -362,8 +362,8 @@ mod tests { use sr_primitives::weights::Weight; use sr_primitives::traits::{Header as HeaderT, BlakeTwo256, IdentityLookup, ConvertInto}; use sr_primitives::testing::{Digest, Header, Block}; - use srml_support::{impl_outer_event, impl_outer_origin, parameter_types}; - use srml_support::traits::{Currency, LockIdentifier, LockableCurrency, WithdrawReasons, WithdrawReason}; + use support::{impl_outer_event, impl_outer_origin, parameter_types}; + use support::traits::{Currency, LockIdentifier, LockableCurrency, WithdrawReasons, WithdrawReason}; use system; use hex_literal::hex; diff --git a/substrate/srml/finality-tracker/Cargo.toml b/substrate/srml/finality-tracker/Cargo.toml index 65ac540b6b..277c4039d2 100644 --- a/substrate/srml/finality-tracker/Cargo.toml +++ b/substrate/srml/finality-tracker/Cargo.toml @@ -10,12 +10,12 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } srml-system = { path = "../system", default-features = false } [dev-dependencies] primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false } -sr-io = { path = "../../core/sr-io", default-features = false } +runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } [features] default = ["std"] @@ -23,7 +23,7 @@ std = [ "serde/std", "codec/std", "rstd/std", - "srml-support/std", + "support/std", "sr-primitives/std", "srml-system/std", "inherents/std", diff --git a/substrate/srml/finality-tracker/src/lib.rs b/substrate/srml/finality-tracker/src/lib.rs index 1ed9d07dbb..340af3e4d3 100644 --- a/substrate/srml/finality-tracker/src/lib.rs +++ b/substrate/srml/finality-tracker/src/lib.rs @@ -22,12 +22,12 @@ use inherents::{ RuntimeString, InherentIdentifier, ProvideInherent, InherentData, MakeFatalError, }; -use srml_support::StorageValue; +use support::StorageValue; use sr_primitives::traits::{One, Zero, SaturatedConversion}; use rstd::{prelude::*, result, cmp, vec}; use codec::Decode; -use srml_support::{decl_module, decl_storage, for_each_tuple}; -use srml_support::traits::Get; +use support::{decl_module, decl_storage, for_each_tuple}; +use support::traits::Get; use srml_system::{ensure_none, Trait as SystemTrait}; #[cfg(feature = "std")] @@ -265,12 +265,12 @@ impl ProvideInherent for Module { mod tests { use super::*; - use sr_io::{with_externalities, TestExternalities}; + use runtime_io::{with_externalities, TestExternalities}; use primitives::H256; use sr_primitives::traits::{BlakeTwo256, IdentityLookup, OnFinalize, Header as HeaderT}; use sr_primitives::testing::Header; use sr_primitives::Perbill; - use srml_support::{assert_ok, impl_outer_origin, parameter_types}; + use support::{assert_ok, impl_outer_origin, parameter_types}; use srml_system as system; use std::cell::RefCell; diff --git a/substrate/srml/generic-asset/Cargo.toml b/substrate/srml/generic-asset/Cargo.toml index 65e21c3b11..cfe170dd7d 100644 --- a/substrate/srml/generic-asset/Cargo.toml +++ b/substrate/srml/generic-asset/Cargo.toml @@ -13,7 +13,7 @@ support = { package = "srml-support", path = "../support", default-features = fa system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -runtime_io = { package = "sr-io", path = "../../core/sr-io" } +runtime-io ={ package = "sr-io", path = "../../core/sr-io" } primitives = { package = "substrate-primitives", path = "../../core/primitives" } [features] diff --git a/substrate/srml/grandpa/Cargo.toml b/substrate/srml/grandpa/Cargo.toml index 71e43e8692..344139db20 100644 --- a/substrate/srml/grandpa/Cargo.toml +++ b/substrate/srml/grandpa/Cargo.toml @@ -10,16 +10,15 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false } substrate-finality-grandpa-primitives = { path = "../../core/finality-grandpa/primitives", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false, features = [ "wasm-nice-panic-message" ] } sr-primitives = { path = "../../core/sr-primitives", default-features = false } sr-staking-primitives = { path = "../../core/sr-staking-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } session = { package = "srml-session", path = "../session", default-features = false } finality-tracker = { package = "srml-finality-tracker", path = "../finality-tracker", default-features = false } [dev-dependencies] -runtime_io = { package = "sr-io", path = "../../core/sr-io" } +runtime-io ={ package = "sr-io", path = "../../core/sr-io" } [features] default = ["std"] @@ -29,7 +28,7 @@ std = [ "primitives/std", "substrate-finality-grandpa-primitives/std", "rstd/std", - "srml-support/std", + "support/std", "sr-primitives/std", "sr-staking-primitives/std", "system/std", diff --git a/substrate/srml/grandpa/src/lib.rs b/substrate/srml/grandpa/src/lib.rs index f5c025b174..b59d261e1d 100644 --- a/substrate/srml/grandpa/src/lib.rs +++ b/substrate/srml/grandpa/src/lib.rs @@ -32,7 +32,7 @@ pub use substrate_finality_grandpa_primitives as fg_primitives; use rstd::prelude::*; use codec::{self as codec, Encode, Decode, Error}; -use srml_support::{ +use support::{ decl_event, decl_storage, decl_module, dispatch::Result, storage::StorageValue, storage::StorageMap, }; diff --git a/substrate/srml/grandpa/src/mock.rs b/substrate/srml/grandpa/src/mock.rs index dd6ed766ce..126aa0569a 100644 --- a/substrate/srml/grandpa/src/mock.rs +++ b/substrate/srml/grandpa/src/mock.rs @@ -20,7 +20,7 @@ use sr_primitives::{Perbill, DigestItem, traits::IdentityLookup, testing::{Header, UintAuthorityId}}; use runtime_io; -use srml_support::{impl_outer_origin, impl_outer_event, parameter_types}; +use support::{impl_outer_origin, impl_outer_event, parameter_types}; use primitives::{H256, Blake2Hasher}; use codec::{Encode, Decode}; use crate::{AuthorityId, GenesisConfig, Trait, Module, ConsensusLog}; diff --git a/substrate/srml/im-online/Cargo.toml b/substrate/srml/im-online/Cargo.toml index 5f7514755b..3dc7da86f1 100644 --- a/substrate/srml/im-online/Cargo.toml +++ b/substrate/srml/im-online/Cargo.toml @@ -11,10 +11,10 @@ primitives = { package="substrate-primitives", path = "../../core/primitives", d rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } serde = { version = "1.0", optional = true } session = { package = "srml-session", path = "../session", default-features = false } -sr-io = { path = "../../core/sr-io", default-features = false } +runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } sr-staking-primitives = { path = "../../core/sr-staking-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [features] @@ -26,9 +26,9 @@ std = [ "rstd/std", "serde", "session/std", - "sr-io/std", + "runtime-io/std", "sr-primitives/std", "sr-staking-primitives/std", - "srml-support/std", + "support/std", "system/std", ] diff --git a/substrate/srml/im-online/src/lib.rs b/substrate/srml/im-online/src/lib.rs index 701a9e753d..d6ef6c2e9c 100644 --- a/substrate/srml/im-online/src/lib.rs +++ b/substrate/srml/im-online/src/lib.rs @@ -42,7 +42,7 @@ //! ## Usage //! //! ``` -//! use srml_support::{decl_module, dispatch::Result}; +//! use support::{decl_module, dispatch::Result}; //! use system::ensure_signed; //! use srml_im_online::{self as im_online}; //! @@ -72,7 +72,7 @@ use codec::{Encode, Decode}; use primitives::offchain::{OpaqueNetworkState, StorageKind}; use rstd::prelude::*; use session::historical::IdentificationTuple; -use sr_io::Printable; +use runtime_io::Printable; use sr_primitives::{ Perbill, ApplyError, traits::{Convert, Member}, @@ -82,7 +82,7 @@ use sr_staking_primitives::{ SessionIndex, CurrentElectedSet, offence::{ReportOffence, Offence, Kind}, }; -use srml_support::{ +use support::{ decl_module, decl_event, decl_storage, print, ensure, Parameter, StorageValue, StorageDoubleMap, }; @@ -277,7 +277,7 @@ decl_module! { // Runs after every block. fn offchain_worker(now: T::BlockNumber) { // Only send messages if we are a potential validator. - if sr_io::is_validator() { + if runtime_io::is_validator() { Self::offchain(now); } } @@ -332,7 +332,7 @@ impl Module { .map(|location| (index as u32, &local_keys[location])) }) { - let network_state = sr_io::network_state().map_err(|_| OffchainErr::NetworkState)?; + let network_state = runtime_io::network_state().map_err(|_| OffchainErr::NetworkState)?; let heartbeat_data = Heartbeat { block_number, network_state, @@ -362,7 +362,7 @@ impl Module { done, gossipping_at, }; - sr_io::local_storage_compare_and_set( + runtime_io::local_storage_compare_and_set( StorageKind::PERSISTENT, DB_KEY, curr_worker_status.as_ref().map(Vec::as_slice), @@ -378,7 +378,7 @@ impl Module { done, gossipping_at, }; - sr_io::local_storage_set( + runtime_io::local_storage_set( StorageKind::PERSISTENT, DB_KEY, &enc.encode()); } @@ -389,7 +389,7 @@ impl Module { now: T::BlockNumber, next_gossip: T::BlockNumber, ) -> Result<(Option>, bool), OffchainErr> { - let last_gossip = sr_io::local_storage_get(StorageKind::PERSISTENT, DB_KEY); + let last_gossip = runtime_io::local_storage_get(StorageKind::PERSISTENT, DB_KEY); match last_gossip { Some(last) => { let worker_status: WorkerStatus = Decode::decode(&mut &last[..]) @@ -486,10 +486,10 @@ impl session::OneSessionHandler for Module { } } -impl srml_support::unsigned::ValidateUnsigned for Module { +impl support::unsigned::ValidateUnsigned for Module { type Call = Call; - fn validate_unsigned(call: &Self::Call) -> srml_support::unsigned::TransactionValidity { + fn validate_unsigned(call: &Self::Call) -> support::unsigned::TransactionValidity { if let Call::heartbeat(heartbeat, signature) = call { if >::is_online_in_current_session(heartbeat.authority_index) { // we already received a heartbeat for this authority diff --git a/substrate/srml/indices/Cargo.toml b/substrate/srml/indices/Cargo.toml index 3cbf1d88de..31fea3cd01 100644 --- a/substrate/srml/indices/Cargo.toml +++ b/substrate/srml/indices/Cargo.toml @@ -13,7 +13,7 @@ rstd = { package = "sr-std", path = "../../core/sr-std", default-features = fals runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] @@ -29,7 +29,7 @@ std = [ "primitives/std", "rstd/std", "runtime-io/std", - "srml-support/std", + "support/std", "sr-primitives/std", "system/std", ] diff --git a/substrate/srml/indices/src/lib.rs b/substrate/srml/indices/src/lib.rs index 31e825d2c8..15921ffdf4 100644 --- a/substrate/srml/indices/src/lib.rs +++ b/substrate/srml/indices/src/lib.rs @@ -21,7 +21,7 @@ use rstd::{prelude::*, result, marker::PhantomData, convert::TryInto}; use codec::{Encode, Codec}; -use srml_support::{StorageValue, StorageMap, Parameter, decl_module, decl_event, decl_storage}; +use support::{StorageValue, StorageMap, Parameter, decl_module, decl_event, decl_storage}; use sr_primitives::traits::{One, SimpleArithmetic, StaticLookup, Member}; use system::{IsDeadAccount, OnNewAccount}; diff --git a/substrate/srml/indices/src/mock.rs b/substrate/srml/indices/src/mock.rs index e28416fd3a..65a0193b5a 100644 --- a/substrate/srml/indices/src/mock.rs +++ b/substrate/srml/indices/src/mock.rs @@ -23,7 +23,7 @@ use ref_thread_local::{ref_thread_local, RefThreadLocal}; use sr_primitives::testing::Header; use sr_primitives::Perbill; use primitives::{H256, Blake2Hasher}; -use srml_support::{impl_outer_origin, parameter_types}; +use support::{impl_outer_origin, parameter_types}; use {runtime_io, system}; use crate::{GenesisConfig, Module, Trait, IsDeadAccount, OnNewAccount, ResolveHint}; diff --git a/substrate/srml/membership/Cargo.toml b/substrate/srml/membership/Cargo.toml index 7c167bbf2c..3e822ff8ac 100644 --- a/substrate/srml/membership/Cargo.toml +++ b/substrate/srml/membership/Cargo.toml @@ -8,8 +8,8 @@ edition = "2018" serde = { version = "1.0", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } -sr-io = { path = "../../core/sr-io", default-features = false } -srml-support = { path = "../support", default-features = false } +runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } @@ -23,7 +23,7 @@ std = [ "codec/std", "sr-primitives/std", "rstd/std", - "sr-io/std", - "srml-support/std", + "runtime-io/std", + "support/std", "system/std", ] diff --git a/substrate/srml/membership/src/lib.rs b/substrate/srml/membership/src/lib.rs index 76729d633d..66ff864057 100644 --- a/substrate/srml/membership/src/lib.rs +++ b/substrate/srml/membership/src/lib.rs @@ -23,7 +23,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::prelude::*; -use srml_support::{ +use support::{ StorageValue, decl_module, decl_storage, decl_event, traits::{ChangeMembers, InitializeMembers}, }; use system::ensure_root; @@ -192,8 +192,8 @@ mod tests { use super::*; use std::cell::RefCell; - use srml_support::{assert_ok, assert_noop, impl_outer_origin, parameter_types}; - use sr_io::with_externalities; + use support::{assert_ok, assert_noop, impl_outer_origin, parameter_types}; + use runtime_io::with_externalities; use primitives::{H256, Blake2Hasher}; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried. @@ -281,7 +281,7 @@ mod tests { // This function basically just builds a genesis storage key/value store according to // our desired mockup. - fn new_test_ext() -> sr_io::TestExternalities { + fn new_test_ext() -> runtime_io::TestExternalities { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); // We use default for brevity, but you can configure as desired if needed. GenesisConfig::{ diff --git a/substrate/srml/offences/Cargo.toml b/substrate/srml/offences/Cargo.toml index 4dd12413f6..39ca0f785e 100644 --- a/substrate/srml/offences/Cargo.toml +++ b/substrate/srml/offences/Cargo.toml @@ -15,7 +15,7 @@ support = { package = "srml-support", path = "../support", default-features = fa system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false } substrate-primitives = { path = "../../core/primitives" } [features] diff --git a/substrate/srml/scored-pool/Cargo.toml b/substrate/srml/scored-pool/Cargo.toml index 032f28a750..77d614fc7e 100644 --- a/substrate/srml/scored-pool/Cargo.toml +++ b/substrate/srml/scored-pool/Cargo.toml @@ -7,10 +7,10 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } -sr-io = { path = "../../core/sr-io", default-features = false } +runtime-io = { package = "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 } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] @@ -22,9 +22,9 @@ default = ["std"] std = [ "codec/std", "serde", - "sr-io/std", + "runtime-io/std", "sr-primitives/std", "rstd/std", - "srml-support/std", + "support/std", "system/std", ] diff --git a/substrate/srml/scored-pool/src/lib.rs b/substrate/srml/scored-pool/src/lib.rs index dc27b3bba9..dabe9e8123 100644 --- a/substrate/srml/scored-pool/src/lib.rs +++ b/substrate/srml/scored-pool/src/lib.rs @@ -53,7 +53,7 @@ //! ## Usage //! //! ``` -//! use srml_support::{decl_module, dispatch::Result}; +//! use support::{decl_module, dispatch::Result}; //! use system::ensure_signed; //! use srml_scored_pool::{self as scored_pool}; //! @@ -90,7 +90,7 @@ mod tests; use codec::{Encode, Decode}; use rstd::prelude::*; -use srml_support::{ +use support::{ StorageValue, StorageMap, decl_module, decl_storage, decl_event, ensure, traits::{ChangeMembers, InitializeMembers, Currency, Get, ReservableCurrency}, }; diff --git a/substrate/srml/scored-pool/src/mock.rs b/substrate/srml/scored-pool/src/mock.rs index 86c8b0d8cf..fd14abd617 100644 --- a/substrate/srml/scored-pool/src/mock.rs +++ b/substrate/srml/scored-pool/src/mock.rs @@ -19,7 +19,7 @@ use super::*; use std::cell::RefCell; -use srml_support::{impl_outer_origin, parameter_types}; +use support::{impl_outer_origin, parameter_types}; use primitives::{H256, Blake2Hasher}; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried. @@ -132,7 +132,7 @@ impl Trait for Test { // This function basically just builds a genesis storage key/value store according to // our desired mockup. -pub fn new_test_ext() -> sr_io::TestExternalities { +pub fn new_test_ext() -> runtime_io::TestExternalities { let mut t = system::GenesisConfig::default().build_storage::().unwrap(); // We use default for brevity, but you can configure as desired if needed. balances::GenesisConfig:: { diff --git a/substrate/srml/scored-pool/src/tests.rs b/substrate/srml/scored-pool/src/tests.rs index cec27e66cd..740e707ce0 100644 --- a/substrate/srml/scored-pool/src/tests.rs +++ b/substrate/srml/scored-pool/src/tests.rs @@ -19,8 +19,8 @@ use super::*; use mock::*; -use srml_support::{assert_ok, assert_noop}; -use sr_io::with_externalities; +use support::{assert_ok, assert_noop}; +use runtime_io::with_externalities; use sr_primitives::traits::OnInitialize; type ScoredPool = Module; diff --git a/substrate/srml/session/Cargo.toml b/substrate/srml/session/Cargo.toml index d016699765..c2e0732ed7 100644 --- a/substrate/srml/session/Cargo.toml +++ b/substrate/srml/session/Cargo.toml @@ -11,11 +11,11 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } sr-staking-primitives = { path = "../../core/sr-staking-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false } substrate-trie = { path = "../../core/trie", default-features = false, optional = true } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false } [dev-dependencies] primitives = { package = "substrate-primitives", path = "../../core/primitives" } @@ -30,7 +30,7 @@ std = [ "safe-mix/std", "codec/std", "rstd/std", - "srml-support/std", + "support/std", "sr-primitives/std", "sr-staking-primitives/std", "timestamp/std", diff --git a/substrate/srml/session/src/historical.rs b/substrate/srml/session/src/historical.rs index 7e4686e923..82566295da 100644 --- a/substrate/srml/session/src/historical.rs +++ b/substrate/srml/session/src/historical.rs @@ -29,10 +29,10 @@ use rstd::prelude::*; use codec::{Encode, Decode}; use sr_primitives::KeyTypeId; use sr_primitives::traits::{Convert, OpaqueKeys, Hash as HashT}; -use srml_support::{ +use support::{ StorageValue, StorageMap, decl_module, decl_storage, }; -use srml_support::{Parameter, print}; +use support::{Parameter, print}; use substrate_trie::{MemoryDB, Trie, TrieMut, Recorder, EMPTY_PREFIX}; use substrate_trie::trie_types::{TrieDBMut, TrieDB}; use super::{SessionIndex, Module as SessionModule}; @@ -277,7 +277,7 @@ pub struct Proof { trie_nodes: Vec>, } -impl> srml_support::traits::KeyOwnerProofSystem<(KeyTypeId, D)> +impl> support::traits::KeyOwnerProofSystem<(KeyTypeId, D)> for Module { type Proof = Proof; @@ -321,7 +321,7 @@ mod tests { NEXT_VALIDATORS, force_new_session, set_next_validators, Test, System, Session, }; - use srml_support::traits::KeyOwnerProofSystem; + use support::traits::KeyOwnerProofSystem; type Historical = Module; diff --git a/substrate/srml/session/src/lib.rs b/substrate/srml/session/src/lib.rs index 58a60a9875..f7c9eee021 100644 --- a/substrate/srml/session/src/lib.rs +++ b/substrate/srml/session/src/lib.rs @@ -125,11 +125,11 @@ use sr_primitives::{KeyTypeId, AppKey}; use sr_primitives::weights::SimpleDispatchInfo; use sr_primitives::traits::{Convert, Zero, Member, OpaqueKeys}; use sr_staking_primitives::SessionIndex; -use srml_support::{ +use support::{ dispatch::Result, ConsensusEngineId, StorageValue, StorageDoubleMap, for_each_tuple, decl_module, decl_event, decl_storage, }; -use srml_support::{ensure, traits::{OnFreeBalanceZero, Get, FindAuthor}, Parameter}; +use support::{ensure, traits::{OnFreeBalanceZero, Get, FindAuthor}, Parameter}; use system::{self, ensure_signed}; #[cfg(test)] @@ -651,7 +651,7 @@ impl> FindAuthor #[cfg(test)] mod tests { use super::*; - use srml_support::assert_ok; + use support::assert_ok; use runtime_io::with_externalities; use primitives::{Blake2Hasher, crypto::key_types::DUMMY}; use sr_primitives::{ diff --git a/substrate/srml/session/src/mock.rs b/substrate/srml/session/src/mock.rs index 445076be65..fe9a4ee936 100644 --- a/substrate/srml/session/src/mock.rs +++ b/substrate/srml/session/src/mock.rs @@ -18,7 +18,7 @@ use super::*; use std::cell::RefCell; -use srml_support::{impl_outer_origin, parameter_types}; +use support::{impl_outer_origin, parameter_types}; use primitives::{crypto::key_types::DUMMY, H256}; use sr_primitives::{ Perbill, impl_opaque_keys, traits::{BlakeTwo256, IdentityLookup, ConvertInto}, diff --git a/substrate/srml/staking/Cargo.toml b/substrate/srml/staking/Cargo.toml index a29b4aa4b9..93de95caa2 100644 --- a/substrate/srml/staking/Cargo.toml +++ b/substrate/srml/staking/Cargo.toml @@ -11,10 +11,10 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = substrate-keyring = { path = "../../core/keyring", optional = true } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } phragmen = { package = "substrate-phragmen", path = "../../core/phragmen", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } sr-staking-primitives = { path = "../../core/sr-staking-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } session = { package = "srml-session", path = "../session", default-features = false, features = ["historical"] } authorship = { package = "srml-authorship", path = "../authorship", default-features = false } @@ -36,8 +36,8 @@ std = [ "codec/std", "rstd/std", "phragmen/std", - "runtime_io/std", - "srml-support/std", + "runtime-io/std", + "support/std", "sr-primitives/std", "sr-staking-primitives/std", "session/std", diff --git a/substrate/srml/staking/src/lib.rs b/substrate/srml/staking/src/lib.rs index c648cbf879..12cdd2f4e9 100644 --- a/substrate/srml/staking/src/lib.rs +++ b/substrate/srml/staking/src/lib.rs @@ -136,7 +136,7 @@ //! ### Example: Rewarding a validator by id. //! //! ``` -//! use srml_support::{decl_module, dispatch::Result}; +//! use support::{decl_module, dispatch::Result}; //! use system::ensure_signed; //! use srml_staking::{self as staking}; //! @@ -261,7 +261,7 @@ mod benches; use rstd::{prelude::*, result}; use codec::{HasCompact, Encode, Decode}; -use srml_support::{ +use support::{ StorageValue, StorageMap, StorageLinkedMap, decl_module, decl_event, decl_storage, ensure, traits::{ Currency, OnFreeBalanceZero, OnDilution, LockIdentifier, LockableCurrency, diff --git a/substrate/srml/staking/src/mock.rs b/substrate/srml/staking/src/mock.rs index b7948d12fe..94e2663b57 100644 --- a/substrate/srml/staking/src/mock.rs +++ b/substrate/srml/staking/src/mock.rs @@ -23,8 +23,8 @@ use sr_primitives::testing::{Header, UintAuthorityId}; use sr_staking_primitives::SessionIndex; use primitives::{H256, Blake2Hasher}; use runtime_io; -use srml_support::{assert_ok, impl_outer_origin, parameter_types, StorageLinkedMap}; -use srml_support::traits::{Currency, Get, FindAuthor}; +use support::{assert_ok, impl_outer_origin, parameter_types, StorageLinkedMap}; +use support::traits::{Currency, Get, FindAuthor}; use crate::{ EraIndex, GenesisConfig, Module, Trait, StakerStatus, ValidatorPrefs, RewardDestination, Nominators, inflation @@ -92,7 +92,7 @@ impl_outer_origin!{ pub struct Author11; impl FindAuthor for Author11 { fn find_author<'a, I>(_digests: I) -> Option - where I: 'a + IntoIterator + where I: 'a + IntoIterator { Some(11) } diff --git a/substrate/srml/staking/src/tests.rs b/substrate/srml/staking/src/tests.rs index bc6b92e2dc..c3f3922299 100644 --- a/substrate/srml/staking/src/tests.rs +++ b/substrate/srml/staking/src/tests.rs @@ -20,9 +20,9 @@ use super::*; use runtime_io::with_externalities; use sr_primitives::traits::OnInitialize; use sr_staking_primitives::offence::{OffenceDetails, OnOffenceHandler}; -use srml_support::{assert_ok, assert_noop, assert_eq_uvec, StorageLinkedMap}; +use support::{assert_ok, assert_noop, assert_eq_uvec, StorageLinkedMap}; use mock::*; -use srml_support::traits::{Currency, ReservableCurrency}; +use support::traits::{Currency, ReservableCurrency}; #[test] fn basic_setup_works() { diff --git a/substrate/srml/sudo/Cargo.toml b/substrate/srml/sudo/Cargo.toml index 4ce20b0421..6dad983d06 100644 --- a/substrate/srml/sudo/Cargo.toml +++ b/substrate/srml/sudo/Cargo.toml @@ -8,14 +8,12 @@ edition = "2018" serde = { version = "1.0", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } -sr-io = { path = "../../core/sr-io", default-features = false } +runtime-io = { package = "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-support-procedural = { path = "../support/procedural" } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -sr-io = { path = "../../core/sr-io", default-features = false } primitives = { package = "substrate-primitives", path = "../../core/primitives" } [features] @@ -24,8 +22,8 @@ std = [ "serde", "codec/std", "rstd/std", - "sr-io/std", + "runtime-io/std", "sr-primitives/std", - "srml-support/std", + "support/std", "system/std", ] diff --git a/substrate/srml/sudo/src/lib.rs b/substrate/srml/sudo/src/lib.rs index 0a71d4d628..e933810237 100644 --- a/substrate/srml/sudo/src/lib.rs +++ b/substrate/srml/sudo/src/lib.rs @@ -51,7 +51,7 @@ //! This is an example of a module that exposes a privileged function: //! //! ``` -//! use srml_support::{decl_module, dispatch::Result}; +//! use support::{decl_module, dispatch::Result}; //! use system::ensure_root; //! //! pub trait Trait: system::Trait {} @@ -89,7 +89,7 @@ use rstd::prelude::*; use sr_primitives::traits::StaticLookup; use sr_primitives::weights::SimpleDispatchInfo; -use srml_support::{ +use support::{ StorageValue, Parameter, Dispatchable, decl_module, decl_event, decl_storage, ensure }; @@ -126,7 +126,7 @@ decl_module! { let res = match proposal.dispatch(system::RawOrigin::Root.into()) { Ok(_) => true, Err(e) => { - sr_io::print(e); + runtime_io::print(e); false } }; diff --git a/substrate/srml/support/Cargo.toml b/substrate/srml/support/Cargo.toml index 107a0683da..f1cdb69a65 100644 --- a/substrate/srml/support/Cargo.toml +++ b/substrate/srml/support/Cargo.toml @@ -9,11 +9,11 @@ serde = { version = "1.0", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.5", default-features = false, features = ["derive"] } srml-metadata = { path = "../metadata", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } -srml-support-procedural = { path = "./procedural" } +srml-support-procedural = { package = "srml-support-procedural", path = "./procedural" } paste = "0.1" once_cell = { version = "0.1.6", default-features = false, optional = true } bitmask = { version = "0.5", default-features = false } @@ -28,7 +28,7 @@ std = [ "once_cell", "bitmask/std", "serde", - "runtime_io/std", + "runtime-io/std", "codec/std", "rstd/std", "sr-primitives/std", diff --git a/substrate/srml/support/procedural/Cargo.toml b/substrate/srml/support/procedural/Cargo.toml index fba706c17e..cb719583e2 100644 --- a/substrate/srml/support/procedural/Cargo.toml +++ b/substrate/srml/support/procedural/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" proc-macro = true [dependencies] -srml-support-procedural-tools = { path = "./tools" } +srml-support-procedural-tools = { package = "srml-support-procedural-tools", path = "./tools" } sr-api-macros = { path = "../../../core/sr-api-macros" } proc-macro2 = "0.4.27" diff --git a/substrate/srml/support/procedural/tools/Cargo.toml b/substrate/srml/support/procedural/tools/Cargo.toml index bb6d24def2..037636a2a0 100644 --- a/substrate/srml/support/procedural/tools/Cargo.toml +++ b/substrate/srml/support/procedural/tools/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -srml-support-procedural-tools-derive = { path = "./derive" } +srml-support-procedural-tools-derive = { package = "srml-support-procedural-tools-derive", path = "./derive" } proc-macro2 = "0.4.27" quote = { version = "0.6.12" } syn = { version = "0.15.30", features = ["full"] } diff --git a/substrate/srml/support/test/Cargo.toml b/substrate/srml/support/test/Cargo.toml index fa3a04d3bc..b0b21fb6a3 100644 --- a/substrate/srml/support/test/Cargo.toml +++ b/substrate/srml/support/test/Cargo.toml @@ -7,8 +7,8 @@ edition = "2018" [dependencies] serde = { version = "1.0", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -runtime_io = { package = "sr-io", path = "../../../core/sr-io", default-features = false } -srml-support = { version = "2", path = "../", default-features = false } +runtime-io ={ package = "sr-io", path = "../../../core/sr-io", default-features = false } +support = { package = "srml-support", version = "2", path = "../", default-features = false } inherents = { package = "substrate-inherents", path = "../../../core/inherents", default-features = false } primitives = { package = "substrate-primitives", path = "../../../core/primitives", default-features = false } trybuild = "1" @@ -19,8 +19,8 @@ default = ["std"] std = [ "serde/std", "codec/std", - "runtime_io/std", - "srml-support/std", + "runtime-io/std", + "support/std", "inherents/std", "primitives/std", ] diff --git a/substrate/srml/support/test/src/lib.rs b/substrate/srml/support/test/src/lib.rs index a7a869cf87..0e4ab93629 100644 --- a/substrate/srml/support/test/src/lib.rs +++ b/substrate/srml/support/test/src/lib.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Test crate for srml_support. Allow to make use of `srml_support::decl_storage`. +//! Test crate for srml_support. Allow to make use of `support::decl_storage`. //! See tests directory. #[test] diff --git a/substrate/srml/support/test/tests/final_keys.rs b/substrate/srml/support/test/tests/final_keys.rs index af8e01cc5f..73de126050 100644 --- a/substrate/srml/support/test/tests/final_keys.rs +++ b/substrate/srml/support/test/tests/final_keys.rs @@ -15,8 +15,8 @@ // along with Substrate. If not, see . use runtime_io::{with_externalities, Blake2Hasher}; -use srml_support::{StorageValue, StorageMap, StorageLinkedMap, StorageDoubleMap}; -use srml_support::storage::unhashed; +use support::{StorageValue, StorageMap, StorageLinkedMap, StorageDoubleMap}; +use support::storage::unhashed; use codec::{Encode, Decode}; pub trait Trait { @@ -24,11 +24,11 @@ pub trait Trait { type BlockNumber: Encode + Decode + Default + Clone; } -srml_support::decl_module! { +support::decl_module! { pub struct Module for enum Call where origin: T::Origin {} } -srml_support::decl_storage!{ +support::decl_storage!{ trait Store for Module as FinalKeys { pub Value config(value): u32; diff --git a/substrate/srml/support/test/tests/genesisconfig.rs b/substrate/srml/support/test/tests/genesisconfig.rs index 4a43eb137e..9d03d204dc 100644 --- a/substrate/srml/support/test/tests/genesisconfig.rs +++ b/substrate/srml/support/test/tests/genesisconfig.rs @@ -19,11 +19,11 @@ pub trait Trait { type Origin; } -srml_support::decl_module! { +support::decl_module! { pub struct Module for enum Call where origin: T::Origin {} } -srml_support::decl_storage! { +support::decl_storage! { trait Store for Module as Example { pub AppendableDM config(t): double_map u32, blake2_256(T::BlockNumber) => Vec; } diff --git a/substrate/srml/support/test/tests/instance.rs b/substrate/srml/support/test/tests/instance.rs index 48af8926dd..3370c0d201 100644 --- a/substrate/srml/support/test/tests/instance.rs +++ b/substrate/srml/support/test/tests/instance.rs @@ -16,7 +16,7 @@ #![recursion_limit="128"] use runtime_io::{with_externalities, Blake2Hasher}; -use srml_support::{ +use support::{ Parameter, traits::Get, parameter_types, sr_primitives::{generic, BuildStorage, traits::{BlakeTwo256, Block as _, Verify}}, metadata::{ @@ -48,7 +48,7 @@ mod module1 { type GenericType: Default + Clone + codec::Codec; } - srml_support::decl_module! { + support::decl_module! { pub struct Module, I: InstantiableThing> for enum Call where origin: ::Origin, T::BlockNumber: From @@ -64,7 +64,7 @@ mod module1 { } } - srml_support::decl_storage! { + support::decl_storage! { trait Store for Module, I: InstantiableThing> as Module1 where T::BlockNumber: From + std::fmt::Display { @@ -81,7 +81,7 @@ mod module1 { } } - srml_support::decl_event! { + support::decl_event! { pub enum Event where Phantom = std::marker::PhantomData { _Phantom(Phantom), AnotherVariant(u32), @@ -128,7 +128,7 @@ mod module2 { impl, I: Instance> Currency for Module {} - srml_support::decl_module! { + support::decl_module! { pub struct Module, I: Instance=DefaultInstance> for enum Call where origin: ::Origin { @@ -136,7 +136,7 @@ mod module2 { } } - srml_support::decl_storage! { + support::decl_storage! { trait Store for Module, I: Instance=DefaultInstance> as Module2 { pub Value config(value): T::Amount; pub Map config(map): map u64 => u64; @@ -145,7 +145,7 @@ mod module2 { } } - srml_support::decl_event! { + support::decl_event! { pub enum Event where Amount = >::Amount { Variant(Amount), } @@ -185,7 +185,7 @@ mod module3 { type Currency2: Currency; } - srml_support::decl_module! { + support::decl_module! { pub struct Module for enum Call where origin: ::Origin {} } } @@ -244,7 +244,7 @@ impl system::Trait for Runtime { type Event = Event; } -srml_support::construct_runtime!( +support::construct_runtime!( pub enum Runtime where Block = Block, NodeBlock = Block, diff --git a/substrate/srml/support/test/tests/issue2219.rs b/substrate/srml/support/test/tests/issue2219.rs index cb8b4cef09..28bd9463ff 100644 --- a/substrate/srml/support/test/tests/issue2219.rs +++ b/substrate/srml/support/test/tests/issue2219.rs @@ -14,9 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use srml_support::sr_primitives::generic; -use srml_support::sr_primitives::traits::{BlakeTwo256, Block as _, Verify}; -use srml_support::codec::{Encode, Decode}; +use support::sr_primitives::generic; +use support::sr_primitives::traits::{BlakeTwo256, Block as _, Verify}; +use support::codec::{Encode, Decode}; use primitives::{H256, sr25519}; use serde::{Serialize, Deserialize}; @@ -82,7 +82,7 @@ mod module { pub trait Trait: system::Trait {} - srml_support::decl_module! { + support::decl_module! { pub struct Module for enum Call where origin: T::Origin {} } @@ -99,7 +99,7 @@ mod module { } } - srml_support::decl_storage! { + support::decl_storage! { trait Store for Module as Actors { /// requirements to enter and maintain status in roles pub Parameters get(parameters) build(|config: &GenesisConfig| { @@ -164,7 +164,7 @@ impl system::Trait for Runtime { impl module::Trait for Runtime {} -srml_support::construct_runtime!( +support::construct_runtime!( pub enum Runtime where Block = Block, NodeBlock = Block, diff --git a/substrate/srml/support/test/tests/reserved_keyword/on_initialize.rs b/substrate/srml/support/test/tests/reserved_keyword/on_initialize.rs index 1934ae5ea1..f9604c9487 100644 --- a/substrate/srml/support/test/tests/reserved_keyword/on_initialize.rs +++ b/substrate/srml/support/test/tests/reserved_keyword/on_initialize.rs @@ -2,7 +2,7 @@ macro_rules! reserved { ($($reserved:ident)*) => { $( mod $reserved { - pub use srml_support::dispatch::Result; + pub use support::dispatch::Result; pub trait Trait { type Origin; @@ -10,14 +10,14 @@ macro_rules! reserved { } pub mod system { - use srml_support::dispatch::Result; + use support::dispatch::Result; pub fn ensure_root(_: R) -> Result { Ok(()) } } - srml_support::decl_module! { + support::decl_module! { pub struct Module for enum Call where origin: T::Origin { fn $reserved(_origin) -> Result { unreachable!() } } diff --git a/substrate/srml/support/test/tests/system.rs b/substrate/srml/support/test/tests/system.rs index 9ea0b2bc76..afeb0e0195 100644 --- a/substrate/srml/support/test/tests/system.rs +++ b/substrate/srml/support/test/tests/system.rs @@ -1,4 +1,4 @@ -use srml_support::codec::{Encode, Decode}; +use support::codec::{Encode, Decode}; pub trait Trait: 'static + Eq + Clone { type Origin: Into, Self::Origin>> @@ -10,7 +10,7 @@ pub trait Trait: 'static + Eq + Clone { type Event: From; } -srml_support::decl_module! { +support::decl_module! { pub struct Module for enum Call where origin: T::Origin { } } @@ -20,7 +20,7 @@ impl Module { } } -srml_support::decl_event!( +support::decl_event!( pub enum Event { ExtrinsicSuccess, ExtrinsicFailed, diff --git a/substrate/srml/system/Cargo.toml b/substrate/srml/system/Cargo.toml index fb2b5296c7..f6fd25c29f 100644 --- a/substrate/srml/system/Cargo.toml +++ b/substrate/srml/system/Cargo.toml @@ -10,10 +10,10 @@ safe-mix = { version = "1.0", default-features = false} codec = { package = "parity-scale-codec", version = "1.0.0", 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 } -runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } +runtime-io ={ package = "sr-io", path = "../../core/sr-io", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } sr-version = { path = "../../core/sr-version", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } [dev-dependencies] criterion = "0.2" @@ -26,8 +26,8 @@ std = [ "codec/std", "primitives/std", "rstd/std", - "runtime_io/std", - "srml-support/std", + "runtime-io/std", + "support/std", "sr-primitives/std", "sr-version/std", ] diff --git a/substrate/srml/system/benches/bench.rs b/substrate/srml/system/benches/bench.rs index 3d10db557c..b050e80c48 100644 --- a/substrate/srml/system/benches/bench.rs +++ b/substrate/srml/system/benches/bench.rs @@ -16,7 +16,7 @@ use criterion::{Criterion, criterion_group, criterion_main, black_box}; use srml_system as system; -use srml_support::{decl_module, decl_event, impl_outer_origin, impl_outer_event}; +use support::{decl_module, decl_event, impl_outer_origin, impl_outer_event}; use runtime_io::{with_externalities, Blake2Hasher}; use primitives::H256; use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; @@ -51,7 +51,7 @@ impl_outer_event! { } } -srml_support::parameter_types! { +support::parameter_types! { pub const BlockHashCount: u64 = 250; pub const MaximumBlockWeight: u32 = 4 * 1024 * 1024; pub const MaximumBlockLength: u32 = 4 * 1024 * 1024; diff --git a/substrate/srml/system/src/lib.rs b/substrate/srml/system/src/lib.rs index 3b692d8df0..dab0c11fa5 100644 --- a/substrate/srml/system/src/lib.rs +++ b/substrate/srml/system/src/lib.rs @@ -68,7 +68,7 @@ //! ### Example - Get random seed and extrinsic count for the current block //! //! ``` -//! use srml_support::{decl_module, dispatch::Result}; +//! use support::{decl_module, dispatch::Result}; //! use srml_system::{self as system, ensure_signed}; //! //! pub trait Trait: system::Trait {} @@ -108,7 +108,7 @@ use sr_primitives::traits::{self, CheckEqual, SimpleArithmetic, Zero, SignedExte MaybeSerializeDebugButNotDeserialize, MaybeSerializeDebug, StaticLookup, One, Bounded, Lookup, }; use primitives::storage::well_known_keys; -use srml_support::{ +use support::{ storage, decl_module, decl_event, decl_storage, StorageDoubleMap, StorageValue, StorageMap, Parameter, for_each_tuple, traits::{Contains, Get} }; @@ -1144,7 +1144,7 @@ mod tests { use runtime_io::with_externalities; use primitives::H256; use sr_primitives::{traits::{BlakeTwo256, IdentityLookup}, testing::Header}; - use srml_support::{impl_outer_origin, parameter_types}; + use support::{impl_outer_origin, parameter_types}; impl_outer_origin!{ pub enum Origin for Test where system = super {} diff --git a/substrate/srml/timestamp/Cargo.toml b/substrate/srml/timestamp/Cargo.toml index 9b066a1505..022e478e57 100644 --- a/substrate/srml/timestamp/Cargo.toml +++ b/substrate/srml/timestamp/Cargo.toml @@ -10,11 +10,11 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -runtime_io = { package = "sr-io", path = "../../core/sr-io" } +runtime-io ={ package = "sr-io", path = "../../core/sr-io" } primitives = { package = "substrate-primitives", path = "../../core/primitives" } [features] @@ -24,7 +24,7 @@ std = [ "codec/std", "rstd/std", "sr-primitives/std", - "srml-support/std", + "support/std", "serde", "system/std", ] diff --git a/substrate/srml/timestamp/src/lib.rs b/substrate/srml/timestamp/src/lib.rs index 1b03b5b9af..cf7792eaa4 100644 --- a/substrate/srml/timestamp/src/lib.rs +++ b/substrate/srml/timestamp/src/lib.rs @@ -61,7 +61,7 @@ //! ### Get current timestamp //! //! ``` -//! use srml_support::{decl_module, dispatch::Result}; +//! use support::{decl_module, dispatch::Result}; //! # use srml_timestamp as timestamp; //! use system::ensure_signed; //! @@ -96,8 +96,8 @@ use codec::Encode; use codec::Decode; #[cfg(feature = "std")] use inherents::ProvideInherentData; -use srml_support::{StorageValue, Parameter, decl_storage, decl_module, for_each_tuple}; -use srml_support::traits::{Time, Get}; +use support::{StorageValue, Parameter, decl_storage, decl_module, for_each_tuple}; +use support::traits::{Time, Get}; use sr_primitives::traits::{ SimpleArithmetic, Zero, SaturatedConversion, Scale }; @@ -338,7 +338,7 @@ impl Time for Module { mod tests { use super::*; - use srml_support::{impl_outer_origin, assert_ok, parameter_types}; + use support::{impl_outer_origin, assert_ok, parameter_types}; use runtime_io::{with_externalities, TestExternalities}; use primitives::H256; use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; diff --git a/substrate/srml/treasury/Cargo.toml b/substrate/srml/treasury/Cargo.toml index ae2681e11b..55ea6aef95 100644 --- a/substrate/srml/treasury/Cargo.toml +++ b/substrate/srml/treasury/Cargo.toml @@ -9,12 +9,12 @@ serde = { version = "1.0", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } sr-primitives = { path = "../../core/sr-primitives", default-features = false } -srml-support = { path = "../support", default-features = false } +support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } balances = { package = "srml-balances", path = "../balances", default-features = false } [dev-dependencies] -runtime_io = { package = "sr-io", path = "../../core/sr-io" } +runtime-io ={ package = "sr-io", path = "../../core/sr-io" } primitives = { package = "substrate-primitives", path = "../../core/primitives" } [features] @@ -24,7 +24,7 @@ std = [ "codec/std", "rstd/std", "sr-primitives/std", - "srml-support/std", + "support/std", "system/std", "balances/std", ] diff --git a/substrate/srml/treasury/src/lib.rs b/substrate/srml/treasury/src/lib.rs index ef2b9e69fe..0ee4919c5d 100644 --- a/substrate/srml/treasury/src/lib.rs +++ b/substrate/srml/treasury/src/lib.rs @@ -70,8 +70,8 @@ #[cfg(feature = "std")] use serde::{Serialize, Deserialize}; use rstd::prelude::*; -use srml_support::{StorageValue, StorageMap, decl_module, decl_storage, decl_event, ensure, print}; -use srml_support::traits::{ +use support::{StorageValue, StorageMap, decl_module, decl_storage, decl_event, ensure, print}; +use support::traits::{ Currency, ExistenceRequirement, Get, Imbalance, OnDilution, OnUnbalanced, ReservableCurrency, WithdrawReason }; @@ -357,7 +357,7 @@ mod tests { use super::*; use runtime_io::with_externalities; - use srml_support::{assert_noop, assert_ok, impl_outer_origin, parameter_types}; + use support::{assert_noop, assert_ok, impl_outer_origin, parameter_types}; use primitives::{H256, Blake2Hasher}; use sr_primitives::{Perbill, traits::{BlakeTwo256, OnFinalize, IdentityLookup}, testing::Header};