mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
XCM: Tools for uniquely referencing messages (#7234)
* Tools for unique topic references * Formatting * Naming * Repot into routing.rs. * More things done * Universal Exporter supports topic-as-reference * Some tests for the topic routing * More tests * Paid bridge tests * Add message ID to sending events * Formatting * fix and integrate into test nets * Move DenyThenTry and friend from Cumulus * Append SetTopic rather than prepend * Docs * Docs * Work with new ProcessMessage ID API * Formatting * Fix build * Fixes * Formatting * Update xcm/xcm-builder/src/barriers.rs Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> * Update xcm/xcm-builder/src/routing.rs Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> * Docs * Rename message_hash * Formatting * ".git/.scripts/commands/fmt/fmt.sh" * Rename * Another Rename * ".git/.scripts/commands/fmt/fmt.sh" * ".git/.scripts/commands/fmt/fmt.sh" * Update xcm/xcm-builder/src/routing.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> --------- Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@ use xcm_builder::{
|
||||
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
|
||||
CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation,
|
||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
||||
UsingComponents, WeightInfoBounds, WithComputedOrigin,
|
||||
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||
};
|
||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||
|
||||
@@ -80,14 +80,14 @@ type LocalOriginConverter = (
|
||||
|
||||
/// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our
|
||||
/// individual routers.
|
||||
pub type XcmRouter = (
|
||||
pub type XcmRouter = WithUniqueTopic<(
|
||||
// Only one router so far - use DMP to communicate with child parachains.
|
||||
ChildParachainRouter<
|
||||
Runtime,
|
||||
XcmPallet,
|
||||
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>,
|
||||
>,
|
||||
);
|
||||
)>;
|
||||
|
||||
parameter_types! {
|
||||
pub const Westmint: MultiLocation = Parachain(1000).into_location();
|
||||
@@ -108,7 +108,7 @@ pub type TrustedTeleporters =
|
||||
(xcm_builder::Case<WndForWestmint>, xcm_builder::Case<WndForCollectives>);
|
||||
|
||||
/// The barriers one of which must be passed for an XCM message to be executed.
|
||||
pub type Barrier = (
|
||||
pub type Barrier = TrailingSetTopicAsId<(
|
||||
// Weight that is paid for may be consumed.
|
||||
TakeWeightCredit,
|
||||
// Expected responses are OK.
|
||||
@@ -125,7 +125,7 @@ pub type Barrier = (
|
||||
UniversalLocation,
|
||||
ConstU32<8>,
|
||||
>,
|
||||
);
|
||||
)>;
|
||||
|
||||
/// A call filter for the XCM Transact instruction. This is a temporary measure until we
|
||||
/// properly account for proof size weights.
|
||||
|
||||
Reference in New Issue
Block a user