mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
Polkadot gets topic-based message IDs (#7301)
* Polkadot gets topics * Formatting * Fixes --------- Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -43,8 +43,8 @@ use xcm_builder::{
|
|||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, BackingToPlurality,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, BackingToPlurality,
|
||||||
ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter,
|
ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter,
|
||||||
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
|
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
|
||||||
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
|
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
WeightInfoBounds, WithComputedOrigin,
|
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||||
};
|
};
|
||||||
use xcm_executor::traits::WithOriginFilter;
|
use xcm_executor::traits::WithOriginFilter;
|
||||||
|
|
||||||
@@ -120,14 +120,14 @@ parameter_types! {
|
|||||||
|
|
||||||
/// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our
|
/// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our
|
||||||
/// individual routers.
|
/// individual routers.
|
||||||
pub type XcmRouter = (
|
pub type XcmRouter = WithUniqueTopic<(
|
||||||
// Only one router so far - use DMP to communicate with child parachains.
|
// Only one router so far - use DMP to communicate with child parachains.
|
||||||
ChildParachainRouter<
|
ChildParachainRouter<
|
||||||
Runtime,
|
Runtime,
|
||||||
XcmPallet,
|
XcmPallet,
|
||||||
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>,
|
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>,
|
||||||
>,
|
>,
|
||||||
);
|
)>;
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) });
|
pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) });
|
||||||
@@ -153,7 +153,7 @@ match_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The barriers one of which must be passed for an XCM message to be executed.
|
/// 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.
|
// Weight that is paid for may be consumed.
|
||||||
TakeWeightCredit,
|
TakeWeightCredit,
|
||||||
// Expected responses are OK.
|
// Expected responses are OK.
|
||||||
@@ -170,7 +170,7 @@ pub type Barrier = (
|
|||||||
UniversalLocation,
|
UniversalLocation,
|
||||||
ConstU32<8>,
|
ConstU32<8>,
|
||||||
>,
|
>,
|
||||||
);
|
)>;
|
||||||
|
|
||||||
/// A call filter for the XCM Transact instruction. This is a temporary measure until we
|
/// A call filter for the XCM Transact instruction. This is a temporary measure until we
|
||||||
/// properly account for proof size weights.
|
/// properly account for proof size weights.
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ pub enum Junction {
|
|||||||
/// An instanced, indexed pallet that forms a constituent part of the context.
|
/// An instanced, indexed pallet that forms a constituent part of the context.
|
||||||
///
|
///
|
||||||
/// Generally used when the context is a Frame-based chain.
|
/// Generally used when the context is a Frame-based chain.
|
||||||
|
// TODO XCMv4 inner should be `Compact<u32>`.
|
||||||
PalletInstance(u8),
|
PalletInstance(u8),
|
||||||
/// A non-descript index within the context location.
|
/// A non-descript index within the context location.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user