Polkadot parachains get topic-based message IDs (#2642)

* Polkadot parachains get topics

* Formatting

---------

Co-authored-by: joepetrowski <joe@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Gavin Wood
2023-08-10 02:08:56 -07:00
committed by GitHub
parent 195a2c38eb
commit 0765e2d152
4 changed files with 89 additions and 81 deletions
@@ -70,7 +70,7 @@ use parachains_common::{
};
use xcm_builder::{
AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, ConvertedConcreteId,
FungiblesAdapter, LocalMint,
FungiblesAdapter, LocalMint, TrailingSetTopicAsId, WithUniqueTopic,
};
use xcm_executor::traits::JustTry;
@@ -383,7 +383,7 @@ match_types! {
};
}
pub type Barrier = (
pub type Barrier = TrailingSetTopicAsId<(
TakeWeightCredit,
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent & its unit plurality gets free execution.
@@ -394,7 +394,7 @@ pub type Barrier = (
AllowKnownQueryResponses<PolkadotXcm>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<Everything>,
);
)>;
parameter_types! {
pub MaxAssetsIntoHolding: u32 = 64;
@@ -441,12 +441,12 @@ pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, R
/// The means for routing XCM messages which are not for local execution into the right message
/// queues.
pub type XcmRouter = (
pub type XcmRouter = WithUniqueTopic<(
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, (), ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
);
)>;
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {