Skip to content
solidity
import "solidity-scale-codec/src/Xcm/v5/AssetInstance/AssetInstance.sol";

File-Level Functions

undefined()

solidity
function undefined() internal pure returns (struct AssetInstance)

Creates an `Undefined` asset instance.

index(struct IndexParams params)

solidity
function index(struct IndexParams params) internal pure returns (struct AssetInstance)

Creates an `Index` asset instance with the given index value.

array4(struct Array4Params params)

solidity
function array4(struct Array4Params params) internal pure returns (struct AssetInstance)

Creates an `Array4` asset instance with the given 4-byte data.

array8(struct Array8Params params)

solidity
function array8(struct Array8Params params) internal pure returns (struct AssetInstance)

Creates an `Array8` asset instance with the given 8-byte data.

array16(struct Array16Params params)

solidity
function array16(struct Array16Params params) internal pure returns (struct AssetInstance)

Creates an `Array16` asset instance with the given 16-byte data.

array32(struct Array32Params params)

solidity
function array32(struct Array32Params params) internal pure returns (struct AssetInstance)

Creates an `Array32` asset instance with the given 32-byte data.

File-Level Structs

AssetInstance

solidity
struct AssetInstance

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

FieldTypeDescription
variantAssetInstanceVariantThe 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`.

IndexParams

solidity
struct IndexParams

Parameters for the `Index` variant.

FieldTypeDescription
indexuint128The compact index value.

Array4Params

solidity
struct Array4Params

Parameters for the `Array4` variant.

FieldTypeDescription
databytes4The 4-byte fixed data.

Array8Params

solidity
struct Array8Params

Parameters for the `Array8` variant.

FieldTypeDescription
databytes8The 8-byte fixed data.

Array16Params

solidity
struct Array16Params

Parameters for the `Array16` variant.

FieldTypeDescription
databytes16The 16-byte fixed data.

Array32Params

solidity
struct Array32Params

Parameters for the `Array32` variant.

FieldTypeDescription
databytes32The 32-byte fixed data.

File-Level Enums

AssetInstanceVariant

solidity
enum AssetInstanceVariant
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.

AssetInstance

Kind: source