Send messages using xcm pallet (#1518)

* send messages using xcm pallet

* XcmBridge && XcmBridgeAdapter + (untested) config in RialtoParachain

* impl encode_send_xcm for the rest

* remove duplicate code

* some fixes

* cleanup

* some more tests

* cleanup

* cleanup

* send Rialto -> Millau messages using bridge-messages pallet

* fmt

* some clippy fixes

* more clippy
This commit is contained in:
Svyatoslav Nikolsky
2022-07-27 15:15:07 +03:00
committed by Bastian Köcher
parent b21790b769
commit c131a5e3c8
17 changed files with 480 additions and 158 deletions
@@ -37,6 +37,8 @@ use scale_info::TypeInfo;
use sp_runtime::{traits::Saturating, FixedPointNumber, FixedU128};
use sp_std::convert::TryFrom;
/// Default lane that is used to send messages to Rialto.
pub const DEFAULT_XCM_LANE_TO_RIALTO: LaneId = [0, 0, 0, 0];
/// Initial value of `RialtoToMillauConversionRate` parameter.
pub const INITIAL_RIALTO_TO_MILLAU_CONVERSION_RATE: FixedU128 =
FixedU128::from_inner(FixedU128::DIV);
@@ -149,7 +151,7 @@ impl messages::ThisChainWithMessages for Millau {
},
}
*lane == [0, 0, 0, 0] || *lane == [0, 0, 0, 1]
*lane == DEFAULT_XCM_LANE_TO_RIALTO || *lane == [0, 0, 0, 1]
}
fn maximal_pending_messages_at_outbound_lane() -> MessageNonce {