mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 14:31:02 +00:00
This reverts commit f904623c65fbad542a878133c612b1f8782f47d1.
This commit is contained in:
committed by
Bastian Köcher
parent
dc61bcdc01
commit
1f8b4d989e
@@ -17,36 +17,11 @@
|
||||
//! Millau chain specification for CLI.
|
||||
|
||||
use crate::cli::{encode_message::CliEncodeMessage, CliChain};
|
||||
use bp_runtime::{ChainId, EncodedOrDecodedCall, RIALTO_CHAIN_ID, RIALTO_PARACHAIN_CHAIN_ID};
|
||||
use bridge_runtime_common::CustomNetworkId;
|
||||
use bp_runtime::EncodedOrDecodedCall;
|
||||
use relay_millau_client::Millau;
|
||||
use relay_substrate_client::SimpleRuntimeVersion;
|
||||
use xcm_executor::traits::ExportXcm;
|
||||
|
||||
impl CliEncodeMessage for Millau {
|
||||
fn encode_wire_message(
|
||||
target: ChainId,
|
||||
at_target_xcm: xcm::v3::Xcm<()>,
|
||||
) -> anyhow::Result<Vec<u8>> {
|
||||
let target = match target {
|
||||
RIALTO_CHAIN_ID => CustomNetworkId::Rialto.as_network_id(),
|
||||
RIALTO_PARACHAIN_CHAIN_ID => CustomNetworkId::RialtoParachain.as_network_id(),
|
||||
_ => return Err(anyhow::format_err!("Unsupported target chain: {:?}", target)),
|
||||
};
|
||||
|
||||
Ok(millau_runtime::xcm_config::ToRialtoOrRialtoParachainSwitchExporter::validate(
|
||||
target,
|
||||
0,
|
||||
&mut Some(Self::dummy_universal_source()?),
|
||||
&mut Some(target.into()),
|
||||
&mut Some(at_target_xcm),
|
||||
)
|
||||
.map_err(|e| anyhow::format_err!("Failed to prepare outbound message: {:?}", e))?
|
||||
.0
|
||||
.1
|
||||
.0)
|
||||
}
|
||||
|
||||
fn encode_execute_xcm(
|
||||
message: xcm::VersionedXcm<Self::Call>,
|
||||
) -> anyhow::Result<EncodedOrDecodedCall<Self::Call>> {
|
||||
|
||||
@@ -17,34 +17,11 @@
|
||||
//! Rialto chain specification for CLI.
|
||||
|
||||
use crate::cli::{encode_message::CliEncodeMessage, CliChain};
|
||||
use bp_runtime::{ChainId, EncodedOrDecodedCall, MILLAU_CHAIN_ID};
|
||||
use bridge_runtime_common::CustomNetworkId;
|
||||
use bp_runtime::EncodedOrDecodedCall;
|
||||
use relay_rialto_client::Rialto;
|
||||
use relay_substrate_client::SimpleRuntimeVersion;
|
||||
use xcm_executor::traits::ExportXcm;
|
||||
|
||||
impl CliEncodeMessage for Rialto {
|
||||
fn encode_wire_message(
|
||||
target: ChainId,
|
||||
at_target_xcm: xcm::v3::Xcm<()>,
|
||||
) -> anyhow::Result<Vec<u8>> {
|
||||
let target = match target {
|
||||
MILLAU_CHAIN_ID => CustomNetworkId::Millau.as_network_id(),
|
||||
_ => return Err(anyhow::format_err!("Unsupported target chian: {:?}", target)),
|
||||
};
|
||||
|
||||
Ok(rialto_runtime::millau_messages::ToMillauBlobExporter::validate(
|
||||
target,
|
||||
0,
|
||||
&mut Some(Self::dummy_universal_source()?),
|
||||
&mut Some(target.into()),
|
||||
&mut Some(at_target_xcm),
|
||||
)
|
||||
.map_err(|e| anyhow::format_err!("Failed to prepare outbound message: {:?}", e))?
|
||||
.0
|
||||
.0)
|
||||
}
|
||||
|
||||
fn encode_execute_xcm(
|
||||
message: xcm::VersionedXcm<Self::Call>,
|
||||
) -> anyhow::Result<EncodedOrDecodedCall<Self::Call>> {
|
||||
|
||||
@@ -17,34 +17,11 @@
|
||||
//! Rialto parachain specification for CLI.
|
||||
|
||||
use crate::cli::{encode_message::CliEncodeMessage, CliChain};
|
||||
use bp_runtime::{ChainId, EncodedOrDecodedCall, MILLAU_CHAIN_ID};
|
||||
use bridge_runtime_common::CustomNetworkId;
|
||||
use bp_runtime::EncodedOrDecodedCall;
|
||||
use relay_rialto_parachain_client::RialtoParachain;
|
||||
use relay_substrate_client::SimpleRuntimeVersion;
|
||||
use xcm_executor::traits::ExportXcm;
|
||||
|
||||
impl CliEncodeMessage for RialtoParachain {
|
||||
fn encode_wire_message(
|
||||
target: ChainId,
|
||||
at_target_xcm: xcm::v3::Xcm<()>,
|
||||
) -> anyhow::Result<Vec<u8>> {
|
||||
let target = match target {
|
||||
MILLAU_CHAIN_ID => CustomNetworkId::Millau.as_network_id(),
|
||||
_ => return Err(anyhow::format_err!("Unsupported target chain: {:?}", target)),
|
||||
};
|
||||
|
||||
Ok(rialto_parachain_runtime::millau_messages::ToMillauBlobExporter::validate(
|
||||
target,
|
||||
0,
|
||||
&mut Some(Self::dummy_universal_source()?),
|
||||
&mut Some(target.into()),
|
||||
&mut Some(at_target_xcm),
|
||||
)
|
||||
.map_err(|e| anyhow::format_err!("Failed to prepare outbound message: {:?}", e))?
|
||||
.0
|
||||
.0)
|
||||
}
|
||||
|
||||
fn encode_execute_xcm(
|
||||
message: xcm::VersionedXcm<Self::Call>,
|
||||
) -> anyhow::Result<EncodedOrDecodedCall<Self::Call>> {
|
||||
|
||||
Reference in New Issue
Block a user