mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Move some associated types from relay_substrate_client::Chain to bp_runtime::Chain (#1087)
* move some associated types from relay_substrate_client::Chain to bp_runtime::Chain * dummy commit * Revert "dummy commit" This reverts commit 81bc64aa092df115a7c68e7bb7ca5e83ec31fd20.
This commit is contained in:
committed by
Bastian Köcher
parent
1df7076c4f
commit
7369ff9d70
@@ -22,7 +22,7 @@ use sp_core::{Bytes, Pair};
|
||||
use bp_header_chain::justification::GrandpaJustification;
|
||||
use relay_millau_client::{Millau, SyncHeader as MillauSyncHeader};
|
||||
use relay_rialto_client::{Rialto, SigningParams as RialtoSigningParams};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use substrate_relay_helper::finality_pipeline::{SubstrateFinalitySyncPipeline, SubstrateFinalityToSubstrate};
|
||||
|
||||
/// Millau-to-Rialto finality sync pipeline.
|
||||
@@ -55,7 +55,7 @@ impl SubstrateFinalitySyncPipeline for MillauFinalityToRialto {
|
||||
fn make_submit_finality_proof_transaction(
|
||||
&self,
|
||||
era: bp_runtime::TransactionEraOf<Rialto>,
|
||||
transaction_nonce: <Rialto as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Rialto>,
|
||||
header: MillauSyncHeader,
|
||||
proof: GrandpaJustification<bp_millau::Header>,
|
||||
) -> Bytes {
|
||||
|
||||
@@ -28,7 +28,7 @@ use frame_support::weights::Weight;
|
||||
use messages_relay::message_lane::MessageLane;
|
||||
use relay_millau_client::{HeaderId as MillauHeaderId, Millau, SigningParams as MillauSigningParams};
|
||||
use relay_rialto_client::{HeaderId as RialtoHeaderId, Rialto, SigningParams as RialtoSigningParams};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Chain, Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_utils::metrics::MetricsParams;
|
||||
use substrate_relay_helper::messages_lane::{
|
||||
select_delivery_transaction_limits, MessagesRelayParams, StandaloneMessagesMetrics, SubstrateMessageLane,
|
||||
@@ -76,7 +76,7 @@ impl SubstrateMessageLane for MillauMessagesToRialto {
|
||||
|
||||
fn make_messages_receiving_proof_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Millau as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Millau>,
|
||||
_generated_at_block: RialtoHeaderId,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesReceivingProof,
|
||||
) -> Bytes {
|
||||
@@ -108,7 +108,7 @@ impl SubstrateMessageLane for MillauMessagesToRialto {
|
||||
|
||||
fn make_messages_delivery_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Rialto as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Rialto>,
|
||||
_generated_at_header: MillauHeaderId,
|
||||
_nonces: RangeInclusive<MessageNonce>,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesProof,
|
||||
|
||||
@@ -22,7 +22,7 @@ use sp_core::{Bytes, Pair};
|
||||
use bp_header_chain::justification::GrandpaJustification;
|
||||
use relay_millau_client::{Millau, SigningParams as MillauSigningParams};
|
||||
use relay_rialto_client::{Rialto, SyncHeader as RialtoSyncHeader};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use substrate_relay_helper::finality_pipeline::{SubstrateFinalitySyncPipeline, SubstrateFinalityToSubstrate};
|
||||
|
||||
/// Rialto-to-Millau finality sync pipeline.
|
||||
@@ -56,7 +56,7 @@ impl SubstrateFinalitySyncPipeline for RialtoFinalityToMillau {
|
||||
fn make_submit_finality_proof_transaction(
|
||||
&self,
|
||||
era: bp_runtime::TransactionEraOf<Millau>,
|
||||
transaction_nonce: <Millau as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Millau>,
|
||||
header: RialtoSyncHeader,
|
||||
proof: GrandpaJustification<bp_rialto::Header>,
|
||||
) -> Bytes {
|
||||
|
||||
@@ -28,7 +28,7 @@ use frame_support::weights::Weight;
|
||||
use messages_relay::message_lane::MessageLane;
|
||||
use relay_millau_client::{HeaderId as MillauHeaderId, Millau, SigningParams as MillauSigningParams};
|
||||
use relay_rialto_client::{HeaderId as RialtoHeaderId, Rialto, SigningParams as RialtoSigningParams};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Chain, Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_utils::metrics::MetricsParams;
|
||||
use substrate_relay_helper::messages_lane::{
|
||||
select_delivery_transaction_limits, MessagesRelayParams, StandaloneMessagesMetrics, SubstrateMessageLane,
|
||||
@@ -76,7 +76,7 @@ impl SubstrateMessageLane for RialtoMessagesToMillau {
|
||||
|
||||
fn make_messages_receiving_proof_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Rialto as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Rialto>,
|
||||
_generated_at_block: MillauHeaderId,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesReceivingProof,
|
||||
) -> Bytes {
|
||||
@@ -108,7 +108,7 @@ impl SubstrateMessageLane for RialtoMessagesToMillau {
|
||||
|
||||
fn make_messages_delivery_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Millau as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Millau>,
|
||||
_generated_at_header: RialtoHeaderId,
|
||||
_nonces: RangeInclusive<MessageNonce>,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesProof,
|
||||
|
||||
@@ -21,7 +21,7 @@ use sp_core::{Bytes, Pair};
|
||||
|
||||
use bp_header_chain::justification::GrandpaJustification;
|
||||
use relay_rococo_client::{Rococo, SyncHeader as RococoSyncHeader};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_utils::metrics::MetricsParams;
|
||||
use relay_wococo_client::{SigningParams as WococoSigningParams, Wococo};
|
||||
use substrate_relay_helper::finality_pipeline::{SubstrateFinalitySyncPipeline, SubstrateFinalityToSubstrate};
|
||||
@@ -78,7 +78,7 @@ impl SubstrateFinalitySyncPipeline for RococoFinalityToWococo {
|
||||
fn make_submit_finality_proof_transaction(
|
||||
&self,
|
||||
era: bp_runtime::TransactionEraOf<Wococo>,
|
||||
transaction_nonce: <Wococo as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Wococo>,
|
||||
header: RococoSyncHeader,
|
||||
proof: GrandpaJustification<bp_rococo::Header>,
|
||||
) -> Bytes {
|
||||
|
||||
@@ -26,7 +26,7 @@ use bridge_runtime_common::messages::target::FromBridgedChainMessagesProof;
|
||||
use frame_support::weights::Weight;
|
||||
use messages_relay::message_lane::MessageLane;
|
||||
use relay_rococo_client::{HeaderId as RococoHeaderId, Rococo, SigningParams as RococoSigningParams};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Chain, Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_utils::metrics::MetricsParams;
|
||||
use relay_wococo_client::{HeaderId as WococoHeaderId, SigningParams as WococoSigningParams, Wococo};
|
||||
use substrate_relay_helper::messages_lane::{
|
||||
@@ -75,7 +75,7 @@ impl SubstrateMessageLane for RococoMessagesToWococo {
|
||||
|
||||
fn make_messages_receiving_proof_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Rococo as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Rococo>,
|
||||
_generated_at_block: WococoHeaderId,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesReceivingProof,
|
||||
) -> Bytes {
|
||||
@@ -109,7 +109,7 @@ impl SubstrateMessageLane for RococoMessagesToWococo {
|
||||
|
||||
fn make_messages_delivery_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Wococo as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Wococo>,
|
||||
_generated_at_header: RococoHeaderId,
|
||||
_nonces: RangeInclusive<MessageNonce>,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesProof,
|
||||
|
||||
@@ -21,7 +21,7 @@ use sp_core::{Bytes, Pair};
|
||||
|
||||
use bp_header_chain::justification::GrandpaJustification;
|
||||
use relay_millau_client::{Millau, SigningParams as MillauSigningParams};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_utils::metrics::MetricsParams;
|
||||
use relay_westend_client::{SyncHeader as WestendSyncHeader, Westend};
|
||||
use substrate_relay_helper::finality_pipeline::{SubstrateFinalitySyncPipeline, SubstrateFinalityToSubstrate};
|
||||
@@ -64,7 +64,7 @@ impl SubstrateFinalitySyncPipeline for WestendFinalityToMillau {
|
||||
fn make_submit_finality_proof_transaction(
|
||||
&self,
|
||||
era: bp_runtime::TransactionEraOf<Millau>,
|
||||
transaction_nonce: <Millau as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Millau>,
|
||||
header: WestendSyncHeader,
|
||||
proof: GrandpaJustification<bp_westend::Header>,
|
||||
) -> Bytes {
|
||||
|
||||
@@ -21,7 +21,7 @@ use sp_core::{Bytes, Pair};
|
||||
|
||||
use bp_header_chain::justification::GrandpaJustification;
|
||||
use relay_rococo_client::{Rococo, SigningParams as RococoSigningParams};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_utils::metrics::MetricsParams;
|
||||
use relay_wococo_client::{SyncHeader as WococoSyncHeader, Wococo};
|
||||
use substrate_relay_helper::finality_pipeline::{SubstrateFinalitySyncPipeline, SubstrateFinalityToSubstrate};
|
||||
@@ -83,7 +83,7 @@ impl SubstrateFinalitySyncPipeline for WococoFinalityToRococo {
|
||||
fn make_submit_finality_proof_transaction(
|
||||
&self,
|
||||
era: bp_runtime::TransactionEraOf<Rococo>,
|
||||
transaction_nonce: <Rococo as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Rococo>,
|
||||
header: WococoSyncHeader,
|
||||
proof: GrandpaJustification<bp_wococo::Header>,
|
||||
) -> Bytes {
|
||||
|
||||
@@ -26,7 +26,7 @@ use bridge_runtime_common::messages::target::FromBridgedChainMessagesProof;
|
||||
use frame_support::weights::Weight;
|
||||
use messages_relay::message_lane::MessageLane;
|
||||
use relay_rococo_client::{HeaderId as RococoHeaderId, Rococo, SigningParams as RococoSigningParams};
|
||||
use relay_substrate_client::{Chain, Client, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_substrate_client::{Chain, Client, IndexOf, TransactionSignScheme, UnsignedTransaction};
|
||||
use relay_utils::metrics::MetricsParams;
|
||||
use relay_wococo_client::{HeaderId as WococoHeaderId, SigningParams as WococoSigningParams, Wococo};
|
||||
use substrate_relay_helper::messages_lane::{
|
||||
@@ -74,7 +74,7 @@ impl SubstrateMessageLane for WococoMessagesToRococo {
|
||||
|
||||
fn make_messages_receiving_proof_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Wococo as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Wococo>,
|
||||
_generated_at_block: RococoHeaderId,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesReceivingProof,
|
||||
) -> Bytes {
|
||||
@@ -108,7 +108,7 @@ impl SubstrateMessageLane for WococoMessagesToRococo {
|
||||
|
||||
fn make_messages_delivery_transaction(
|
||||
&self,
|
||||
transaction_nonce: <Rococo as Chain>::Index,
|
||||
transaction_nonce: IndexOf<Rococo>,
|
||||
_generated_at_header: WococoHeaderId,
|
||||
_nonces: RangeInclusive<MessageNonce>,
|
||||
proof: <Self::MessageLane as MessageLane>::MessagesProof,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
use crate::cli::bridge::FullBridge;
|
||||
use crate::cli::{Balance, CliChain, HexBytes, HexLaneId, SourceConnectionParams};
|
||||
use crate::select_full_bridge;
|
||||
use bp_runtime::BalanceOf;
|
||||
use codec::{Decode, Encode};
|
||||
use relay_substrate_client::Chain;
|
||||
use structopt::StructOpt;
|
||||
@@ -53,7 +54,7 @@ impl EstimateFee {
|
||||
let lane = lane.into();
|
||||
let payload = Source::encode_message(payload).map_err(|e| anyhow::format_err!("{:?}", e))?;
|
||||
|
||||
let fee: <Source as Chain>::Balance =
|
||||
let fee: BalanceOf<Source> =
|
||||
estimate_message_delivery_and_dispatch_fee(&source_client, ESTIMATE_MESSAGE_FEE_METHOD, lane, payload)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ use crate::cli::{
|
||||
TargetSigningParams,
|
||||
};
|
||||
use bp_message_dispatch::{CallOrigin, MessagePayload};
|
||||
use bp_runtime::BalanceOf;
|
||||
use codec::Encode;
|
||||
use frame_support::weights::Weight;
|
||||
use relay_substrate_client::{Chain, TransactionSignScheme, UnsignedTransaction};
|
||||
@@ -159,7 +160,7 @@ impl SendMessage {
|
||||
let fee = match self.fee {
|
||||
Some(fee) => fee,
|
||||
None => Balance(
|
||||
estimate_message_delivery_and_dispatch_fee::<<Source as Chain>::Balance, _, _>(
|
||||
estimate_message_delivery_and_dispatch_fee::<BalanceOf<Source>, _, _>(
|
||||
&source_client,
|
||||
ESTIMATE_MESSAGE_FEE_METHOD,
|
||||
lane,
|
||||
|
||||
Reference in New Issue
Block a user