Module staging_xcm::v2
source · 👎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 Instruction
s. 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
Xcm
andOrder
variants are now combined under a singleInstruction
enum.Order
is now obsolete and replaced entirely byInstruction
.Xcm
is now a simple wrapper around aVec<Instruction>
.- During conversion from
Order
toInstruction
, we do not handleBuyExecution
s that have nested XCMs, i.e. if theinstructions
field in theBuyExecution
enum struct variant is not empty, then the conversion will fail. To address this, rewrite the XCM usingInstruction
s in chronological order. - During conversion from
Xcm
toInstruction
, we do not handleRelayedFrom
messages at all.
§XCM Pallet
- The
Weigher
configuration item must have sensible weights defined forBuyExecution
andDepositAsset
instructions. Failing that, dispatch calls toteleport_assets
andreserve_transfer_assets
will fail withUnweighableMessage
.
Modules§
- opaqueDeprecated
- preludeDeprecatedA prelude for importing all types typically used when interacting with XCM messages.
Structs§
- AncestorDeprecatedA unit struct which can be converted into a
MultiLocation
of the innerparents
value. - AncestorThenDeprecatedA unit struct which can be converted into a
MultiLocation
of the innerparents
value and the inner interior. - MultiAssetDeprecated
- MultiAssetsDeprecatedA
Vec
ofMultiAsset
s. There may be no duplicate fungible items in here and when decoding, they must be sorted. - MultiLocationDeprecatedA relative path between state-bearing consensus systems.
- ParentDeprecatedA unit struct which can be converted into a
MultiLocation
ofparents
value 1. - ParentThenDeprecatedA tuple struct which can be converted into a
MultiLocation
ofparents
value 1 with the inner interior. - XcmDeprecatedDEPRECATED. Please use XCMv3 or XCMv4 instead.
Enums§
- AssetIdDeprecatedClassification of an asset being concrete or abstract.
- AssetInstanceDeprecatedA general identifier for an instance of a non-fungible asset class.
- BodyIdDeprecatedAn identifier of a pluralistic body.
- BodyPartDeprecatedA part of a pluralistic body.
- ErrorDeprecated
- FungibilityDeprecatedClassification of whether an asset is fungible or not, along with a mandatory amount or instance.
- InstructionDeprecatedCross-Consensus Message: A message from one consensus system to another.
- JunctionDeprecatedA single item in a path to describe the relative location of a consensus system.
- JunctionsDeprecatedNon-parent junctions that can be constructed, up to the length of 8. This specific
Junctions
implementation uses a Rustenum
in order to make pattern matching easier. - MultiAssetFilterDeprecated
MultiAsset
collection, eitherMultiAssets
or a single wildcard. - NetworkIdDeprecatedA global identifier of an account-bearing consensus system.
- OriginKindDeprecatedBasically just the XCM (more general) version of
ParachainDispatchOrigin
. - OutcomeDeprecatedOutcome of an XCM execution.
- ResponseDeprecatedResponse data to a query.
- SendErrorDeprecatedError result value when attempting to send an XCM message.
- WeightLimitDeprecatedAn optional weight limit.
- WildFungibilityDeprecatedClassification of whether an asset is fungible or not.
- WildMultiAssetDeprecatedA wildcard representing a set of assets.
Constants§
- MAX_INSTRUCTIONS_TO_DECODEDeprecatedThe maximal number of instructions in an XCM before decoding fails.
- VERSIONDeprecatedThis module’s XCM version.
Traits§
- ExecuteXcmDeprecatedType of XCM message executor.
- GetWeightDeprecated
- SendXcmDeprecatedUtility for sending an XCM message.
- XcmWeightInfoDeprecated
Type Aliases§
- InteriorMultiLocationDeprecatedA relative location which is constrained to be an interior location of the context.
- QueryIdDeprecatedAn identifier for a query.
- ResultDeprecated
- SendResultDeprecatedResult value when attempting to send an XCM message.
- WeightDeprecatedLocal weight type; execution time in picoseconds.