File: src/Xcm/v5/Fungibility/Fungibility.sol
Fungibility
Kind: source
Structs
struct Fungibility
Classification of whether an asset is fungible or not, along with a mandatory amount or instance.
| Field | Type | Description |
|---|---|---|
variant | enum FungibilityVariant | The type of fungibility, determining how to interpret the payload. See `FungibilityVariant` enum for possible values. |
payload | bytes | The encoded payload containing the fungibility data, whose structure depends on the `variant`. |
struct FungibleParams
Parameters for the Fungible variant.
| Field | Type | Description |
|---|---|---|
amount | uint128 | The number of units of the fungible asset. |
struct NonFungibleParams
Parameters for the NonFungible variant.
| Field | Type | Description |
|---|---|---|
instance | struct AssetInstance | The specific non-fungible asset instance. |
Enums
enum FungibilityVariant
Discriminant for the different types of Fungibility in XCM v5.
| Variant | Description |
|---|---|
Fungible | A fungible asset; we record a number of units, as a `uint128` in the inner item. |
NonFungible | A non-fungible asset. We record the instance identifier in the inner item. Only one asset of each instance identifier may ever be in existence at once. |
Top-Level Functions
function fungible(struct FungibleParams params) internal pure returns (struct Fungibility)- Creates a
Fungibilitystruct representing a fungible asset with the given amount.
- Creates a
function nonFungible(struct NonFungibleParams params) internal pure returns (struct Fungibility)- Creates a
Fungibilitystruct representing a non-fungible asset with the given instance identifier.
- Creates a