Rococo <> Wococo messages relay (#1030)

* MessagesInstance -> BridgedMessagesInstance

* Chain::ID -> Bridge::THIS_CHAIN_ID+Bridge::BRIDGED_CHAIN_ID

* FromBridgedChainEncodedMessageCall<B> -> FromBridgedChainEncodedMessageCall<DecodedCall>

* impl Parameter for ()

* copypaste storage_map_final_key to avoid different runtime references/dummy runtimes

* moved dummy runtime from primitives to relay client

* Rococo <> Wococo messages relays

* send R<>W messages using relay

* fmt

* return Result from get_dispatch_info

* fix benchmarks compilation

* clippy
This commit is contained in:
Svyatoslav Nikolsky
2021-06-25 11:06:14 +03:00
committed by Bastian Köcher
parent c8aeb11b26
commit 165730a2c2
34 changed files with 1090 additions and 242 deletions
+4 -2
View File
@@ -22,6 +22,8 @@ use sp_core::{storage::StorageKey, Pair};
use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
use std::time::Duration;
pub mod runtime;
/// Wococo header id.
pub type HeaderId = relay_utils::HeaderId<bp_wococo::Hash, bp_wococo::BlockNumber>;
@@ -46,7 +48,7 @@ impl Chain for Wococo {
type AccountId = bp_wococo::AccountId;
type Index = bp_wococo::Index;
type SignedBlock = bp_wococo::SignedBlock;
type Call = bp_wococo::Call;
type Call = crate::runtime::Call;
type Balance = bp_wococo::Balance;
}
@@ -59,7 +61,7 @@ impl ChainWithBalances for Wococo {
impl TransactionSignScheme for Wococo {
type Chain = Wococo;
type AccountKeyPair = sp_core::sr25519::Pair;
type SignedTransaction = bp_wococo::UncheckedExtrinsic;
type SignedTransaction = crate::runtime::UncheckedExtrinsic;
fn sign_transaction(
genesis_hash: <Self::Chain as ChainBase>::Hash,