From 8ebef157a90fb7cea375454c755aa01da0ba76e5 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 10 Aug 2023 10:44:34 +0200 Subject: [PATCH] Backport fix (for wasm `std` env) (#2339) * Backport fix (for wasm `std` env) * Cargo.lock * Polkadot/Westend * Cargo.lock --- bridges/primitives/chain-bridge-hub-kusama/src/lib.rs | 2 +- bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs | 2 +- bridges/primitives/chain-bridge-hub-rococo/src/lib.rs | 2 +- bridges/primitives/chain-bridge-hub-wococo/src/lib.rs | 2 +- bridges/primitives/chain-kusama/Cargo.toml | 2 ++ bridges/primitives/chain-kusama/src/lib.rs | 1 + bridges/primitives/chain-polkadot/Cargo.toml | 2 ++ bridges/primitives/chain-polkadot/src/lib.rs | 1 + bridges/primitives/chain-rococo/Cargo.toml | 2 ++ bridges/primitives/chain-rococo/src/lib.rs | 1 + bridges/primitives/chain-westend/Cargo.toml | 2 ++ bridges/primitives/chain-westend/src/lib.rs | 1 + bridges/primitives/chain-wococo/Cargo.toml | 2 ++ bridges/primitives/chain-wococo/src/lib.rs | 1 + 14 files changed, 19 insertions(+), 4 deletions(-) diff --git a/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs b/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs index 7405f561fb..03f295e07f 100644 --- a/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs +++ b/bridges/primitives/chain-bridge-hub-kusama/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::{ sp_runtime::{MultiAddress, MultiSigner}, RuntimeDebug, }; -use sp_std::prelude::*; +use sp_std::prelude::Vec; /// BridgeHubKusama parachain. #[derive(RuntimeDebug)] diff --git a/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs b/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs index e1fc0d7bc4..ceacfe67ff 100644 --- a/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs +++ b/bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs @@ -25,7 +25,7 @@ use bp_runtime::{ decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, }; use frame_support::{dispatch::DispatchClass, RuntimeDebug}; -use sp_std::prelude::*; +use sp_std::prelude::Vec; /// BridgeHubPolkadot parachain. #[derive(RuntimeDebug)] diff --git a/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs b/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs index 50206c8e6b..f8d46ff32b 100644 --- a/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs +++ b/bridges/primitives/chain-bridge-hub-rococo/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::{ sp_runtime::{MultiAddress, MultiSigner}, RuntimeDebug, }; -use sp_std::prelude::*; +use sp_std::prelude::Vec; /// BridgeHubRococo parachain. #[derive(RuntimeDebug)] diff --git a/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs b/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs index 7d14460c73..abbb0cc20e 100644 --- a/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs +++ b/bridges/primitives/chain-bridge-hub-wococo/src/lib.rs @@ -25,7 +25,7 @@ use bp_runtime::{ decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, }; use frame_support::{dispatch::DispatchClass, RuntimeDebug}; -use sp_std::prelude::*; +use sp_std::prelude::Vec; /// BridgeHubWococo parachain. #[derive(RuntimeDebug)] diff --git a/bridges/primitives/chain-kusama/Cargo.toml b/bridges/primitives/chain-kusama/Cargo.toml index 7f48ded1a3..65b0729aa1 100644 --- a/bridges/primitives/chain-kusama/Cargo.toml +++ b/bridges/primitives/chain-kusama/Cargo.toml @@ -18,6 +18,7 @@ bp-runtime = { path = "../runtime", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] @@ -27,4 +28,5 @@ std = [ "bp-runtime/std", "frame-support/std", "sp-api/std", + "sp-std/std", ] diff --git a/bridges/primitives/chain-kusama/src/lib.rs b/bridges/primitives/chain-kusama/src/lib.rs index 80be182abf..b758484aef 100644 --- a/bridges/primitives/chain-kusama/src/lib.rs +++ b/bridges/primitives/chain-kusama/src/lib.rs @@ -23,6 +23,7 @@ pub use bp_polkadot_core::*; use bp_header_chain::ChainWithGrandpa; use bp_runtime::{decl_bridge_finality_runtime_apis, Chain}; use frame_support::weights::Weight; +use sp_std::prelude::Vec; /// Kusama Chain pub struct Kusama; diff --git a/bridges/primitives/chain-polkadot/Cargo.toml b/bridges/primitives/chain-polkadot/Cargo.toml index def26bdda1..1522f1dadb 100644 --- a/bridges/primitives/chain-polkadot/Cargo.toml +++ b/bridges/primitives/chain-polkadot/Cargo.toml @@ -18,6 +18,7 @@ bp-runtime = { path = "../runtime", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] @@ -27,4 +28,5 @@ std = [ "bp-runtime/std", "frame-support/std", "sp-api/std", + "sp-std/std", ] diff --git a/bridges/primitives/chain-polkadot/src/lib.rs b/bridges/primitives/chain-polkadot/src/lib.rs index fb87c36442..eb62c1729a 100644 --- a/bridges/primitives/chain-polkadot/src/lib.rs +++ b/bridges/primitives/chain-polkadot/src/lib.rs @@ -23,6 +23,7 @@ pub use bp_polkadot_core::*; use bp_header_chain::ChainWithGrandpa; use bp_runtime::{decl_bridge_finality_runtime_apis, Chain}; use frame_support::weights::Weight; +use sp_std::prelude::Vec; /// Polkadot Chain pub struct Polkadot; diff --git a/bridges/primitives/chain-rococo/Cargo.toml b/bridges/primitives/chain-rococo/Cargo.toml index 4e21bd38b7..26e035b439 100644 --- a/bridges/primitives/chain-rococo/Cargo.toml +++ b/bridges/primitives/chain-rococo/Cargo.toml @@ -17,6 +17,7 @@ bp-runtime = { path = "../runtime", default-features = false } # Substrate Based Dependencies sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] @@ -27,4 +28,5 @@ std = [ "bp-runtime/std", "frame-support/std", "sp-api/std", + "sp-std/std", ] diff --git a/bridges/primitives/chain-rococo/src/lib.rs b/bridges/primitives/chain-rococo/src/lib.rs index a5aa46edde..140069d756 100644 --- a/bridges/primitives/chain-rococo/src/lib.rs +++ b/bridges/primitives/chain-rococo/src/lib.rs @@ -23,6 +23,7 @@ pub use bp_polkadot_core::*; use bp_header_chain::ChainWithGrandpa; use bp_runtime::{decl_bridge_finality_runtime_apis, Chain}; use frame_support::{parameter_types, weights::Weight}; +use sp_std::prelude::Vec; /// Rococo Chain pub struct Rococo; diff --git a/bridges/primitives/chain-westend/Cargo.toml b/bridges/primitives/chain-westend/Cargo.toml index 13a2e597f9..a080b8d352 100644 --- a/bridges/primitives/chain-westend/Cargo.toml +++ b/bridges/primitives/chain-westend/Cargo.toml @@ -18,6 +18,7 @@ bp-runtime = { path = "../runtime", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] @@ -27,4 +28,5 @@ std = [ "bp-runtime/std", "frame-support/std", "sp-api/std", + "sp-std/std", ] diff --git a/bridges/primitives/chain-westend/src/lib.rs b/bridges/primitives/chain-westend/src/lib.rs index c1cab3198f..5840f6a652 100644 --- a/bridges/primitives/chain-westend/src/lib.rs +++ b/bridges/primitives/chain-westend/src/lib.rs @@ -24,6 +24,7 @@ use frame_support::sp_std::prelude::*; use bp_header_chain::ChainWithGrandpa; use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, Parachain}; use frame_support::weights::Weight; +use sp_std::prelude::Vec; /// Westend Chain pub struct Westend; diff --git a/bridges/primitives/chain-wococo/Cargo.toml b/bridges/primitives/chain-wococo/Cargo.toml index 25fd7b9fd9..3bde102d8f 100644 --- a/bridges/primitives/chain-wococo/Cargo.toml +++ b/bridges/primitives/chain-wococo/Cargo.toml @@ -19,6 +19,7 @@ bp-rococo = { path = "../chain-rococo", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] @@ -29,4 +30,5 @@ std = [ "bp-rococo/std", "frame-support/std", "sp-api/std", + "sp-std/std", ] diff --git a/bridges/primitives/chain-wococo/src/lib.rs b/bridges/primitives/chain-wococo/src/lib.rs index 8009fde023..8247b63238 100644 --- a/bridges/primitives/chain-wococo/src/lib.rs +++ b/bridges/primitives/chain-wococo/src/lib.rs @@ -26,6 +26,7 @@ pub use bp_rococo::{ use bp_header_chain::ChainWithGrandpa; use bp_runtime::{decl_bridge_finality_runtime_apis, Chain}; use frame_support::weights::Weight; +use sp_std::prelude::Vec; /// Wococo Chain pub struct Wococo;