mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 00:48:01 +00:00
Rename: primitives/sr-std -> primitives/sp-std (#4327)
* primitives/sr-std -> primitives/std * fix * fix conflict * rstd -> sp-std * git mv * fix review * fix merge
This commit is contained in:
@@ -123,7 +123,7 @@ members = [
|
||||
"primitives/runtime",
|
||||
"primitives/sr-sandbox",
|
||||
"primitives/sr-staking-primitives",
|
||||
"primitives/sr-std",
|
||||
"primitives/std",
|
||||
"primitives/sr-version",
|
||||
"primitives/state-machine",
|
||||
"primitives/timestamp",
|
||||
|
||||
@@ -17,7 +17,7 @@ inherents = { package = "sp-inherents", path = "../../../primitives/inherents",
|
||||
offchain-primitives = { package = "sp-offchain", path = "../../../primitives/offchain", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
|
||||
randomness-collective-flip = { package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
@@ -50,7 +50,7 @@ std = [
|
||||
"offchain-primitives/std",
|
||||
"primitives/std",
|
||||
"randomness-collective-flip/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"safe-mix/std",
|
||||
"serde",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use primitives::OpaqueMetadata;
|
||||
use sp_runtime::{
|
||||
ApplyExtrinsicResult, transaction_validity::TransactionValidity, generic, create_runtime_str,
|
||||
|
||||
@@ -21,7 +21,7 @@ inherents = { package = "sp-inherents", path = "../../../primitives/inherents",
|
||||
node-primitives = { path = "../primitives", default-features = false }
|
||||
offchain-primitives = { package = "sp-offchain", path = "../../../primitives/offchain", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../../primitives/std", default-features = false }
|
||||
sp-api = { path = "../../../primitives/sr-api", default-features = false }
|
||||
sp-runtime = { path = "../../../primitives/runtime", default-features = false }
|
||||
sp-staking = { path = "../../../primitives/sr-staking-primitives", default-features = false }
|
||||
@@ -97,7 +97,7 @@ std = [
|
||||
"offences/std",
|
||||
"primitives/std",
|
||||
"randomness-collective-flip/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"rustc-hex",
|
||||
"safe-mix/std",
|
||||
"serde",
|
||||
|
||||
@@ -47,7 +47,7 @@ impl Convert<u128, Balance> for CurrencyToVoteHandler {
|
||||
|
||||
/// Convert from weight to balance via a simple coefficient multiplication
|
||||
/// The associated type C encapsulates a constant in units of balance per weight
|
||||
pub struct LinearWeightToFee<C>(rstd::marker::PhantomData<C>);
|
||||
pub struct LinearWeightToFee<C>(sp_std::marker::PhantomData<C>);
|
||||
|
||||
impl<C: Get<Balance>> Convert<Weight, Balance> for LinearWeightToFee<C> {
|
||||
fn convert(w: Weight) -> Balance {
|
||||
@@ -66,7 +66,7 @@ impl<C: Get<Balance>> Convert<Weight, Balance> for LinearWeightToFee<C> {
|
||||
///
|
||||
/// Where `target_weight` must be given as the `Get` implementation of the `T` generic type.
|
||||
/// https://research.web3.foundation/en/latest/polkadot/Token%20Economics/#relay-chain-transaction-fees
|
||||
pub struct TargetedFeeAdjustment<T>(rstd::marker::PhantomData<T>);
|
||||
pub struct TargetedFeeAdjustment<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
impl<T: Get<Perbill>> Convert<Fixed64, Fixed64> for TargetedFeeAdjustment<T> {
|
||||
fn convert(multiplier: Fixed64) -> Fixed64 {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||
#![recursion_limit="256"]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use support::{
|
||||
construct_runtime, parameter_types,
|
||||
weights::Weight,
|
||||
|
||||
@@ -22,7 +22,7 @@ kvdb = "0.1.1"
|
||||
log = { version = "0.4.8" }
|
||||
parking_lot = { version = "0.9.0" }
|
||||
primitives = { package = "sp-core", path = "../primitives/core" }
|
||||
rstd = { package = "sp-std", path = "../primitives/sr-std" }
|
||||
sp-std = { path = "../primitives/std" }
|
||||
runtime-version = { package = "sp-version", path = "../primitives/sr-version" }
|
||||
sp-api = { path = "../primitives/sr-api" }
|
||||
sp-runtime = { path = "../primitives/runtime" }
|
||||
|
||||
@@ -22,7 +22,7 @@ kvdb = "0.1.1"
|
||||
log = { version = "0.4.8" }
|
||||
parking_lot = { version = "0.9.0" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-version = { package = "sp-version", path = "../../primitives/sr-version", default-features = false }
|
||||
sp-api = { path = "../../primitives/sr-api" }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2018"
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../../primitives/std", default-features = false }
|
||||
runtime_io = { package = "sp-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
sandbox = { package = "sp-sandbox", path = "../../../primitives/sr-sandbox", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
|
||||
@@ -17,4 +17,4 @@ wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../..
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
std = ["runtime_io/std", "sandbox/std", "rstd/std"]
|
||||
std = ["runtime_io/std", "sandbox/std", "sp-std/std"]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use rstd::{vec::Vec, vec};
|
||||
use sp_std::{vec::Vec, vec};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use runtime_io::{
|
||||
|
||||
@@ -16,7 +16,7 @@ system = { package = "frame-system", path = "../system", default-features = fals
|
||||
|
||||
[dev-dependencies]
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std" }
|
||||
sp-std = { path = "../../primitives/std" }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -9,7 +9,7 @@ app-crypto = { package = "sc-application-crypto", path = "../../primitives/appl
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
session = { package = "pallet-session", path = "../session", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
@@ -33,7 +33,7 @@ std = [
|
||||
"inherents/std",
|
||||
"runtime-io/std",
|
||||
"primitives/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"serde",
|
||||
"sp-runtime/std",
|
||||
"support/std",
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
use pallet_timestamp;
|
||||
|
||||
use rstd::{result, prelude::*};
|
||||
use sp_std::{result, prelude::*};
|
||||
use codec::{Encode, Decode};
|
||||
use support::{
|
||||
decl_storage, decl_module, Parameter, traits::{Get, FindAuthor},
|
||||
|
||||
@@ -9,7 +9,7 @@ authority-discovery-primitives = { package = "sp-authority-discovery", path = ".
|
||||
app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
session = { package = "pallet-session", path = "../session", default-features = false, features = ["historical" ] }
|
||||
@@ -27,7 +27,7 @@ std = [
|
||||
"authority-discovery-primitives/std",
|
||||
"codec/std",
|
||||
"primitives/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"serde",
|
||||
"session/std",
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// Ensure we're `no_std` when compiling for Wasm.
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use support::{decl_module, decl_storage};
|
||||
use authority_discovery_primitives::AuthorityId;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ primitives = { package = "sp-core", path = "../../primitives/core", default-fea
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
sp-authorship = { path = "../../primitives/authorship", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
@@ -24,7 +24,7 @@ std = [
|
||||
"primitives/std",
|
||||
"inherents/std",
|
||||
"sp-runtime/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"system/std",
|
||||
"runtime-io/std",
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::{result, prelude::*};
|
||||
use rstd::collections::btree_set::BTreeSet;
|
||||
use sp_std::{result, prelude::*};
|
||||
use sp_std::collections::btree_set::BTreeSet;
|
||||
use support::{decl_module, decl_storage, ensure};
|
||||
use support::traits::{FindAuthor, VerifySeal, Get};
|
||||
use support::dispatch::Result as DispatchResult;
|
||||
@@ -98,7 +98,7 @@ impl<H, A> FilterUncle<H, A> for () {
|
||||
/// A filter on uncles which verifies seals and does no additional checks.
|
||||
/// This is well-suited to consensus modes such as PoW where the cost of
|
||||
/// equivocating is high.
|
||||
pub struct SealVerify<T>(rstd::marker::PhantomData<T>);
|
||||
pub struct SealVerify<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
impl<Header, Author, T: VerifySeal<Header, Author>> FilterUncle<Header, Author>
|
||||
for SealVerify<T>
|
||||
@@ -116,7 +116,7 @@ impl<Header, Author, T: VerifySeal<Header, Author>> FilterUncle<Header, Author>
|
||||
/// one uncle included per author per height.
|
||||
///
|
||||
/// This does O(n log n) work in the number of uncles included.
|
||||
pub struct OnePerAuthorPerHeight<T, N>(rstd::marker::PhantomData<(T, N)>);
|
||||
pub struct OnePerAuthorPerHeight<T, N>(sp_std::marker::PhantomData<(T, N)>);
|
||||
|
||||
impl<Header, Author, T> FilterUncle<Header, Author>
|
||||
for OnePerAuthorPerHeight<T, Header::Number>
|
||||
|
||||
@@ -9,7 +9,7 @@ hex-literal = "0.2.1"
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -32,7 +32,7 @@ default = ["std"]
|
||||
std = [
|
||||
"serde",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
"sp-staking/std",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
pub use timestamp;
|
||||
use sp_timestamp;
|
||||
|
||||
use rstd::{result, prelude::*};
|
||||
use sp_std::{result, prelude::*};
|
||||
use support::{decl_storage, decl_module, traits::FindAuthor, traits::Get};
|
||||
use sp_timestamp::OnTimestampSet;
|
||||
use sp_runtime::{generic::DigestItem, ConsensusEngineId, Perbill};
|
||||
@@ -445,7 +445,7 @@ impl<T: Trait> Module<T> {
|
||||
/// randomness. Returns the new randomness.
|
||||
fn randomness_change_epoch(next_epoch_index: u64) -> [u8; RANDOMNESS_LENGTH] {
|
||||
let this_randomness = NextRandomness::get();
|
||||
let segment_idx: u32 = <SegmentIndex>::mutate(|s| rstd::mem::replace(s, 0));
|
||||
let segment_idx: u32 = <SegmentIndex>::mutate(|s| sp_std::mem::replace(s, 0));
|
||||
|
||||
// overestimate to the segment being full.
|
||||
let rho_size = segment_idx.saturating_add(1) as usize * UNDER_CONSTRUCTION_SEGMENT_LENGTH;
|
||||
|
||||
@@ -8,7 +8,7 @@ edition = "2018"
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
@@ -24,7 +24,7 @@ std = [
|
||||
"serde",
|
||||
"safe-mix/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
"system/std",
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::{cmp, result, mem, fmt::Debug};
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::{cmp, result, mem, fmt::Debug};
|
||||
use codec::{Codec, Encode, Decode};
|
||||
use support::{
|
||||
StorageValue, Parameter, decl_event, decl_storage, decl_module,
|
||||
@@ -614,7 +614,7 @@ mod imbalances {
|
||||
result, Subtrait, DefaultInstance, Imbalance, Trait, Zero, Instance, Saturating,
|
||||
StorageValue, TryDrop,
|
||||
};
|
||||
use rstd::mem;
|
||||
use sp_std::mem;
|
||||
|
||||
/// Opaque, move-only struct with private fields that serves as a token denoting that
|
||||
/// funds have been created without any equal and opposite accounting.
|
||||
|
||||
@@ -9,7 +9,7 @@ serde = { version = "1.0.101", optional = true }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -25,7 +25,7 @@ std = [
|
||||
"safe-mix/std",
|
||||
"codec/std",
|
||||
"primitives/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"serde",
|
||||
"runtime-io/std",
|
||||
"support/std",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![recursion_limit="128"]
|
||||
|
||||
use rstd::{prelude::*, result};
|
||||
use sp_std::{prelude::*, result};
|
||||
use primitives::u32_trait::Value as U32;
|
||||
use sp_runtime::RuntimeDebug;
|
||||
use sp_runtime::traits::{Hash, EnsureOrigin};
|
||||
@@ -63,7 +63,7 @@ pub enum RawOrigin<AccountId, I> {
|
||||
/// It has been condoned by a single member of the collective.
|
||||
Member(AccountId),
|
||||
/// Dummy to manage the fact we have instancing.
|
||||
_Phantom(rstd::marker::PhantomData<I>),
|
||||
_Phantom(sp_std::marker::PhantomData<I>),
|
||||
}
|
||||
|
||||
/// Origin for the collective module.
|
||||
@@ -96,7 +96,7 @@ decl_storage! {
|
||||
pub Members get(fn members): Vec<T::AccountId>;
|
||||
}
|
||||
add_extra_genesis {
|
||||
config(phantom): rstd::marker::PhantomData<I>;
|
||||
config(phantom): sp_std::marker::PhantomData<I>;
|
||||
config(members): Vec<T::AccountId>;
|
||||
build(|config| Module::<T, I>::initialize_members(&config.members))
|
||||
}
|
||||
@@ -306,7 +306,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EnsureMember<AccountId, I=DefaultInstance>(rstd::marker::PhantomData<(AccountId, I)>);
|
||||
pub struct EnsureMember<AccountId, I=DefaultInstance>(sp_std::marker::PhantomData<(AccountId, I)>);
|
||||
impl<
|
||||
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
|
||||
AccountId,
|
||||
@@ -321,7 +321,7 @@ impl<
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EnsureMembers<N: U32, AccountId, I=DefaultInstance>(rstd::marker::PhantomData<(N, AccountId, I)>);
|
||||
pub struct EnsureMembers<N: U32, AccountId, I=DefaultInstance>(sp_std::marker::PhantomData<(N, AccountId, I)>);
|
||||
impl<
|
||||
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
|
||||
N: U32,
|
||||
@@ -338,7 +338,7 @@ impl<
|
||||
}
|
||||
|
||||
pub struct EnsureProportionMoreThan<N: U32, D: U32, AccountId, I=DefaultInstance>(
|
||||
rstd::marker::PhantomData<(N, D, AccountId, I)>
|
||||
sp_std::marker::PhantomData<(N, D, AccountId, I)>
|
||||
);
|
||||
impl<
|
||||
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
|
||||
@@ -357,7 +357,7 @@ impl<
|
||||
}
|
||||
|
||||
pub struct EnsureProportionAtLeast<N: U32, D: U32, AccountId, I=DefaultInstance>(
|
||||
rstd::marker::PhantomData<(N, D, AccountId, I)>
|
||||
sp_std::marker::PhantomData<(N, D, AccountId, I)>
|
||||
);
|
||||
impl<
|
||||
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
|
||||
|
||||
@@ -13,7 +13,7 @@ wasmi-validation = { version = "0.3.0", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sandbox = { package = "sp-sandbox", path = "../../primitives/sr-sandbox", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
@@ -34,7 +34,7 @@ std = [
|
||||
"primitives/std",
|
||||
"sp-runtime/std",
|
||||
"runtime-io/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"sandbox/std",
|
||||
"support/std",
|
||||
"system/std",
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
sp-api = { path = "../../../../primitives/sr-api", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../../../primitives/runtime", default-features = false }
|
||||
|
||||
[features]
|
||||
@@ -15,6 +15,6 @@ default = ["std"]
|
||||
std = [
|
||||
"sp-api/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"sp-runtime/std",
|
||||
]
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::vec::Vec;
|
||||
use sp_std::vec::Vec;
|
||||
use codec::{Encode, Decode, Codec};
|
||||
use sp_runtime::RuntimeDebug;
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ use super::{
|
||||
TrieIdGenerator,
|
||||
};
|
||||
use crate::exec::StorageKey;
|
||||
use rstd::cell::RefCell;
|
||||
use rstd::collections::btree_map::{BTreeMap, Entry};
|
||||
use rstd::prelude::*;
|
||||
use sp_std::cell::RefCell;
|
||||
use sp_std::collections::btree_map::{BTreeMap, Entry};
|
||||
use sp_std::prelude::*;
|
||||
use runtime_io::hashing::blake2_256;
|
||||
use sp_runtime::traits::{Bounded, Zero};
|
||||
use support::traits::{Currency, Get, Imbalance, SignedImbalance, UpdateBalanceOutcome};
|
||||
|
||||
@@ -20,7 +20,7 @@ use crate::account_db::{AccountDb, DirectAccountDb, OverlayAccountDb};
|
||||
use crate::gas::{Gas, GasMeter, Token, approx_gas_for_balance};
|
||||
use crate::rent;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::traits::{Bounded, CheckedAdd, CheckedSub, Zero};
|
||||
use support::{
|
||||
storage::unhashed,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{GasSpent, Module, Trait, BalanceOf, NegativeImbalanceOf};
|
||||
use rstd::convert::TryFrom;
|
||||
use sp_std::convert::TryFrom;
|
||||
use sp_runtime::traits::{
|
||||
CheckedMul, Zero, SaturatedConversion, SimpleArithmetic, UniqueSaturatedInto,
|
||||
};
|
||||
|
||||
@@ -109,7 +109,7 @@ pub use crate::exec::{ExecResult, ExecReturnValue, ExecError, StatusCode};
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Serialize, Deserialize};
|
||||
use primitives::crypto::UncheckedFrom;
|
||||
use rstd::{prelude::*, marker::PhantomData, fmt::Debug};
|
||||
use sp_std::{prelude::*, marker::PhantomData, fmt::Debug};
|
||||
use codec::{Codec, Encode, Decode};
|
||||
use runtime_io::hashing::blake2_256;
|
||||
use sp_runtime::{
|
||||
@@ -233,7 +233,7 @@ impl<H, Hasher> RawTombstoneContractInfo<H, Hasher>
|
||||
where
|
||||
H: Member + MaybeSerializeDeserialize+ Debug
|
||||
+ AsRef<[u8]> + AsMut<[u8]> + Copy + Default
|
||||
+ rstd::hash::Hash + Codec,
|
||||
+ sp_std::hash::Hash + Codec,
|
||||
Hasher: Hash<Output=H>,
|
||||
{
|
||||
fn new(storage_root: &[u8], code_hash: H) -> Self {
|
||||
@@ -680,7 +680,7 @@ impl<T: Trait> Module<T> {
|
||||
pub fn get_storage(
|
||||
address: T::AccountId,
|
||||
key: [u8; 32],
|
||||
) -> rstd::result::Result<Option<Vec<u8>>, GetStorageError> {
|
||||
) -> sp_std::result::Result<Option<Vec<u8>>, GetStorageError> {
|
||||
let contract_info = <ContractInfoOf<T>>::get(&address)
|
||||
.ok_or(GetStorageError::ContractDoesntExist)?
|
||||
.get_alive()
|
||||
@@ -1018,14 +1018,14 @@ impl<T: Trait + Send + Sync> Default for CheckBlockGasLimit<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Trait + Send + Sync> rstd::fmt::Debug for CheckBlockGasLimit<T> {
|
||||
impl<T: Trait + Send + Sync> sp_std::fmt::Debug for CheckBlockGasLimit<T> {
|
||||
#[cfg(feature = "std")]
|
||||
fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
write!(f, "CheckBlockGasLimit")
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn fmt(&self, _: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -1037,7 +1037,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckBlockGasLimit<T> {
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
|
||||
fn additional_signed(&self) -> rstd::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
|
||||
fn validate(
|
||||
&self,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
use crate::gas::{Gas, GasMeter, Token};
|
||||
use crate::wasm::{prepare, runtime::Env, PrefabWasmModule};
|
||||
use crate::{CodeHash, CodeStorage, PristineCode, Schedule, Trait};
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::traits::{Hash, Bounded};
|
||||
use support::StorageMap;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::wasm::env_def::FunctionImplProvider;
|
||||
use crate::exec::{Ext, ExecResult};
|
||||
use crate::gas::GasMeter;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{Encode, Decode};
|
||||
use sandbox;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::Schedule;
|
||||
use parity_wasm::elements::{self, Internal, External, MemoryType, Type, ValueType};
|
||||
use pwasm_utils;
|
||||
use pwasm_utils::rules;
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::traits::{SaturatedConversion};
|
||||
|
||||
struct ContractModule<'a> {
|
||||
|
||||
@@ -23,9 +23,9 @@ use crate::exec::{
|
||||
use crate::gas::{Gas, GasMeter, Token, GasMeterResult, approx_gas_for_balance};
|
||||
use sandbox;
|
||||
use system;
|
||||
use rstd::prelude::*;
|
||||
use rstd::convert::TryInto;
|
||||
use rstd::mem;
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::convert::TryInto;
|
||||
use sp_std::mem;
|
||||
use codec::{Decode, Encode};
|
||||
use sp_runtime::traits::{Bounded, SaturatedConversion};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ edition = "2018"
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -24,7 +24,7 @@ std = [
|
||||
"serde",
|
||||
"safe-mix/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#![recursion_limit="128"]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::{result, convert::TryFrom};
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::{result, convert::TryFrom};
|
||||
use sp_runtime::{
|
||||
RuntimeDebug,
|
||||
traits::{Zero, Bounded, CheckedMul, CheckedDiv, EnsureOrigin, Hash, Dispatchable, Saturating},
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
use codec::{Encode, Decode};
|
||||
use sp_runtime::traits::{Zero, IntegerSquareRoot};
|
||||
use rstd::ops::{Add, Mul, Div, Rem};
|
||||
use sp_std::ops::{Add, Mul, Div, Rem};
|
||||
|
||||
/// A means of determining if a vote is past pass threshold.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, sp_runtime::RuntimeDebug)]
|
||||
|
||||
@@ -10,7 +10,7 @@ sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
phragmen = { package = "sp-phragmen", path = "../../primitives/phragmen", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
runtime_io = { package = "sp-io", path = "../../primitives/sr-io" }
|
||||
@@ -28,5 +28,5 @@ std = [
|
||||
"sp-runtime/std",
|
||||
"phragmen/std",
|
||||
"system/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
]
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::{print, traits::{Zero, StaticLookup, Bounded, Convert}};
|
||||
use support::{
|
||||
decl_storage, decl_event, ensure, decl_module, dispatch, weights::SimpleDispatchInfo,
|
||||
|
||||
@@ -9,7 +9,7 @@ serde = { version = "1.0.101", optional = true }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -25,7 +25,7 @@ std = [
|
||||
"safe-mix/std",
|
||||
"codec/std",
|
||||
"primitives/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"serde",
|
||||
"runtime-io/std",
|
||||
"support/std",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![recursion_limit="128"]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::{
|
||||
RuntimeDebug,
|
||||
print,
|
||||
|
||||
@@ -13,7 +13,7 @@ timestamp = { package = "pallet-timestamp", path = "../timestamp", default-featu
|
||||
balances = { package = "pallet-balances", path = "../balances", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
primitive-types = { version = "0.6", default-features = false, features = ["rlp"] }
|
||||
rlp = { version = "0.4", default-features = false }
|
||||
@@ -31,7 +31,7 @@ std = [
|
||||
"system/std",
|
||||
"balances/std",
|
||||
"runtime-io/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"sha3/std",
|
||||
"rlp/std",
|
||||
"primitive-types/std",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use rstd::marker::PhantomData;
|
||||
use rstd::vec::Vec;
|
||||
use sp_std::marker::PhantomData;
|
||||
use sp_std::vec::Vec;
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Serialize, Deserialize};
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
@@ -23,7 +23,7 @@ mod backend;
|
||||
|
||||
pub use crate::backend::{Account, Log, Vicinity, Backend};
|
||||
|
||||
use rstd::{vec::Vec, marker::PhantomData};
|
||||
use sp_std::{vec::Vec, marker::PhantomData};
|
||||
use support::{dispatch::Result, decl_module, decl_storage, decl_event};
|
||||
use support::weights::{Weight, WeighData, ClassifyDispatch, DispatchClass, PaysFee};
|
||||
use support::traits::{Currency, WithdrawReason, ExistenceRequirement};
|
||||
|
||||
@@ -11,7 +11,7 @@ support = { package = "frame-support", path = "../support", default-features = f
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
balances = { package = "pallet-balances", path = "../balances", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -27,5 +27,5 @@ std = [
|
||||
"system/std",
|
||||
"balances/std",
|
||||
"runtime-io/std",
|
||||
"rstd/std"
|
||||
"sp-std/std"
|
||||
]
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
// Ensure we're `no_std` when compiling for Wasm.
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::marker::PhantomData;
|
||||
use sp_std::marker::PhantomData;
|
||||
use support::{
|
||||
dispatch::Result, decl_module, decl_storage, decl_event,
|
||||
weights::{SimpleDispatchInfo, DispatchInfo, DispatchClass, ClassifyDispatch, WeighData, Weight, PaysFee},
|
||||
@@ -596,8 +596,8 @@ impl<T: Trait> Module<T> {
|
||||
#[derive(Encode, Decode, Clone, Eq, PartialEq)]
|
||||
pub struct WatchDummy<T: Trait + Send + Sync>(PhantomData<T>);
|
||||
|
||||
impl<T: Trait + Send + Sync> rstd::fmt::Debug for WatchDummy<T> {
|
||||
fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
impl<T: Trait + Send + Sync> sp_std::fmt::Debug for WatchDummy<T> {
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
write!(f, "WatchDummy")
|
||||
}
|
||||
}
|
||||
@@ -613,7 +613,7 @@ impl<T: Trait + Send + Sync> SignedExtension for WatchDummy<T> {
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
|
||||
fn additional_signed(&self) -> rstd::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
|
||||
fn validate(
|
||||
&self,
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -23,7 +23,7 @@ transaction-payment = { package = "pallet-transaction-payment", path = "../trans
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"serde",
|
||||
"codec/std",
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::{prelude::*, marker::PhantomData};
|
||||
use sp_std::{prelude::*, marker::PhantomData};
|
||||
use support::weights::{GetDispatchInfo, WeighBlock, DispatchInfo};
|
||||
use sp_runtime::{
|
||||
generic::Digest, ApplyExtrinsicResult,
|
||||
|
||||
@@ -8,7 +8,7 @@ edition = "2018"
|
||||
serde = { version = "1.0.101", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
sp-finality-tracker = { path = "../../primitives/finality-tracker", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -24,7 +24,7 @@ default = ["std"]
|
||||
std = [
|
||||
"serde/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
"frame-system/std",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use inherents::{InherentIdentifier, ProvideInherent, InherentData, MakeFatalError};
|
||||
use sp_runtime::traits::{One, Zero, SaturatedConversion};
|
||||
use rstd::{prelude::*, result, cmp, vec};
|
||||
use sp_std::{prelude::*, result, cmp, vec};
|
||||
use support::{decl_module, decl_storage};
|
||||
use support::traits::Get;
|
||||
use frame_system::{ensure_none, Trait as SystemTrait};
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
@@ -21,7 +21,7 @@ default = ["std"]
|
||||
std =[
|
||||
"serde/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"sp-runtime/std",
|
||||
"support/std",
|
||||
"system/std",
|
||||
|
||||
@@ -159,8 +159,8 @@ use sp_runtime::traits::{
|
||||
Zero, Bounded,
|
||||
};
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::{cmp, result, fmt::Debug};
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::{cmp, result, fmt::Debug};
|
||||
use support::dispatch::Result;
|
||||
use support::{
|
||||
decl_event, decl_module, decl_storage, ensure,
|
||||
@@ -625,7 +625,7 @@ impl<T: Trait> Module<T> {
|
||||
/// NOTE: This is different behavior than `reserve`.
|
||||
pub fn unreserve(asset_id: &T::AssetId, who: &T::AccountId, amount: T::Balance) -> T::Balance {
|
||||
let b = Self::reserved_balance(asset_id, who);
|
||||
let actual = rstd::cmp::min(b, amount);
|
||||
let actual = sp_std::cmp::min(b, amount);
|
||||
let original_free_balance = Self::free_balance(asset_id, who);
|
||||
let new_free_balance = original_free_balance + actual;
|
||||
Self::set_free_balance(asset_id, who, new_free_balance);
|
||||
@@ -642,7 +642,7 @@ impl<T: Trait> Module<T> {
|
||||
/// the caller will do this.
|
||||
fn slash(asset_id: &T::AssetId, who: &T::AccountId, amount: T::Balance) -> Option<T::Balance> {
|
||||
let free_balance = Self::free_balance(asset_id, who);
|
||||
let free_slash = rstd::cmp::min(free_balance, amount);
|
||||
let free_slash = sp_std::cmp::min(free_balance, amount);
|
||||
let new_free_balance = free_balance - free_slash;
|
||||
Self::set_free_balance(asset_id, who, new_free_balance);
|
||||
if free_slash < amount {
|
||||
@@ -660,7 +660,7 @@ impl<T: Trait> Module<T> {
|
||||
/// the caller will do this.
|
||||
fn slash_reserved(asset_id: &T::AssetId, who: &T::AccountId, amount: T::Balance) -> Option<T::Balance> {
|
||||
let original_reserve_balance = Self::reserved_balance(asset_id, who);
|
||||
let slash = rstd::cmp::min(original_reserve_balance, amount);
|
||||
let slash = sp_std::cmp::min(original_reserve_balance, amount);
|
||||
let new_reserve_balance = original_reserve_balance - slash;
|
||||
Self::set_reserved_balance(asset_id, who, new_reserve_balance);
|
||||
if amount == slash {
|
||||
@@ -684,7 +684,7 @@ impl<T: Trait> Module<T> {
|
||||
amount: T::Balance,
|
||||
) -> T::Balance {
|
||||
let b = Self::reserved_balance(asset_id, who);
|
||||
let slash = rstd::cmp::min(b, amount);
|
||||
let slash = sp_std::cmp::min(b, amount);
|
||||
|
||||
let original_free_balance = Self::free_balance(asset_id, beneficiary);
|
||||
let new_free_balance = original_free_balance + slash;
|
||||
@@ -866,14 +866,14 @@ mod imbalances {
|
||||
use super::{
|
||||
result, AssetIdProvider, Imbalance, Saturating, StorageMap, Subtrait, Zero, TryDrop
|
||||
};
|
||||
use rstd::mem;
|
||||
use sp_std::mem;
|
||||
|
||||
/// Opaque, move-only struct with private fields that serves as a token denoting that
|
||||
/// funds have been created without any equal and opposite accounting.
|
||||
#[must_use]
|
||||
pub struct PositiveImbalance<T: Subtrait, U: AssetIdProvider<AssetId = T::AssetId>>(
|
||||
T::Balance,
|
||||
rstd::marker::PhantomData<U>,
|
||||
sp_std::marker::PhantomData<U>,
|
||||
);
|
||||
impl<T, U> PositiveImbalance<T, U>
|
||||
where
|
||||
@@ -890,7 +890,7 @@ mod imbalances {
|
||||
#[must_use]
|
||||
pub struct NegativeImbalance<T: Subtrait, U: AssetIdProvider<AssetId = T::AssetId>>(
|
||||
T::Balance,
|
||||
rstd::marker::PhantomData<U>,
|
||||
sp_std::marker::PhantomData<U>,
|
||||
);
|
||||
impl<T, U> NegativeImbalance<T, U>
|
||||
where
|
||||
@@ -1091,7 +1091,7 @@ impl<T: Subtrait> Trait for ElevatedTrait<T> {
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]
|
||||
pub struct AssetCurrency<T, U>(rstd::marker::PhantomData<T>, rstd::marker::PhantomData<U>);
|
||||
pub struct AssetCurrency<T, U>(sp_std::marker::PhantomData<T>, sp_std::marker::PhantomData<U>);
|
||||
|
||||
impl<T, U> Currency<T::AccountId> for AssetCurrency<T, U>
|
||||
where
|
||||
@@ -1264,7 +1264,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StakingAssetIdProvider<T>(rstd::marker::PhantomData<T>);
|
||||
pub struct StakingAssetIdProvider<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
impl<T: Trait> AssetIdProvider for StakingAssetIdProvider<T> {
|
||||
type AssetId = T::AssetId;
|
||||
@@ -1273,7 +1273,7 @@ impl<T: Trait> AssetIdProvider for StakingAssetIdProvider<T> {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SpendingAssetIdProvider<T>(rstd::marker::PhantomData<T>);
|
||||
pub struct SpendingAssetIdProvider<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
impl<T: Trait> AssetIdProvider for SpendingAssetIdProvider<T> {
|
||||
type AssetId = T::AssetId;
|
||||
|
||||
@@ -9,7 +9,7 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
sp-finality-grandpa = { path = "../../primitives/finality-grandpa", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -27,7 +27,7 @@ std = [
|
||||
"codec/std",
|
||||
"primitives/std",
|
||||
"sp-finality-grandpa/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
"sp-staking/std",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// re-export since this is necessary for `impl_apis` in runtime.
|
||||
pub use sp_finality_grandpa as fg_primitives;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{self as codec, Encode, Decode, Error};
|
||||
use support::{decl_event, decl_storage, decl_module, dispatch::Result, storage};
|
||||
use sp_runtime::{
|
||||
|
||||
@@ -8,7 +8,7 @@ edition = "2018"
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
enumflags2 = { version = "0.6.2" }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -23,7 +23,7 @@ default = ["std"]
|
||||
std = [
|
||||
"serde",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"sp-runtime/std",
|
||||
"support/std",
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::{fmt::Debug, ops::Add, iter::once};
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::{fmt::Debug, ops::Add, iter::once};
|
||||
use enumflags2::BitFlags;
|
||||
use codec::{Encode, Decode};
|
||||
use sp_runtime::{traits::{StaticLookup, EnsureOrigin, Zero}, RuntimeDebug};
|
||||
@@ -134,7 +134,7 @@ pub enum Data {
|
||||
}
|
||||
|
||||
impl Decode for Data {
|
||||
fn decode<I: codec::Input>(input: &mut I) -> rstd::result::Result<Self, codec::Error> {
|
||||
fn decode<I: codec::Input>(input: &mut I) -> sp_std::result::Result<Self, codec::Error> {
|
||||
let b = input.read_byte()?;
|
||||
Ok(match b {
|
||||
0 => Data::None,
|
||||
@@ -256,7 +256,7 @@ impl Encode for IdentityFields {
|
||||
}
|
||||
}
|
||||
impl Decode for IdentityFields {
|
||||
fn decode<I: codec::Input>(input: &mut I) -> rstd::result::Result<Self, codec::Error> {
|
||||
fn decode<I: codec::Input>(input: &mut I) -> sp_std::result::Result<Self, codec::Error> {
|
||||
let field = u64::decode(input)?;
|
||||
Ok(Self(<BitFlags<IdentityField>>::from_bits(field as u64).map_err(|_| "invalid value")?))
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ app-crypto = { package = "sc-application-crypto", path = "../../primitives/appli
|
||||
authorship = { package = "pallet-authorship", path = "../authorship", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
primitives = { package="sp-core", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
session = { package = "pallet-session", path = "../session", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
@@ -25,7 +25,7 @@ std = [
|
||||
"authorship/std",
|
||||
"codec/std",
|
||||
"primitives/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"serde",
|
||||
"session/std",
|
||||
"runtime-io/std",
|
||||
|
||||
@@ -73,8 +73,8 @@ mod tests;
|
||||
use app_crypto::RuntimeAppPublic;
|
||||
use codec::{Encode, Decode};
|
||||
use primitives::offchain::{OpaqueNetworkState, StorageKind};
|
||||
use rstd::prelude::*;
|
||||
use rstd::convert::TryInto;
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::convert::TryInto;
|
||||
use session::historical::IdentificationTuple;
|
||||
use sp_runtime::{
|
||||
RuntimeDebug,
|
||||
|
||||
@@ -9,7 +9,7 @@ serde = { version = "1.0.101", optional = true }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
sp-keyring = { path = "../../primitives/keyring", optional = true }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
@@ -27,7 +27,7 @@ std = [
|
||||
"sp-keyring",
|
||||
"codec/std",
|
||||
"primitives/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use std::fmt;
|
||||
use rstd::convert::TryInto;
|
||||
use sp_std::convert::TryInto;
|
||||
use crate::Member;
|
||||
use codec::{Encode, Decode, Input, Output, Error};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::{prelude::*, marker::PhantomData, convert::TryInto};
|
||||
use sp_std::{prelude::*, marker::PhantomData, convert::TryInto};
|
||||
use codec::{Encode, Codec};
|
||||
use support::{Parameter, decl_module, decl_event, decl_storage};
|
||||
use sp_runtime::traits::{One, SimpleArithmetic, StaticLookup, Member, LookupError};
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
@@ -22,7 +22,7 @@ std = [
|
||||
"serde",
|
||||
"codec/std",
|
||||
"sp-runtime/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"support/std",
|
||||
"system/std",
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// Ensure we're `no_std` when compiling for Wasm.
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use support::{
|
||||
decl_module, decl_storage, decl_event,
|
||||
traits::{ChangeMembers, InitializeMembers},
|
||||
@@ -63,7 +63,7 @@ decl_storage! {
|
||||
}
|
||||
add_extra_genesis {
|
||||
config(members): Vec<T::AccountId>;
|
||||
config(phantom): rstd::marker::PhantomData<I>;
|
||||
config(phantom): sp_std::marker::PhantomData<I>;
|
||||
build(|config: &Self| {
|
||||
let mut members = config.members.clone();
|
||||
members.sort();
|
||||
@@ -89,7 +89,7 @@ decl_event!(
|
||||
/// One of the members' keys changed.
|
||||
KeyChanged,
|
||||
/// Phantom member, never used.
|
||||
Dummy(rstd::marker::PhantomData<(AccountId, Event)>),
|
||||
Dummy(sp_std::marker::PhantomData<(AccountId, Event)>),
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@ edition = "2018"
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"primitives/std",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -27,7 +27,7 @@ use serde::Serialize;
|
||||
#[cfg(feature = "std")]
|
||||
use codec::{Decode, Input, Error};
|
||||
use codec::{Encode, Output};
|
||||
use rstd::vec::Vec;
|
||||
use sp_std::vec::Vec;
|
||||
use primitives::RuntimeDebug;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -85,12 +85,12 @@ impl<B, O> Eq for DecodeDifferent<B, O>
|
||||
where B: Encode + Eq + PartialEq + 'static, O: Encode + Eq + PartialEq + 'static
|
||||
{}
|
||||
|
||||
impl<B, O> rstd::fmt::Debug for DecodeDifferent<B, O>
|
||||
impl<B, O> sp_std::fmt::Debug for DecodeDifferent<B, O>
|
||||
where
|
||||
B: rstd::fmt::Debug + Eq + 'static,
|
||||
O: rstd::fmt::Debug + Eq + 'static,
|
||||
B: sp_std::fmt::Debug + Eq + 'static,
|
||||
O: sp_std::fmt::Debug + Eq + 'static,
|
||||
{
|
||||
fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
match self {
|
||||
DecodeDifferent::Encode(b) => b.fmt(f),
|
||||
DecodeDifferent::Decoded(o) => o.fmt(f),
|
||||
@@ -151,8 +151,8 @@ impl<E: Encode + PartialEq> PartialEq for FnEncode<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: Encode + rstd::fmt::Debug> rstd::fmt::Debug for FnEncode<E> {
|
||||
fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
impl<E: Encode + sp_std::fmt::Debug> sp_std::fmt::Debug for FnEncode<E> {
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
self.0().fmt(f)
|
||||
}
|
||||
}
|
||||
@@ -261,8 +261,8 @@ impl serde::Serialize for DefaultByteGetter {
|
||||
}
|
||||
}
|
||||
|
||||
impl rstd::fmt::Debug for DefaultByteGetter {
|
||||
fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
impl sp_std::fmt::Debug for DefaultByteGetter {
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
self.0.default_byte().fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -22,7 +22,7 @@ default = ["std"]
|
||||
std = [
|
||||
"serde",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"sp-runtime/std",
|
||||
"support/std",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::{
|
||||
traits::{StaticLookup, EnsureOrigin, Zero}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
balances = { package = "pallet-balances", path = "../balances", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false }
|
||||
@@ -23,7 +23,7 @@ default = ["std"]
|
||||
std = [
|
||||
"balances/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"serde",
|
||||
"sp-runtime/std",
|
||||
"sp-staking/std",
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
mod mock;
|
||||
mod tests;
|
||||
|
||||
use rstd::vec::Vec;
|
||||
use sp_std::vec::Vec;
|
||||
use support::{
|
||||
decl_module, decl_event, decl_storage, Parameter,
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features =
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
@@ -24,5 +24,5 @@ std = [
|
||||
"codec/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
]
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::{prelude::*, convert::TryInto};
|
||||
use sp_std::{prelude::*, convert::TryInto};
|
||||
use sp_runtime::traits::Hash;
|
||||
use support::{decl_module, decl_storage, traits::Randomness};
|
||||
use safe_mix::TripletMix;
|
||||
|
||||
@@ -9,7 +9,7 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features =
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
system = { package = "frame-system", path = "../system", default-features = false }
|
||||
|
||||
@@ -24,7 +24,7 @@ std = [
|
||||
"serde",
|
||||
"runtime-io/std",
|
||||
"sp-runtime/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"system/std",
|
||||
]
|
||||
|
||||
@@ -89,7 +89,7 @@ mod mock;
|
||||
mod tests;
|
||||
|
||||
use codec::FullCodec;
|
||||
use rstd::{
|
||||
use sp_std::{
|
||||
fmt::Debug,
|
||||
prelude::*,
|
||||
};
|
||||
@@ -175,7 +175,7 @@ decl_storage! {
|
||||
}
|
||||
add_extra_genesis {
|
||||
config(members): Vec<T::AccountId>;
|
||||
config(phantom): rstd::marker::PhantomData<I>;
|
||||
config(phantom): sp_std::marker::PhantomData<I>;
|
||||
build(|config| {
|
||||
let mut pool = config.pool.clone();
|
||||
|
||||
@@ -218,7 +218,7 @@ decl_event!(
|
||||
/// See the transaction for who.
|
||||
CandidateScored,
|
||||
/// Phantom member, never used.
|
||||
Dummy(rstd::marker::PhantomData<(AccountId, I)>),
|
||||
Dummy(sp_std::marker::PhantomData<(AccountId, I)>),
|
||||
}
|
||||
);
|
||||
|
||||
@@ -453,4 +453,3 @@ impl<T: Trait<I>, I: Instance> Module<T, I> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ edition = "2018"
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -30,7 +30,7 @@ std = [
|
||||
"serde",
|
||||
"safe-mix/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"support/std",
|
||||
"sp-runtime/std",
|
||||
"sp-staking/std",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//! These roots and proofs of inclusion can be generated at any time during the current session.
|
||||
//! Afterwards, the proofs can be fed to a consensus module when reporting misbehavior.
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{Encode, Decode};
|
||||
use sp_runtime::KeyTypeId;
|
||||
use sp_runtime::traits::{Convert, OpaqueKeys, Hash as HashT};
|
||||
@@ -79,7 +79,7 @@ impl<T: Trait> Module<T> {
|
||||
None => return, // nothing to prune.
|
||||
};
|
||||
|
||||
let up_to = rstd::cmp::min(up_to, end);
|
||||
let up_to = sp_std::cmp::min(up_to, end);
|
||||
|
||||
if up_to < start {
|
||||
return // out of bounds. harmless.
|
||||
@@ -108,7 +108,7 @@ pub trait OnSessionEnding<ValidatorId, FullIdentification>: crate::OnSessionEndi
|
||||
|
||||
/// An `OnSessionEnding` implementation that wraps an inner `I` and also
|
||||
/// sets the historical trie root of the ending session.
|
||||
pub struct NoteHistoricalRoot<T, I>(rstd::marker::PhantomData<(T, I)>);
|
||||
pub struct NoteHistoricalRoot<T, I>(sp_std::marker::PhantomData<(T, I)>);
|
||||
|
||||
impl<T: Trait, I> crate::OnSessionEnding<T::ValidatorId> for NoteHistoricalRoot<T, I>
|
||||
where I: OnSessionEnding<T::ValidatorId, T::FullIdentification>
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::{prelude::*, marker::PhantomData, ops::{Sub, Rem}};
|
||||
use sp_std::{prelude::*, marker::PhantomData, ops::{Sub, Rem}};
|
||||
use codec::Decode;
|
||||
use sp_runtime::{KeyTypeId, Perbill, RuntimeAppPublic, BoundToRuntimeAppPublic};
|
||||
use support::weights::SimpleDispatchInfo;
|
||||
@@ -625,7 +625,7 @@ impl<T: Trait> Module<T> {
|
||||
/// Returns `Ok(true)` if more than `DisabledValidatorsThreshold` validators in current
|
||||
/// session is already disabled.
|
||||
/// If used with the staking module it allows to force a new era in such case.
|
||||
pub fn disable(c: &T::ValidatorId) -> rstd::result::Result<bool, ()> {
|
||||
pub fn disable(c: &T::ValidatorId) -> sp_std::result::Result<bool, ()> {
|
||||
Self::validators().iter().position(|i| i == c).map(Self::disable_index).ok_or(())
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ impl<T: Trait> OnFreeBalanceZero<T::ValidatorId> for Module<T> {
|
||||
/// Wraps the author-scraping logic for consensus engines that can recover
|
||||
/// the canonical index of an author. This then transforms it into the
|
||||
/// registering account-ID of that session key index.
|
||||
pub struct FindAccountFromAuthorIndex<T, Inner>(rstd::marker::PhantomData<(T, Inner)>);
|
||||
pub struct FindAccountFromAuthorIndex<T, Inner>(sp_std::marker::PhantomData<(T, Inner)>);
|
||||
|
||||
impl<T: Trait, Inner: FindAuthor<u32>> FindAuthor<T::ValidatorId>
|
||||
for FindAccountFromAuthorIndex<T, Inner>
|
||||
|
||||
@@ -9,7 +9,7 @@ serde = { version = "1.0.101", optional = true }
|
||||
safe-mix = { version = "1.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
sp-keyring = { path = "../../primitives/keyring", optional = true }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
phragmen = { package = "sp-phragmen", path = "../../primitives/phragmen", default-features = false }
|
||||
runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
@@ -35,7 +35,7 @@ std = [
|
||||
"safe-mix/std",
|
||||
"sp-keyring",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"phragmen/std",
|
||||
"runtime-io/std",
|
||||
"support/std",
|
||||
|
||||
@@ -255,7 +255,7 @@ mod slashing;
|
||||
|
||||
pub mod inflation;
|
||||
|
||||
use rstd::{prelude::*, result};
|
||||
use sp_std::{prelude::*, result};
|
||||
use codec::{HasCompact, Encode, Decode};
|
||||
use support::{
|
||||
decl_module, decl_event, decl_storage, ensure,
|
||||
@@ -445,7 +445,7 @@ impl<AccountId, Balance> StakingLedger<AccountId, Balance> where
|
||||
// don't leave a dust balance in the staking system.
|
||||
if *target <= minimum_balance {
|
||||
slash_from_target += *target;
|
||||
*value += rstd::mem::replace(target, Zero::zero());
|
||||
*value += sp_std::mem::replace(target, Zero::zero());
|
||||
}
|
||||
|
||||
*total_remaining = total_remaining.saturating_sub(slash_from_target);
|
||||
@@ -1304,7 +1304,7 @@ impl<T: Trait> Module<T> {
|
||||
let points = CurrentEraPointsEarned::take();
|
||||
let now = T::Time::now();
|
||||
let previous_era_start = <CurrentEraStart<T>>::mutate(|v| {
|
||||
rstd::mem::replace(v, now)
|
||||
sp_std::mem::replace(v, now)
|
||||
});
|
||||
let era_duration = now - previous_era_start;
|
||||
if !era_duration.is_zero() {
|
||||
@@ -1641,7 +1641,7 @@ impl<T: Trait + authorship::Trait> authorship::EventHandler<T::AccountId, T::Blo
|
||||
|
||||
/// A `Convert` implementation that finds the stash of the given controller account,
|
||||
/// if any.
|
||||
pub struct StashOf<T>(rstd::marker::PhantomData<T>);
|
||||
pub struct StashOf<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
impl<T: Trait> Convert<T::AccountId, Option<T::AccountId>> for StashOf<T> {
|
||||
fn convert(controller: T::AccountId) -> Option<T::AccountId> {
|
||||
@@ -1651,7 +1651,7 @@ impl<T: Trait> Convert<T::AccountId, Option<T::AccountId>> for StashOf<T> {
|
||||
|
||||
/// A typed conversion from stash account ID to the current exposure of nominators
|
||||
/// on that account.
|
||||
pub struct ExposureOf<T>(rstd::marker::PhantomData<T>);
|
||||
pub struct ExposureOf<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
impl<T: Trait> Convert<T::AccountId, Option<Exposure<T::AccountId, BalanceOf<T>>>>
|
||||
for ExposureOf<T>
|
||||
@@ -1751,7 +1751,7 @@ impl <T: Trait> OnOffenceHandler<T::AccountId, session::historical::Identificati
|
||||
|
||||
/// Filter historical offences out and only allow those from the bonding period.
|
||||
pub struct FilterHistoricalOffences<T, R> {
|
||||
_inner: rstd::marker::PhantomData<(T, R)>,
|
||||
_inner: sp_std::marker::PhantomData<(T, R)>,
|
||||
}
|
||||
|
||||
impl<T, Reporter, Offender, R, O> ReportOffence<Reporter, Offender, O>
|
||||
|
||||
@@ -26,7 +26,7 @@ pub const CURRENT_VERSION: VersionNumber = 1;
|
||||
mod inner {
|
||||
use crate::{Store, Module, Trait};
|
||||
use support::{StorageLinkedMap, StorageValue};
|
||||
use rstd::vec::Vec;
|
||||
use sp_std::vec::Vec;
|
||||
use super::{CURRENT_VERSION, VersionNumber};
|
||||
|
||||
// the minimum supported version of the migration logic.
|
||||
|
||||
@@ -57,7 +57,7 @@ use support::{
|
||||
StorageMap, StorageDoubleMap,
|
||||
traits::{Currency, OnUnbalanced, Imbalance},
|
||||
};
|
||||
use rstd::vec::Vec;
|
||||
use sp_std::vec::Vec;
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
/// The proportion of the slashing reward to be paid out on the first slashing detection.
|
||||
@@ -133,7 +133,7 @@ impl SlashingSpans {
|
||||
SlashingSpan { index, start, length: Some(length) }
|
||||
});
|
||||
|
||||
rstd::iter::once(last).chain(prior)
|
||||
sp_std::iter::once(last).chain(prior)
|
||||
}
|
||||
|
||||
/// Yields the era index where the last (current) slashing span started.
|
||||
@@ -161,7 +161,7 @@ impl SlashingSpans {
|
||||
};
|
||||
|
||||
// readjust the ongoing span, if it started before the beginning of the window.
|
||||
self.last_start = rstd::cmp::max(self.last_start, window_start);
|
||||
self.last_start = sp_std::cmp::max(self.last_start, window_start);
|
||||
pruned
|
||||
}
|
||||
}
|
||||
@@ -419,7 +419,7 @@ struct InspectingSpans<'a, T: Trait + 'a> {
|
||||
paid_out: &'a mut BalanceOf<T>,
|
||||
slash_of: &'a mut BalanceOf<T>,
|
||||
reward_proportion: Perbill,
|
||||
_marker: rstd::marker::PhantomData<T>,
|
||||
_marker: sp_std::marker::PhantomData<T>,
|
||||
}
|
||||
|
||||
// fetches the slashing spans record for a stash account, initializing it if necessary.
|
||||
@@ -444,7 +444,7 @@ fn fetch_spans<'a, T: Trait + 'a>(
|
||||
slash_of,
|
||||
paid_out,
|
||||
reward_proportion,
|
||||
_marker: rstd::marker::PhantomData,
|
||||
_marker: sp_std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
support = { package = "frame-support", path = "../support", default-features = false }
|
||||
@@ -21,7 +21,7 @@ default = ["std"]
|
||||
std = [
|
||||
"serde",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"runtime-io/std",
|
||||
"sp-runtime/std",
|
||||
"support/std",
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::{
|
||||
traits::{StaticLookup, Dispatchable}, DispatchError,
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ log = "0.4"
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] }
|
||||
frame-metadata = { path = "../metadata", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
sp-std = { path = "../../primitives/std", default-features = false }
|
||||
runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/runtime", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
@@ -36,7 +36,7 @@ std = [
|
||||
"serde",
|
||||
"runtime-io/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sp-std/std",
|
||||
"sp-runtime/std",
|
||||
"sp-arithmetic/std",
|
||||
"frame-metadata/std",
|
||||
|
||||
@@ -92,7 +92,7 @@ impl BuilderDef {
|
||||
let key = &map.key;
|
||||
quote!{{
|
||||
#data
|
||||
let data: &#scrate::rstd::vec::Vec<(#key, #value_type)> = data;
|
||||
let data: &#scrate::sp_std::vec::Vec<(#key, #value_type)> = data;
|
||||
data.iter().for_each(|(k, v)| {
|
||||
<#storage_struct as #scrate::#storage_trait>::insert::<
|
||||
&#key, &#value_type
|
||||
@@ -105,7 +105,7 @@ impl BuilderDef {
|
||||
let key2 = &map.key2;
|
||||
quote!{{
|
||||
#data
|
||||
let data: &#scrate::rstd::vec::Vec<(#key1, #key2, #value_type)> = data;
|
||||
let data: &#scrate::sp_std::vec::Vec<(#key1, #key2, #value_type)> = data;
|
||||
data.iter().for_each(|(k1, k2, v)| {
|
||||
<#storage_struct as #scrate::#storage_trait>::insert::<
|
||||
&#key1, &#key2, &#value_type
|
||||
|
||||
@@ -104,11 +104,11 @@ fn default_byte_getter(
|
||||
#[doc(hidden)]
|
||||
pub struct #struct_name<
|
||||
#runtime_generic, #optional_instance_bound_optional_default
|
||||
>(pub #scrate::rstd::marker::PhantomData<(#runtime_generic #optional_comma_instance)>);
|
||||
>(pub #scrate::sp_std::marker::PhantomData<(#runtime_generic #optional_comma_instance)>);
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
#[allow(non_upper_case_globals)]
|
||||
static #cache_name: #scrate::once_cell::sync::OnceCell<#scrate::rstd::vec::Vec<u8>> =
|
||||
static #cache_name: #scrate::once_cell::sync::OnceCell<#scrate::sp_std::vec::Vec<u8>> =
|
||||
#scrate::once_cell::sync::OnceCell::new();
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -117,7 +117,7 @@ fn default_byte_getter(
|
||||
for #struct_name<#runtime_generic, #optional_instance>
|
||||
#where_clause
|
||||
{
|
||||
fn default_byte(&self) -> #scrate::rstd::vec::Vec<u8> {
|
||||
fn default_byte(&self) -> #scrate::sp_std::vec::Vec<u8> {
|
||||
use #scrate::codec::Encode;
|
||||
#cache_name.get_or_init(|| {
|
||||
let def_val: #query_type = #default;
|
||||
@@ -138,7 +138,7 @@ fn default_byte_getter(
|
||||
for #struct_name<#runtime_generic, #optional_instance>
|
||||
#where_clause
|
||||
{
|
||||
fn default_byte(&self) -> #scrate::rstd::vec::Vec<u8> {
|
||||
fn default_byte(&self) -> #scrate::sp_std::vec::Vec<u8> {
|
||||
use #scrate::codec::Encode;
|
||||
let def_val: #query_type = #default;
|
||||
<#query_type as Encode>::encode(&def_val)
|
||||
@@ -146,7 +146,7 @@ fn default_byte_getter(
|
||||
}
|
||||
};
|
||||
let struct_instance = quote!(
|
||||
#struct_name::<#runtime_generic, #optional_instance>(#scrate::rstd::marker::PhantomData)
|
||||
#struct_name::<#runtime_generic, #optional_instance>(#scrate::sp_std::marker::PhantomData)
|
||||
);
|
||||
|
||||
(struct_def, struct_instance)
|
||||
|
||||
@@ -68,7 +68,7 @@ pub fn decl_and_impl(scrate: &TokenStream, def: &DeclStorageDefExt) -> TokenStre
|
||||
#visibility struct #name<
|
||||
#optional_storage_runtime_bound_comma #optional_instance_bound_optional_default
|
||||
>(
|
||||
#scrate::rstd::marker::PhantomData<
|
||||
#scrate::sp_std::marker::PhantomData<
|
||||
(#optional_storage_runtime_comma #optional_instance)
|
||||
>
|
||||
) #optional_storage_where_clause;
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
//! native::print!("My struct: {:?}", x);
|
||||
//! ```
|
||||
|
||||
use rstd::vec::Vec;
|
||||
use rstd::fmt::{self, Debug};
|
||||
use sp_std::vec::Vec;
|
||||
use sp_std::fmt::{self, Debug};
|
||||
|
||||
pub use log::{info, debug, error, trace, warn};
|
||||
pub use crate::runtime_print as print;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Dispatch system. Contains a macro for defining runtime modules and
|
||||
//! generating values representing lazy module function calls.
|
||||
|
||||
pub use crate::rstd::{result, fmt, prelude::{Vec, Clone, Eq, PartialEq}, marker};
|
||||
pub use crate::sp_std::{result, fmt, prelude::{Vec, Clone, Eq, PartialEq}, marker};
|
||||
pub use crate::codec::{Codec, EncodeLike, Decode, Encode, Input, Output, HasCompact, EncodeAsRef};
|
||||
pub use frame_metadata::{
|
||||
FunctionMetadata, DecodeDifferent, DecodeDifferentArray, FunctionArgumentMetadata,
|
||||
@@ -865,7 +865,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_initialize(_block_number_not_used: $trait_instance::BlockNumber) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_initialize");
|
||||
@@ -887,7 +887,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_initialize($param: $param_ty) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_initialize");
|
||||
@@ -919,7 +919,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_finalize(_block_number_not_used: $trait_instance::BlockNumber) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_finalize");
|
||||
@@ -941,7 +941,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_finalize($param: $param_ty) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_finalize");
|
||||
@@ -1044,7 +1044,7 @@ macro_rules! decl_module {
|
||||
$vis fn $name(
|
||||
$origin: $origin_ty $(, $param: $param_ty )*
|
||||
) -> $crate::dispatch::DispatchResult<$error_type> {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, stringify!($name));
|
||||
@@ -1070,7 +1070,7 @@ macro_rules! decl_module {
|
||||
) => {
|
||||
$(#[doc = $doc_attr])*
|
||||
$vis fn $name($origin: $origin_ty $(, $param: $param_ty )* ) -> $result {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, stringify!($name));
|
||||
@@ -1193,7 +1193,7 @@ macro_rules! decl_module {
|
||||
{
|
||||
#[doc(hidden)]
|
||||
#[codec(skip)]
|
||||
__PhantomItem($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>, $crate::dispatch::Never),
|
||||
__PhantomItem($crate::sp_std::marker::PhantomData<($trait_instance $(, $instance)?)>, $crate::dispatch::Never),
|
||||
$( $generated_variants )*
|
||||
}
|
||||
};
|
||||
@@ -1231,7 +1231,7 @@ macro_rules! decl_module {
|
||||
pub struct $mod_type<
|
||||
$trait_instance: $trait_name
|
||||
$(<I>, $instance: $instantiable $( = $module_default_instance)?)?
|
||||
>($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>) where
|
||||
>($crate::sp_std::marker::PhantomData<($trait_instance $(, $instance)?)>) where
|
||||
$( $other_where_bounds )*;
|
||||
|
||||
$crate::decl_module! {
|
||||
|
||||
@@ -280,7 +280,7 @@ macro_rules! __decl_generic_event {
|
||||
$(
|
||||
#[doc(hidden)]
|
||||
#[codec(skip)]
|
||||
PhantomData($crate::rstd::marker::PhantomData<$instance>),
|
||||
PhantomData($crate::sp_std::marker::PhantomData<$instance>),
|
||||
)?
|
||||
}
|
||||
impl<$( $generic_param ),* $(, $instance)? > From<RawEvent<$( $generic_param ),* $(, $instance)?>> for () {
|
||||
@@ -486,12 +486,12 @@ macro_rules! impl_outer_event {
|
||||
$name::[< $module_name $(_ $generic_instance )? >](x)
|
||||
}
|
||||
}
|
||||
impl $crate::rstd::convert::TryInto<
|
||||
impl $crate::sp_std::convert::TryInto<
|
||||
$module_name::Event < $( $generic_param, )? $( $module_name::$generic_instance )? >
|
||||
> for $name {
|
||||
type Error = ();
|
||||
|
||||
fn try_into(self) -> $crate::rstd::result::Result<
|
||||
fn try_into(self) -> $crate::sp_std::result::Result<
|
||||
$module_name::Event < $( $generic_param, )? $( $module_name::$generic_instance )? >, Self::Error
|
||||
> {
|
||||
match self {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Hash utilities.
|
||||
|
||||
use codec::Codec;
|
||||
use rstd::prelude::Vec;
|
||||
use sp_std::prelude::Vec;
|
||||
use runtime_io::hashing::{blake2_128, blake2_256, twox_64, twox_128, twox_256};
|
||||
|
||||
// This trait must be kept coherent with frame-support-procedural HasherKind usage
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use crate::rstd::vec::Vec;
|
||||
pub use crate::sp_std::vec::Vec;
|
||||
#[doc(hidden)]
|
||||
pub use crate::sp_runtime::traits::{Block as BlockT, Extrinsic};
|
||||
#[doc(hidden)]
|
||||
|
||||
@@ -29,7 +29,7 @@ pub extern crate tracing;
|
||||
#[cfg(feature = "std")]
|
||||
pub use serde;
|
||||
#[doc(hidden)]
|
||||
pub use rstd;
|
||||
pub use sp_std;
|
||||
#[doc(hidden)]
|
||||
pub use codec;
|
||||
#[cfg(feature = "std")]
|
||||
@@ -204,7 +204,7 @@ mod tests {
|
||||
DecodeDifferent, StorageEntryMetadata, StorageMetadata, StorageEntryType,
|
||||
StorageEntryModifier, DefaultByteGetter, StorageHasher,
|
||||
};
|
||||
use rstd::marker::PhantomData;
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
pub trait Trait {
|
||||
type BlockNumber: Codec + EncodeLike + Default;
|
||||
|
||||
@@ -178,8 +178,8 @@ macro_rules! impl_outer_origin {
|
||||
$name::system(x)
|
||||
}
|
||||
}
|
||||
impl Into<$crate::rstd::result::Result<$system::Origin<$runtime>, $name>> for $name {
|
||||
fn into(self) -> $crate::rstd::result::Result<$system::Origin<$runtime>, Self> {
|
||||
impl Into<$crate::sp_std::result::Result<$system::Origin<$runtime>, $name>> for $name {
|
||||
fn into(self) -> $crate::sp_std::result::Result<$system::Origin<$runtime>, Self> {
|
||||
if let $name::system(l) = self {
|
||||
Ok(l)
|
||||
} else {
|
||||
@@ -200,12 +200,12 @@ macro_rules! impl_outer_origin {
|
||||
}
|
||||
}
|
||||
impl Into<
|
||||
$crate::rstd::result::Result<
|
||||
$crate::sp_std::result::Result<
|
||||
$module::Origin < $( $generic )? $(, $module::$generic_instance )? >,
|
||||
$name,
|
||||
>>
|
||||
for $name {
|
||||
fn into(self) -> $crate::rstd::result::Result<
|
||||
fn into(self) -> $crate::sp_std::result::Result<
|
||||
$module::Origin < $( $generic )? $(, $module::$generic_instance )? >,
|
||||
Self,
|
||||
> {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
//! avoid collision from a resistant hash function (which unique implies)).
|
||||
// NOTE: could replace unhashed by having only one kind of storage (root being null storage key (storage_key can become Option<&[u8]>).
|
||||
|
||||
use crate::rstd::prelude::*;
|
||||
use crate::sp_std::prelude::*;
|
||||
use codec::{Codec, Encode, Decode};
|
||||
|
||||
/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::borrow::Borrow;
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::borrow::Borrow;
|
||||
use codec::{Ref, FullCodec, FullEncode, Encode, EncodeLike, EncodeAppend};
|
||||
use crate::{storage::{self, unhashed}, hash::{StorageHasher, Twox128}, traits::Len};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use codec::{FullCodec, Encode, Decode, EncodeLike, Ref};
|
||||
use crate::{storage::{self, unhashed}, hash::{StorageHasher, Twox128}, traits::Len};
|
||||
use rstd::{prelude::*, marker::PhantomData};
|
||||
use sp_std::{prelude::*, marker::PhantomData};
|
||||
|
||||
/// Generator for `StorageLinkedMap` used by `decl_storage`.
|
||||
///
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use rstd::prelude::*;
|
||||
use rstd::borrow::Borrow;
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::borrow::Borrow;
|
||||
use codec::{FullCodec, FullEncode, Encode, EncodeLike, Ref, EncodeAppend};
|
||||
use crate::{storage::{self, unhashed}, hash::{StorageHasher, Twox128}, traits::Len};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{FullCodec, Encode, EncodeAppend, EncodeLike, Decode};
|
||||
use crate::{storage::{self, unhashed}, hash::{Twox128, StorageHasher}, traits::Len};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Operation on runtime storage using hashed keys.
|
||||
|
||||
use super::unhashed;
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Stuff to do with the runtime's storage.
|
||||
|
||||
use rstd::{prelude::*, marker::PhantomData};
|
||||
use sp_std::{prelude::*, marker::PhantomData};
|
||||
use codec::{FullCodec, FullEncode, Encode, EncodeAppend, EncodeLike, Decode};
|
||||
use crate::{traits::Len, hash::{Twox128, StorageHasher}};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user