👎Deprecated: XCMv2 will be removed once XCMv5 is released. Please use XCMv3 or XCMv4 instead.
Expand description
§XCM Version 2
WARNING: DEPRECATED, please use version 3 or 4.
Version 2 of the Cross-Consensus Message format data structures. The comprehensive list of changes can be found in this PR description.
§Changes to be aware of
The biggest change here is the restructuring of XCM messages: instead of having Order and
Xcm types, the Xcm type now simply wraps a Vec containing Instructions. However, most
changes should still be automatically convertible via the try_from and from conversion
functions.
§Junction
- No special attention necessary
§MultiLocation
- No special attention necessary
§MultiAsset
- No special attention necessary
§XCM and Order
XcmandOrdervariants are now combined under a singleInstructionenum.Orderis now obsolete and replaced entirely byInstruction.Xcmis now a simple wrapper around aVec<Instruction>.- During conversion from
OrdertoInstruction, we do not handleBuyExecutions that have nested XCMs, i.e. if theinstructionsfield in theBuyExecutionenum struct variant is not empty, then the conversion will fail. To address this, rewrite the XCM usingInstructions in chronological order. - During conversion from
XcmtoInstruction, we do not handleRelayedFrommessages at all.
§XCM Pallet
- The
Weigherconfiguration item must have sensible weights defined forBuyExecutionandDepositAssetinstructions. Failing that, dispatch calls toteleport_assetsandreserve_transfer_assetswill fail withUnweighableMessage.
Modules§
- opaque
Deprecated - prelude
Deprecated - A prelude for importing all types typically used when interacting with XCM messages.
Structs§
- Ancestor
Deprecated - A unit struct which can be converted into a
MultiLocationof the innerparentsvalue. - Ancestor
Then Deprecated - A unit struct which can be converted into a
MultiLocationof the innerparentsvalue and the inner interior. - Multi
Asset Deprecated - Multi
Assets Deprecated - A
VecofMultiAssets. There may be no duplicate fungible items in here and when decoding, they must be sorted. - Multi
Location Deprecated - A relative path between state-bearing consensus systems.
- Parent
Deprecated - A unit struct which can be converted into a
MultiLocationofparentsvalue 1. - Parent
Then Deprecated - A tuple struct which can be converted into a
MultiLocationofparentsvalue 1 with the inner interior. - Xcm
Deprecated - DEPRECATED. Please use XCMv3 or XCMv4 instead.
Enums§
- AssetId
Deprecated - Classification of an asset being concrete or abstract.
- Asset
Instance Deprecated - A general identifier for an instance of a non-fungible asset class.
- BodyId
Deprecated - An identifier of a pluralistic body.
- Body
Part Deprecated - A part of a pluralistic body.
- Error
Deprecated - Fungibility
Deprecated - Classification of whether an asset is fungible or not, along with a mandatory amount or instance.
- Instruction
Deprecated - Cross-Consensus Message: A message from one consensus system to another.
- Junction
Deprecated - A single item in a path to describe the relative location of a consensus system.
- Junctions
Deprecated - Non-parent junctions that can be constructed, up to the length of 8. This specific
Junctionsimplementation uses a Rustenumin order to make pattern matching easier. - Multi
Asset Filter Deprecated MultiAssetcollection, eitherMultiAssetsor a single wildcard.- Network
Id Deprecated - A global identifier of an account-bearing consensus system.
- Origin
Kind Deprecated - Basically just the XCM (more general) version of
ParachainDispatchOrigin. - Outcome
Deprecated - Outcome of an XCM execution.
- Response
Deprecated - Response data to a query.
- Send
Error Deprecated - Error result value when attempting to send an XCM message.
- Weight
Limit Deprecated - An optional weight limit.
- Wild
Fungibility Deprecated - Classification of whether an asset is fungible or not.
- Wild
Multi Asset Deprecated - A wildcard representing a set of assets.
Constants§
- MAX_
INSTRUCTIONS_ TO_ DECODE Deprecated - The maximal number of instructions in an XCM before decoding fails.
- VERSION
Deprecated - This module’s XCM version.
Traits§
- Execute
Xcm Deprecated - Type of XCM message executor.
- GetWeight
Deprecated - SendXcm
Deprecated - Utility for sending an XCM message.
- XcmWeight
Info Deprecated
Type Aliases§
- Interior
Multi Location Deprecated - A relative location which is constrained to be an interior location of the context.
- QueryId
Deprecated - An identifier for a query.
- Result
Deprecated - Send
Result Deprecated - Result value when attempting to send an XCM message.
- Weight
Deprecated - Local weight type; execution time in picoseconds.