Skip to content

Commit

Permalink
removed ESTIMATE_MESSAGE_FEE_METHOD (paritytech#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik committed Dec 2, 2022
1 parent 6b98b44 commit 71be3ed
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 25 deletions.
6 changes: 0 additions & 6 deletions bridges/primitives/runtime/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ macro_rules! decl_bridge_finality_runtime_apis {
/// - `To<ThisChain>OutboundLaneApi`
/// - `From<ThisChain>InboundLaneApi`
/// - constants that are stringified names of runtime API methods:
/// - `TO_<THIS_CHAIN>_ESTIMATE_MESSAGE_FEE_METHOD`
/// - `TO_<THIS_CHAIN>_MESSAGE_DETAILS_METHOD`
/// - `FROM_<THIS_CHAIN>_MESSAGE_DETAILS_METHOD`,
/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`).
#[macro_export]
Expand All @@ -283,10 +281,6 @@ macro_rules! decl_bridge_messages_runtime_apis {
mod [<$chain _messages_api>] {
use super::*;

/// Name of the `To<ThisChain>OutboundLaneApi::estimate_message_delivery_and_dispatch_fee` runtime
/// method.
pub const [<TO_ $chain:upper _ESTIMATE_MESSAGE_FEE_METHOD>]: &str =
stringify!([<To $chain:camel OutboundLaneApi_estimate_message_delivery_and_dispatch_fee>]);
/// Name of the `To<ThisChain>OutboundLaneApi::message_details` runtime method.
pub const [<TO_ $chain:upper _MESSAGE_DETAILS_METHOD>]: &str =
stringify!([<To $chain:camel OutboundLaneApi_message_details>]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 0 additions & 3 deletions bridges/relays/bin-substrate/src/cli/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<SourceChain = Self::Source, TargetChain = Self::Target>;
}

0 comments on commit 71be3ed

Please sign in to comment.