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.
| Field | Type | Description |
|---|---|---|
variant | enum AssetInstanceVariant | The type of asset instance, determining how to interpret the payload. See `AssetInstanceVariant` enum for possible values. |
payload | bytes | The encoded payload containing the asset instance data, whose structure depends on the `variant`. |
struct IndexParams
Parameters for the Index variant.
| Field | Type | Description |
|---|---|---|
index | uint128 | The compact index value. |
struct Array4Params
Parameters for the Array4 variant.
| Field | Type | Description |
|---|---|---|
data | bytes4 | The 4-byte fixed data. |
struct Array8Params
Parameters for the Array8 variant.
| Field | Type | Description |
|---|---|---|
data | bytes8 | The 8-byte fixed data. |
struct Array16Params
Parameters for the Array16 variant.
| Field | Type | Description |
|---|---|---|
data | bytes16 | The 16-byte fixed data. |
struct Array32Params
Parameters for the Array32 variant.
| Field | Type | Description |
|---|---|---|
data | bytes32 | The 32-byte fixed data. |
Enums
enum AssetInstanceVariant
Discriminant for the different types of AssetInstances in XCM v5.
| Variant | Description |
|---|---|
Undefined | Used if the non-fungible asset class has only one instance. |
Index | A compact index up to 2^128 - 1. |
Array4 | A 4-byte fixed-length datum. |
Array8 | An 8-byte fixed-length datum. |
Array16 | A 16-byte fixed-length datum. |
Array32 | A 32-byte fixed-length datum. |
Top-Level Functions
function undefined() internal pure returns (struct AssetInstance)- Creates an
Undefinedasset instance.
- Creates an
function index(struct IndexParams params) internal pure returns (struct AssetInstance)- Creates an
Indexasset instance with the given index value.
- Creates an
function array4(struct Array4Params params) internal pure returns (struct AssetInstance)- Creates an
Array4asset instance with the given 4-byte data.
- Creates an
function array8(struct Array8Params params) internal pure returns (struct AssetInstance)- Creates an
Array8asset instance with the given 8-byte data.
- Creates an
function array16(struct Array16Params params) internal pure returns (struct AssetInstance)- Creates an
Array16asset instance with the given 16-byte data.
- Creates an
function array32(struct Array32Params params) internal pure returns (struct AssetInstance)- Creates an
Array32asset instance with the given 32-byte data.
- Creates an