Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed ESTIMATE_MESSAGE_FEE_METHOD #1696

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions 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
2 changes: 0 additions & 2 deletions relays/bin-substrate/src/chains/millau_headers_to_rialto.rs
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;
}
2 changes: 0 additions & 2 deletions relays/bin-substrate/src/chains/rialto_headers_to_millau.rs
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 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>;
}