mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 00:01:03 +00:00
[testnet] Remove Wococo stuff from BridgeHubRococo/AssetHubRococo (#2300)
Rococo<>Wococo bridge is replaced by Rococo<Westend bridge, so this PR removes unneeded code. - [x] update bridges subtree after https://github.com/paritytech/parity-bridges-common/pull/2692 --------- Co-authored-by: command-bot <> Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
This commit is contained in:
@@ -280,7 +280,7 @@ pub type TransactionEraOf<C> = crate::TransactionEra<BlockNumberOf<C>, HashOf<C>
|
||||
/// - constants that are stringified names of runtime API methods:
|
||||
/// - `BEST_FINALIZED_<THIS_CHAIN>_HEADER_METHOD`
|
||||
/// - `<THIS_CHAIN>_ACCEPTED_<CONSENSUS>_FINALITY_PROOFS_METHOD`
|
||||
/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`).
|
||||
/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`).
|
||||
#[macro_export]
|
||||
macro_rules! decl_bridge_finality_runtime_apis {
|
||||
($chain: ident $(, $consensus: ident => $justification_type: ty)?) => {
|
||||
@@ -332,7 +332,7 @@ macro_rules! decl_bridge_finality_runtime_apis {
|
||||
/// - `From<ThisChain>InboundLaneApi`
|
||||
/// - constants that are stringified names of runtime API methods:
|
||||
/// - `FROM_<THIS_CHAIN>_MESSAGE_DETAILS_METHOD`,
|
||||
/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`).
|
||||
/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`).
|
||||
#[macro_export]
|
||||
macro_rules! decl_bridge_messages_runtime_apis {
|
||||
($chain: ident) => {
|
||||
@@ -390,7 +390,7 @@ macro_rules! decl_bridge_messages_runtime_apis {
|
||||
|
||||
/// Convenience macro that declares bridge finality runtime apis, bridge messages runtime apis
|
||||
/// and related constants for a chain.
|
||||
/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`).
|
||||
/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`).
|
||||
#[macro_export]
|
||||
macro_rules! decl_bridge_runtime_apis {
|
||||
($chain: ident $(, $consensus: ident)?) => {
|
||||
|
||||
@@ -88,7 +88,7 @@ pub type BridgeRejectObsoleteHeadersAndMessages = GenericSignedExtensionSchema<(
|
||||
/// wildcard/placeholder, which relies on the scale encoding for `()` or `((), ())`, or `((), (),
|
||||
/// ())` is the same. So runtime can contains any kind of tuple:
|
||||
/// `(BridgeRefundBridgeHubRococoMessages)`
|
||||
/// `(BridgeRefundBridgeHubRococoMessages, BridgeRefundBridgeHubWococoMessages)`
|
||||
/// `(BridgeRefundBridgeHubRococoMessages, BridgeRefundBridgeHubWestendMessages)`
|
||||
/// `(BridgeRefundParachainMessages1, ..., BridgeRefundParachainMessagesN)`
|
||||
pub type RefundBridgedParachainMessagesSchema = GenericSignedExtensionSchema<(), ()>;
|
||||
|
||||
|
||||
@@ -61,15 +61,6 @@ pub use sp_runtime::paste;
|
||||
/// Use this when something must be shared among all instances.
|
||||
pub const NO_INSTANCE_ID: ChainId = [0, 0, 0, 0];
|
||||
|
||||
/// Rialto chain id.
|
||||
pub const RIALTO_CHAIN_ID: ChainId = *b"rlto";
|
||||
|
||||
/// RialtoParachain chain id.
|
||||
pub const RIALTO_PARACHAIN_CHAIN_ID: ChainId = *b"rlpa";
|
||||
|
||||
/// Millau chain id.
|
||||
pub const MILLAU_CHAIN_ID: ChainId = *b"mlau";
|
||||
|
||||
/// Polkadot chain id.
|
||||
pub const POLKADOT_CHAIN_ID: ChainId = *b"pdot";
|
||||
|
||||
@@ -88,15 +79,9 @@ pub const ASSET_HUB_WESTEND_CHAIN_ID: ChainId = *b"ahwe";
|
||||
/// Rococo chain id.
|
||||
pub const ROCOCO_CHAIN_ID: ChainId = *b"roco";
|
||||
|
||||
/// Wococo chain id.
|
||||
pub const WOCOCO_CHAIN_ID: ChainId = *b"woco";
|
||||
|
||||
/// BridgeHubRococo chain id.
|
||||
pub const BRIDGE_HUB_ROCOCO_CHAIN_ID: ChainId = *b"bhro";
|
||||
|
||||
/// BridgeHubWococo chain id.
|
||||
pub const BRIDGE_HUB_WOCOCO_CHAIN_ID: ChainId = *b"bhwo";
|
||||
|
||||
/// BridgeHubWestend chain id.
|
||||
pub const BRIDGE_HUB_WESTEND_CHAIN_ID: ChainId = *b"bhwd";
|
||||
|
||||
@@ -277,18 +262,6 @@ pub fn storage_map_final_key<H: StorageHasher>(
|
||||
StorageKey(final_key)
|
||||
}
|
||||
|
||||
/// This is how a storage key of storage parameter (`parameter_types! { storage Param: bool = false;
|
||||
/// }`) is computed.
|
||||
///
|
||||
/// Copied from `frame_support::parameter_types` macro.
|
||||
pub fn storage_parameter_key(parameter_name: &str) -> StorageKey {
|
||||
let mut buffer = Vec::with_capacity(1 + parameter_name.len() + 1);
|
||||
buffer.push(b':');
|
||||
buffer.extend_from_slice(parameter_name.as_bytes());
|
||||
buffer.push(b':');
|
||||
StorageKey(sp_io::hashing::twox_128(&buffer).to_vec())
|
||||
}
|
||||
|
||||
/// This is how a storage key of storage value is computed.
|
||||
///
|
||||
/// Copied from `frame_support::storage::storage_prefix`.
|
||||
@@ -574,14 +547,6 @@ where
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn storage_parameter_key_works() {
|
||||
assert_eq!(
|
||||
storage_parameter_key("MillauToRialtoConversionRate"),
|
||||
StorageKey(hex_literal::hex!("58942375551bb0af1682f72786b59d04").to_vec()),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn storage_value_key_works() {
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user