diff --git a/Cargo.lock b/Cargo.lock index 7d96dbbbd7bfc..4cf34e97276f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11270,7 +11270,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", ] [[package]] @@ -12152,7 +12151,6 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -19846,7 +19844,6 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", diff --git a/templates/parachain/pallets/template/Cargo.toml b/templates/parachain/pallets/template/Cargo.toml index 3b651ce427f9d..dde863101372e 100644 --- a/templates/parachain/pallets/template/Cargo.toml +++ b/templates/parachain/pallets/template/Cargo.toml @@ -27,7 +27,6 @@ frame-system = { workspace = true } # primitive deps sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] sp-core = { workspace = true, default-features = true } @@ -50,7 +49,6 @@ std = [ "frame-system/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = [ "frame-support/try-runtime", diff --git a/templates/parachain/runtime/Cargo.toml b/templates/parachain/runtime/Cargo.toml index de0ecad9b06ee..939fa245d2a0c 100644 --- a/templates/parachain/runtime/Cargo.toml +++ b/templates/parachain/runtime/Cargo.toml @@ -62,7 +62,6 @@ sp-inherents = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } -sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } @@ -136,7 +135,6 @@ std = [ "sp-offchain/std", "sp-runtime/std", "sp-session/std", - "sp-std/std", "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", diff --git a/templates/parachain/runtime/src/apis.rs b/templates/parachain/runtime/src/apis.rs index bc3c3808fb78b..f5d5d3e63027b 100644 --- a/templates/parachain/runtime/src/apis.rs +++ b/templates/parachain/runtime/src/apis.rs @@ -24,6 +24,7 @@ // For more information, please refer to // External crates imports +use alloc::vec::Vec; use frame_support::{ genesis_builder_helper::{build_state, get_preset}, weights::Weight, @@ -37,7 +38,6 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; -use sp_std::prelude::Vec; use sp_version::RuntimeVersion; // Local module imports @@ -106,7 +106,7 @@ impl_runtime_apis! { Runtime::metadata_at_version(version) } - fn metadata_versions() -> sp_std::vec::Vec { + fn metadata_versions() -> Vec { Runtime::metadata_versions() } } @@ -264,7 +264,7 @@ impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { - fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + fn setup_set_code_requirements(code: &Vec) -> Result<(), BenchmarkError> { ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); Ok(()) } diff --git a/templates/parachain/runtime/src/lib.rs b/templates/parachain/runtime/src/lib.rs index 3a9fee38f245d..012ad1d097bfa 100644 --- a/templates/parachain/runtime/src/lib.rs +++ b/templates/parachain/runtime/src/lib.rs @@ -12,6 +12,8 @@ mod benchmarks; mod configs; mod weights; +extern crate alloc; +use alloc::{boxed::Box, vec::Vec}; use smallvec::smallvec; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -19,7 +21,6 @@ use sp_runtime::{ MultiSignature, }; -use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; diff --git a/templates/solochain/runtime/Cargo.toml b/templates/solochain/runtime/Cargo.toml index af1cd466ea00f..f06c80b9a0321 100644 --- a/templates/solochain/runtime/Cargo.toml +++ b/templates/solochain/runtime/Cargo.toml @@ -53,7 +53,6 @@ sp-runtime = { features = [ "serde", ], workspace = true } sp-session = { workspace = true } -sp-std = { workspace = true } sp-storage = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { features = [ @@ -109,7 +108,6 @@ std = [ "sp-offchain/std", "sp-runtime/std", "sp-session/std", - "sp-std/std", "sp-storage/std", "sp-transaction-pool/std", "sp-version/std", diff --git a/templates/solochain/runtime/src/lib.rs b/templates/solochain/runtime/src/lib.rs index c147845fe2fe8..936ecd1bd388f 100644 --- a/templates/solochain/runtime/src/lib.rs +++ b/templates/solochain/runtime/src/lib.rs @@ -3,6 +3,8 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +extern crate alloc; +use alloc::{boxed::Box, vec, vec::Vec}; use pallet_grandpa::AuthorityId as GrandpaId; use sp_api::impl_runtime_apis; use sp_consensus_aura::sr25519::AuthorityId as AuraId; @@ -13,7 +15,6 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, MultiSignature, }; -use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; @@ -370,7 +371,7 @@ impl_runtime_apis! { Runtime::metadata_at_version(version) } - fn metadata_versions() -> sp_std::vec::Vec { + fn metadata_versions() -> Vec { Runtime::metadata_versions() } }