Skip to content

File: src/Xcm/v5/AssetInstance/AssetInstance.sol

AssetInstance

Kind: source

Structs

struct AssetInstance

A general identifier for an instance of a non-fungible asset class.

FieldTypeDescription
variantenum AssetInstanceVariantThe type of asset instance, determining how to interpret the payload. See `AssetInstanceVariant` enum for possible values.
payloadbytesThe encoded payload containing the asset instance data, whose structure depends on the `variant`.

struct IndexParams

Parameters for the Index variant.

FieldTypeDescription
indexuint128The compact index value.

struct Array4Params

Parameters for the Array4 variant.

FieldTypeDescription
databytes4The 4-byte fixed data.

struct Array8Params

Parameters for the Array8 variant.

FieldTypeDescription
databytes8The 8-byte fixed data.

struct Array16Params

Parameters for the Array16 variant.

FieldTypeDescription
databytes16The 16-byte fixed data.

struct Array32Params

Parameters for the Array32 variant.

FieldTypeDescription
databytes32The 32-byte fixed data.

Enums

enum AssetInstanceVariant

Discriminant for the different types of AssetInstances in XCM v5.

VariantDescription
UndefinedUsed if the non-fungible asset class has only one instance.
IndexA compact index up to 2^128 - 1.
Array4A 4-byte fixed-length datum.
Array8An 8-byte fixed-length datum.
Array16A 16-byte fixed-length datum.
Array32A 32-byte fixed-length datum.

Top-Level Functions

  • function undefined() internal pure returns (struct AssetInstance)
    • Creates an Undefined asset instance.
  • function index(struct IndexParams params) internal pure returns (struct AssetInstance)
    • Creates an Index asset instance with the given index value.
  • function array4(struct Array4Params params) internal pure returns (struct AssetInstance)
    • Creates an Array4 asset instance with the given 4-byte data.
  • function array8(struct Array8Params params) internal pure returns (struct AssetInstance)
    • Creates an Array8 asset instance with the given 8-byte data.
  • function array16(struct Array16Params params) internal pure returns (struct AssetInstance)
    • Creates an Array16 asset instance with the given 16-byte data.
  • function array32(struct Array32Params params) internal pure returns (struct AssetInstance)
    • Creates an Array32 asset instance with the given 32-byte data.

Created with solidity-doc-generator