From d447e8503409ec2d64aad598b08e2a3a7bbc9264 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Fri, 2 Dec 2022 12:44:00 +0300 Subject: [PATCH] removed ESTIMATE_MESSAGE_FEE_METHOD --- primitives/runtime/src/chain.rs | 6 ------ .../bridge_hub_rococo_messages_to_bridge_hub_wococo.rs | 2 -- .../bridge_hub_wococo_messages_to_bridge_hub_rococo.rs | 2 -- relays/bin-substrate/src/chains/millau_headers_to_rialto.rs | 2 -- .../src/chains/millau_headers_to_rialto_parachain.rs | 2 -- relays/bin-substrate/src/chains/rialto_headers_to_millau.rs | 2 -- .../bin-substrate/src/chains/rialto_parachains_to_millau.rs | 2 -- .../src/chains/rococo_parachains_to_bridge_hub_wococo.rs | 2 -- .../src/chains/wococo_parachains_to_bridge_hub_rococo.rs | 2 -- relays/bin-substrate/src/cli/bridge.rs | 3 --- 10 files changed, 25 deletions(-) diff --git a/primitives/runtime/src/chain.rs b/primitives/runtime/src/chain.rs index d4a8d5aa020..cb5cbad434c 100644 --- a/primitives/runtime/src/chain.rs +++ b/primitives/runtime/src/chain.rs @@ -272,8 +272,6 @@ macro_rules! decl_bridge_finality_runtime_apis { /// - `ToOutboundLaneApi` /// - `FromInboundLaneApi` /// - constants that are stringified names of runtime API methods: -/// - `TO__ESTIMATE_MESSAGE_FEE_METHOD` -/// - `TO__MESSAGE_DETAILS_METHOD` /// - `FROM__MESSAGE_DETAILS_METHOD`, /// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`). #[macro_export] @@ -283,10 +281,6 @@ macro_rules! decl_bridge_messages_runtime_apis { mod [<$chain _messages_api>] { use super::*; - /// Name of the `ToOutboundLaneApi::estimate_message_delivery_and_dispatch_fee` runtime - /// method. - pub const []: &str = - stringify!([]); /// Name of the `ToOutboundLaneApi::message_details` runtime method. pub const []: &str = stringify!([]); diff --git a/relays/bin-substrate/src/chains/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/chains/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs index 78ef00f6d62..6f9f05e663e 100644 --- a/relays/bin-substrate/src/chains/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs +++ b/relays/bin-substrate/src/chains/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs @@ -30,8 +30,6 @@ impl CliBridgeBase for BridgeHubRococoToBridgeHubWococoMessagesCliBridge { } impl MessagesCliBridge for BridgeHubRococoToBridgeHubWococoMessagesCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - "TODO: not needed now, used for send_message and estimate_fee CLI"; type MessagesLane = BridgeHubRococoMessagesToBridgeHubWococoMessageLane; } diff --git a/relays/bin-substrate/src/chains/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/chains/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs index 51e1020e749..2b38eccbcb6 100644 --- a/relays/bin-substrate/src/chains/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs +++ b/relays/bin-substrate/src/chains/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs @@ -30,8 +30,6 @@ impl CliBridgeBase for BridgeHubWococoToBridgeHubRococoMessagesCliBridge { } impl MessagesCliBridge for BridgeHubWococoToBridgeHubRococoMessagesCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - "TODO: not needed now, used for send_message and estimate_fee CLI"; type MessagesLane = BridgeHubWococoMessagesToBridgeHubRococoMessageLane; } diff --git a/relays/bin-substrate/src/chains/millau_headers_to_rialto.rs b/relays/bin-substrate/src/chains/millau_headers_to_rialto.rs index e0dbabd86b4..e136b800b17 100644 --- a/relays/bin-substrate/src/chains/millau_headers_to_rialto.rs +++ b/relays/bin-substrate/src/chains/millau_headers_to_rialto.rs @@ -51,7 +51,5 @@ impl RelayToRelayHeadersCliBridge for MillauToRialtoCliBridge { } impl MessagesCliBridge for MillauToRialtoCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - bp_rialto::TO_RIALTO_ESTIMATE_MESSAGE_FEE_METHOD; type MessagesLane = crate::chains::millau_messages_to_rialto::MillauMessagesToRialto; } diff --git a/relays/bin-substrate/src/chains/millau_headers_to_rialto_parachain.rs b/relays/bin-substrate/src/chains/millau_headers_to_rialto_parachain.rs index cdb3999db6e..b830ce7fcc4 100644 --- a/relays/bin-substrate/src/chains/millau_headers_to_rialto_parachain.rs +++ b/relays/bin-substrate/src/chains/millau_headers_to_rialto_parachain.rs @@ -69,8 +69,6 @@ impl RelayToRelayHeadersCliBridge for MillauToRialtoParachainCliBridge { } impl MessagesCliBridge for MillauToRialtoParachainCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - bp_rialto_parachain::TO_RIALTO_PARACHAIN_ESTIMATE_MESSAGE_FEE_METHOD; type MessagesLane = crate::chains::millau_messages_to_rialto_parachain::MillauMessagesToRialtoParachain; } diff --git a/relays/bin-substrate/src/chains/rialto_headers_to_millau.rs b/relays/bin-substrate/src/chains/rialto_headers_to_millau.rs index b1ab4a8537b..208b2638af0 100644 --- a/relays/bin-substrate/src/chains/rialto_headers_to_millau.rs +++ b/relays/bin-substrate/src/chains/rialto_headers_to_millau.rs @@ -51,7 +51,5 @@ impl RelayToRelayHeadersCliBridge for RialtoToMillauCliBridge { } impl MessagesCliBridge for RialtoToMillauCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - bp_millau::TO_MILLAU_ESTIMATE_MESSAGE_FEE_METHOD; type MessagesLane = crate::chains::rialto_messages_to_millau::RialtoMessagesToMillau; } diff --git a/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs b/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs index 911d4399389..d1cf853ac77 100644 --- a/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs +++ b/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs @@ -67,8 +67,6 @@ impl ParachainToRelayHeadersCliBridge for RialtoParachainToMillauCliBridge { } impl MessagesCliBridge for RialtoParachainToMillauCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - bp_millau::TO_MILLAU_ESTIMATE_MESSAGE_FEE_METHOD; type MessagesLane = crate::chains::rialto_parachain_messages_to_millau::RialtoParachainMessagesToMillau; } diff --git a/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs index 8b208712db5..23e87194c91 100644 --- a/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs +++ b/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs @@ -78,8 +78,6 @@ impl CliBridgeBase for BridgeHubRococoToBridgeHubWococoCliBridge { } impl MessagesCliBridge for BridgeHubRococoToBridgeHubWococoCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - bp_bridge_hub_wococo::TO_BRIDGE_HUB_WOCOCO_ESTIMATE_MESSAGE_FEE_METHOD; type MessagesLane = crate::chains::bridge_hub_rococo_messages_to_bridge_hub_wococo::BridgeHubRococoMessagesToBridgeHubWococoMessageLane; } diff --git a/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs index 453455a7b56..caaeab56655 100644 --- a/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs +++ b/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs @@ -78,8 +78,6 @@ impl CliBridgeBase for BridgeHubWococoToBridgeHubRococoCliBridge { } impl MessagesCliBridge for BridgeHubWococoToBridgeHubRococoCliBridge { - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str = - bp_bridge_hub_rococo::TO_BRIDGE_HUB_ROCOCO_ESTIMATE_MESSAGE_FEE_METHOD; type MessagesLane = crate::chains::bridge_hub_wococo_messages_to_bridge_hub_rococo::BridgeHubWococoMessagesToBridgeHubRococoMessageLane; } diff --git a/relays/bin-substrate/src/cli/bridge.rs b/relays/bin-substrate/src/cli/bridge.rs index ae2a36cd1d5..c1923f89a84 100644 --- a/relays/bin-substrate/src/cli/bridge.rs +++ b/relays/bin-substrate/src/cli/bridge.rs @@ -97,9 +97,6 @@ pub trait ParachainToRelayHeadersCliBridge: CliBridgeBase { /// Bridge representation that can be used from the CLI for relaying messages. pub trait MessagesCliBridge: CliBridgeBase { - /// Name of the runtime method used to estimate the message dispatch and delivery fee for the - /// defined bridge. - const ESTIMATE_MESSAGE_FEE_METHOD: &'static str; /// The Source -> Destination messages synchronization pipeline. type MessagesLane: SubstrateMessageLane; }