From 7d76f025bbc877aaa3cc8c5bd3ba29839cf04663 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 10 Aug 2023 10:46:59 +0200 Subject: [PATCH] Squashed 'bridges/' changes from 278119fec2..edf33a2c85 edf33a2c85 Backport fix (for wasm `std` env) (#2339) git-subtree-dir: bridges git-subtree-split: edf33a2c85399d366e008228f2d9e63e8a492d95 --- Cargo.lock | 5 +++++ primitives/chain-bridge-hub-kusama/src/lib.rs | 2 +- primitives/chain-bridge-hub-polkadot/src/lib.rs | 2 +- primitives/chain-bridge-hub-rococo/src/lib.rs | 2 +- primitives/chain-bridge-hub-wococo/src/lib.rs | 2 +- primitives/chain-kusama/Cargo.toml | 2 ++ primitives/chain-kusama/src/lib.rs | 1 + primitives/chain-polkadot/Cargo.toml | 2 ++ primitives/chain-polkadot/src/lib.rs | 1 + primitives/chain-rococo/Cargo.toml | 2 ++ primitives/chain-rococo/src/lib.rs | 1 + primitives/chain-westend/Cargo.toml | 2 ++ primitives/chain-westend/src/lib.rs | 1 + primitives/chain-wococo/Cargo.toml | 2 ++ primitives/chain-wococo/src/lib.rs | 1 + 15 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46b6ff6de57..85389786d52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -949,6 +949,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", + "sp-std 8.0.0", ] [[package]] @@ -1017,6 +1018,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", + "sp-std 8.0.0", ] [[package]] @@ -1092,6 +1094,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", + "sp-std 8.0.0", ] [[package]] @@ -1144,6 +1147,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", + "sp-std 8.0.0", ] [[package]] @@ -1156,6 +1160,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", + "sp-std 8.0.0", ] [[package]] diff --git a/primitives/chain-bridge-hub-kusama/src/lib.rs b/primitives/chain-bridge-hub-kusama/src/lib.rs index 7405f561fb2..03f295e07f1 100644 --- a/primitives/chain-bridge-hub-kusama/src/lib.rs +++ b/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/primitives/chain-bridge-hub-polkadot/src/lib.rs b/primitives/chain-bridge-hub-polkadot/src/lib.rs index e1fc0d7bc47..ceacfe67ff2 100644 --- a/primitives/chain-bridge-hub-polkadot/src/lib.rs +++ b/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/primitives/chain-bridge-hub-rococo/src/lib.rs b/primitives/chain-bridge-hub-rococo/src/lib.rs index 50206c8e6b3..f8d46ff32bd 100644 --- a/primitives/chain-bridge-hub-rococo/src/lib.rs +++ b/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/primitives/chain-bridge-hub-wococo/src/lib.rs b/primitives/chain-bridge-hub-wococo/src/lib.rs index 7d14460c737..abbb0cc20ea 100644 --- a/primitives/chain-bridge-hub-wococo/src/lib.rs +++ b/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/primitives/chain-kusama/Cargo.toml b/primitives/chain-kusama/Cargo.toml index 7f48ded1a37..65b0729aa17 100644 --- a/primitives/chain-kusama/Cargo.toml +++ b/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/primitives/chain-kusama/src/lib.rs b/primitives/chain-kusama/src/lib.rs index 80be182abfb..b758484aefe 100644 --- a/primitives/chain-kusama/src/lib.rs +++ b/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/primitives/chain-polkadot/Cargo.toml b/primitives/chain-polkadot/Cargo.toml index def26bdda1c..1522f1dadb7 100644 --- a/primitives/chain-polkadot/Cargo.toml +++ b/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/primitives/chain-polkadot/src/lib.rs b/primitives/chain-polkadot/src/lib.rs index fb87c364423..eb62c1729ad 100644 --- a/primitives/chain-polkadot/src/lib.rs +++ b/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/primitives/chain-rococo/Cargo.toml b/primitives/chain-rococo/Cargo.toml index 4e21bd38b7a..26e035b439a 100644 --- a/primitives/chain-rococo/Cargo.toml +++ b/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/primitives/chain-rococo/src/lib.rs b/primitives/chain-rococo/src/lib.rs index a5aa46edde0..140069d7569 100644 --- a/primitives/chain-rococo/src/lib.rs +++ b/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/primitives/chain-westend/Cargo.toml b/primitives/chain-westend/Cargo.toml index 13a2e597f9d..a080b8d3527 100644 --- a/primitives/chain-westend/Cargo.toml +++ b/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/primitives/chain-westend/src/lib.rs b/primitives/chain-westend/src/lib.rs index c1cab3198fb..5840f6a6528 100644 --- a/primitives/chain-westend/src/lib.rs +++ b/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/primitives/chain-wococo/Cargo.toml b/primitives/chain-wococo/Cargo.toml index 25fd7b9fd94..3bde102d8f2 100644 --- a/primitives/chain-wococo/Cargo.toml +++ b/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/primitives/chain-wococo/src/lib.rs b/primitives/chain-wococo/src/lib.rs index 8009fde023a..8247b63238c 100644 --- a/primitives/chain-wococo/src/lib.rs +++ b/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;