Skip to content

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.

FieldTypeDescription
variantenum FungibilityVariantThe type of fungibility, determining how to interpret the payload. See `FungibilityVariant` enum for possible values.
payloadbytesThe encoded payload containing the fungibility data, whose structure depends on the `variant`.

struct FungibleParams

Parameters for the Fungible variant.

FieldTypeDescription
amountuint128The number of units of the fungible asset.

struct NonFungibleParams

Parameters for the NonFungible variant.

FieldTypeDescription
instancestruct AssetInstanceThe specific non-fungible asset instance.

Enums

enum FungibilityVariant

Discriminant for the different types of Fungibility in XCM v5.

VariantDescription
FungibleA fungible asset; we record a number of units, as a `uint128` in the inner item.
NonFungibleA 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 Fungibility struct representing a fungible asset with the given amount.
  • function nonFungible(struct NonFungibleParams params) internal pure returns (struct Fungibility)
    • Creates a Fungibility struct representing a non-fungible asset with the given instance identifier.

Created with solidity-doc-generator