mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Polkadot <> Kusama relayers (#1122)
* relay headers between Kusama and Polkadot * relay messages between Kusama and Polkadot * complex Kusama <> Polkadot relayer * expose relayer_fund_account_id from messages pallet * create relayers fund accounts on Kusama/Polkadot + some more fixes * fmt * fix compilation * compilation + clippy * compilation * MAXIMAL_BALANCE_DECREASE_PER_DAY for K<>P header relays * fmt * deduplicate tests * Update modules/messages/src/lib.rs Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * extract storage_parameter_key function * other grumbles * fix * fmt Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
417903f9e7
commit
2db84b74cc
@@ -46,6 +46,8 @@ pub enum InitBridgeName {
|
||||
WestendToMillau,
|
||||
RococoToWococo,
|
||||
WococoToRococo,
|
||||
KusamaToPolkadot,
|
||||
PolkadotToKusama,
|
||||
}
|
||||
|
||||
macro_rules! select_bridge {
|
||||
@@ -127,6 +129,34 @@ macro_rules! select_bridge {
|
||||
)
|
||||
}
|
||||
|
||||
$generic
|
||||
}
|
||||
InitBridgeName::KusamaToPolkadot => {
|
||||
type Source = relay_kusama_client::Kusama;
|
||||
type Target = relay_polkadot_client::Polkadot;
|
||||
|
||||
fn encode_init_bridge(
|
||||
init_data: InitializationData<<Source as ChainBase>::Header>,
|
||||
) -> <Target as Chain>::Call {
|
||||
relay_polkadot_client::runtime::Call::BridgeKusamaGrandpa(
|
||||
relay_polkadot_client::runtime::BridgeKusamaGrandpaCall::initialize(init_data),
|
||||
)
|
||||
}
|
||||
|
||||
$generic
|
||||
}
|
||||
InitBridgeName::PolkadotToKusama => {
|
||||
type Source = relay_polkadot_client::Polkadot;
|
||||
type Target = relay_kusama_client::Kusama;
|
||||
|
||||
fn encode_init_bridge(
|
||||
init_data: InitializationData<<Source as ChainBase>::Header>,
|
||||
) -> <Target as Chain>::Call {
|
||||
relay_kusama_client::runtime::Call::BridgePolkadotGrandpa(
|
||||
relay_kusama_client::runtime::BridgePolkadotGrandpaCall::initialize(init_data),
|
||||
)
|
||||
}
|
||||
|
||||
$generic
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user