diff --git a/primitives/chain-bridge-hub-rococo/src/lib.rs b/primitives/chain-bridge-hub-rococo/src/lib.rs index b991404d2ea..828fbfabec9 100644 --- a/primitives/chain-bridge-hub-rococo/src/lib.rs +++ b/primitives/chain-bridge-hub-rococo/src/lib.rs @@ -17,6 +17,8 @@ //! Module with configuration which reflects BridgeHubRococo runtime setup (AccountId, Headers, //! Hashes...) +#![cfg_attr(not(feature = "std"), no_std)] + pub use bp_polkadot_core::*; use bp_runtime::decl_bridge_finality_runtime_apis; use frame_support::{parameter_types, sp_runtime::MultiAddress}; diff --git a/primitives/chain-bridge-hub-wococo/Cargo.toml b/primitives/chain-bridge-hub-wococo/Cargo.toml index 01cb7e2af15..1cc1f0eebf5 100644 --- a/primitives/chain-bridge-hub-wococo/Cargo.toml +++ b/primitives/chain-bridge-hub-wococo/Cargo.toml @@ -10,7 +10,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" # Bridge Dependencies -bp-bridge-hub-rococo = { path = "../chain-bridge-hub-rococo" } +bp-bridge-hub-rococo = { path = "../chain-bridge-hub-rococo", default-features = false } bp-runtime = { path = "../../primitives/runtime", default-features = false } # Substrate Based Dependencies @@ -20,5 +20,7 @@ sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", d [features] default = ["std"] std = [ + "bp-runtime/std", + "sp-api/std", "bp-bridge-hub-rococo/std", ] diff --git a/primitives/chain-bridge-hub-wococo/src/lib.rs b/primitives/chain-bridge-hub-wococo/src/lib.rs index 044c2a93740..9f39172a16f 100644 --- a/primitives/chain-bridge-hub-wococo/src/lib.rs +++ b/primitives/chain-bridge-hub-wococo/src/lib.rs @@ -20,11 +20,14 @@ //! but actually this is just reexported BridgeHubRococo stuff, because they are supposed to be //! identical, at least uses the same parachain runtime +#![cfg_attr(not(feature = "std"), no_std)] + // Re-export only what is really needed pub use bp_bridge_hub_rococo::{ account_info_storage_key, AccountId, AccountPublic, Address, Balance, BlockNumber, Hash, Hashing, Header, Nonce, SS58Prefix, Signature, SignedBlock, SignedExtensions, UncheckedExtrinsic, WeightToFee, EXTRA_STORAGE_PROOF_SIZE, + MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, }; use bp_runtime::decl_bridge_finality_runtime_apis; diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index d775e09c47a..fdbadd94a8d 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -76,6 +76,12 @@ pub const ROCOCO_CHAIN_ID: ChainId = *b"roco"; /// Bridge-with-Wococo instance id. pub const WOCOCO_CHAIN_ID: ChainId = *b"woco"; +/// Bridge-with-BridgeHubRococo instance id. +pub const BRIDGE_HUB_ROCOCO_CHAIN_ID: ChainId = *b"bhro"; + +/// Bridge-with-BridgeHubWococo instance id. +pub const BRIDGE_HUB_WOCOCO_CHAIN_ID: ChainId = *b"bhwo"; + /// Call-dispatch module prefix. pub const CALL_DISPATCH_MODULE_PREFIX: &[u8] = b"pallet-bridge/dispatch";