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 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

  • Xcm and Order variants are now combined under a single Instruction enum.
  • Order is now obsolete and replaced entirely by Instruction.
  • Xcm is now a simple wrapper around a Vec<Instruction>.
  • During conversion from Order to Instruction, we do not handle BuyExecutions that have nested XCMs, i.e. if the instructions field in the BuyExecution enum struct variant is not empty, then the conversion will fail. To address this, rewrite the XCM using Instructions in chronological order.
  • During conversion from Xcm to Instruction, we do not handle RelayedFrom messages at all.

§XCM Pallet

  • The Weigher configuration item must have sensible weights defined for BuyExecution and DepositAsset instructions. Failing that, dispatch calls to teleport_assets and reserve_transfer_assets will fail with UnweighableMessage.

Modules§

  • opaqueDeprecated
  • preludeDeprecated
    A prelude for importing all types typically used when interacting with XCM messages.

Structs§

  • AncestorDeprecated
    A unit struct which can be converted into a MultiLocation of the inner parents value.
  • AncestorThenDeprecated
    A unit struct which can be converted into a MultiLocation of the inner parents value and the inner interior.
  • MultiAssetDeprecated
  • MultiAssetsDeprecated
    A Vec of MultiAssets. There may be no duplicate fungible items in here and when decoding, they must be sorted.
  • MultiLocationDeprecated
    A relative path between state-bearing consensus systems.
  • ParentDeprecated
    A unit struct which can be converted into a MultiLocation of parents value 1.
  • ParentThenDeprecated
    A tuple struct which can be converted into a MultiLocation of parents value 1 with the inner interior.
  • XcmDeprecated
    DEPRECATED. Please use XCMv3 or XCMv4 instead.

Enums§

  • AssetIdDeprecated
    Classification of an asset being concrete or abstract.
  • AssetInstanceDeprecated
    A general identifier for an instance of a non-fungible asset class.
  • BodyIdDeprecated
    An identifier of a pluralistic body.
  • BodyPartDeprecated
    A part of a pluralistic body.
  • ErrorDeprecated
  • FungibilityDeprecated
    Classification of whether an asset is fungible or not, along with a mandatory amount or instance.
  • InstructionDeprecated
    Cross-Consensus Message: A message from one consensus system to another.
  • JunctionDeprecated
    A single item in a path to describe the relative location of a consensus system.
  • JunctionsDeprecated
    Non-parent junctions that can be constructed, up to the length of 8. This specific Junctions implementation uses a Rust enum in order to make pattern matching easier.
  • MultiAsset collection, either MultiAssets or a single wildcard.
  • NetworkIdDeprecated
    A global identifier of an account-bearing consensus system.
  • OriginKindDeprecated
    Basically just the XCM (more general) version of ParachainDispatchOrigin.
  • OutcomeDeprecated
    Outcome of an XCM execution.
  • ResponseDeprecated
    Response data to a query.
  • SendErrorDeprecated
    Error result value when attempting to send an XCM message.
  • WeightLimitDeprecated
    An optional weight limit.
  • WildFungibilityDeprecated
    Classification of whether an asset is fungible or not.
  • WildMultiAssetDeprecated
    A wildcard representing a set of assets.

Constants§

Traits§

Type Aliases§

  • A relative location which is constrained to be an interior location of the context.
  • QueryIdDeprecated
    An identifier for a query.
  • ResultDeprecated
  • SendResultDeprecated
    Result value when attempting to send an XCM message.
  • WeightDeprecated
    Local weight type; execution time in picoseconds.