Skip to main content

Calls

burn

Burn a token 🔥 Caller must be the token owner Namespace
Type

claimUnownedCollection

Bridged collections from Ethereum will initially lack an owner. These collections will be assigned to the pallet. This allows for claiming those collections assuming they were assigned to the pallet Namespace
Type

createCollection

Create a new collection Additional tokens can be minted via mint
  • name - the name of the collection
  • initial_issuance - number of tokens to mint now
  • max_issuance - maximum number of tokens allowed in collection
  • token_owner - the token owner, defaults to the caller
  • metadata_scheme - The off-chain metadata referencing scheme for tokens in this
  • royalties_schedule - defacto royalties plan for secondary sales, this will apply to all tokens in the collection by default
  • cross_chain_compatibility - Is this collection XLS-20 compatible. Note, if enabled, the metadata_scheme will be immutable
Namespace
Type

mint

Mint tokens for an existing collection
  • collection_id - the collection to mint tokens in
  • quantity - how many tokens to mint
  • token_owner - the token owner, defaults to the caller if unspecified Caller must be the collection owner
Namespace
Type

setBaseUri

Set the base URI of a collection Caller must be the current collection owner.\ Cannot change if XLS20 compatibility is enabled. Namespace
Type

setMaxIssuance

Set the max issuance of a collection Caller must be the current collection owner Namespace
Type

setMintFee

Namespace
Type

setName

Set the name of a collection Caller must be the current collection owner Namespace
Type

setOwner

Set the owner of a collection Caller must be the current collection owner Namespace
Type

setRoyaltiesSchedule

Set the royalties schedule of a collection Caller must be the current collection owner Namespace
Type

togglePublicMint

Namespace
Type

transfer

Transfer ownership of an NFT Caller must be the token owner Namespace
Type

setUtilityFlags

Set utility flags of a collection. Allows the restriction of certain operations on a collection such as transfer, burn or mint. Flags apply to all tokens in the collection, but individual token flags take priority over collection flags.
  • collection_id - The collection to set the utility flags for
  • utility_flags - An object containing the utility flags.
Namespace
Type

setTokenTransferableFlag

Set transferable flag on a token, allowing or disallowing transfers. Token utility flags take priority over the collection utility flags, enabling fine-grained control over individual token transferability. Priority Order:
  1. Token-level flags (highest priority)
  2. Collection-level flags (fallback)
  • token_id - The token id (collection_id, serial_number) to set the flags for
  • transferable - Whether the token should be transferable
Note: Soulbound tokens cannot have their utility flags modified after issuance. Namespace
Type

issueSoulbound

Issue soulbound tokens. The issuance will be pending until the designated token owner accepts the issuance. Soulbound tokens will always be non-transferable.
  • collection_id - The collection id to create the issuance for
  • quantity - The number of tokens to issue
  • token_owner - Account id of the token owner
  • burn_authority - The token burn authority. This value will dictate which account is allowed to burn the token, and cannot be altered post-issuance.
Namespace
Type

acceptSoulboundIssuance

Accept the issuance of a soulbound token
  • collection_id - The collection id the issuance is for
  • issuance_id - The issuance id. An issuance id is created and emitted when a soulbound token is issued. All pending issuances for an account can be retrieved by querying the collection’s pending issuances.
Namespace
Type

setAdditionalData

Sets additional data for a token. This allows storing extra information for a token outside the collection metadata.
  • token_id - The token id (collection_id, serial_number) to set data for
  • additional_data - Optional additional data. Pass None to remove existing data
Namespace
Type

mintWithAdditionalData

Mint a single token alongside some additional data. This is equivalent to calling mint followed by setAdditionalData, but more efficient.
  • collection_id - The collection to mint the token in
  • token_owner - The token owner, defaults to the caller if unspecified
  • additional_data - Additional data to store with the token
Namespace
Type

Storage

collectionInfo

Map from collection to its information Namespace
Type

tokenInfo

Map from a token to its information, including owner, lock status and utility flags Namespace
Type

ownedTokens

All tokens owned by a single account, organized by collection Namespace
Type

nextCollectionId

The next available incrementing collection id Namespace
Type

publicMintInfo

Map from collection to its public minting information Namespace
Type

utilityFlags

Map from a collection id to its utility flags. These flags control operations at the collection level and apply to all tokens unless overridden by token-specific flags. Namespace
Type

additionalTokenData

Map from a token_id to additional token data. Useful for assigning extra information to a token outside the collection metadata. Namespace
Type

tokenUtilityFlags

Map from a token id to its utility flags. Token-level flags take priority over collection-level flags, allowing fine-grained control over individual tokens. Namespace
Type

pendingIssuances

Map from a collection id to the collection’s pending issuances Namespace
Type
Can be used to retrieve pending issuances for a particular account.

Events

BaseUriSet

Base URI was set Namespace
Type

BridgedMint

Token(s) were bridged Namespace
Type

Burn

A token was burned Namespace
Type

CollectionClaimed

Collection has been claimed Namespace
Type

CollectionCreate

A new collection of tokens was created Namespace
Type

MaxIssuanceSet

Max issuance was set Namespace
Type

Mint

Token(s) were minted Namespace
Type

MintFeePaid

Payment was made to cover a public mint Namespace
Type

MintPriceSet

A mint price was set for a collection Namespace
Type

NameSet

Name was set Namespace
Type

OwnerSet

A new owner was set Namespace
Type

PublicMintToggle

Public minting was enabled/disabled for a collection Namespace
Type

RoyaltiesScheduleSet

Royalties schedule was set Namespace
Type

Transfer

A token was transferred Namespace
Type

UtilityFlagsSet

Utility flags were set for a collection Namespace
Type

TokenTransferableFlagSet

Token transferable flag was set Namespace
Type

PendingIssuanceCreated

A pending issuance for a soulbound token was created Namespace
Type

Issued

Soulbound tokens were successfully issued Namespace
Type

AdditionalDataSet

Some additional data has been set for a token Namespace
Type

Errors

AttemptedMintOnBridgedToken

Attemped to mint a token that was bridged from a different chain Namespace

BlockedMint

Token(s) blocked from minting during the bridging process Namespace

CannotClaimNonClaimableCollections

Cannot claim already claimed collections Namespace

CannotUpdateMetadata

Only Root originated NFTs that are not XLS-20 compatible can have their metadata updated Namespace

CollectionIssuanceNotZero

Total issuance of collection must be zero to add xls20 compatibility Namespace

MintUtilityBlocked

Minting has been disabled for tokens within this collection Namespace

CollectionNameInvalid

Given collection name is invalid (invalid utf-8, too long, empty) Namespace

InitialIssuanceNotZero

Initial issuance on XLS-20 compatible collections must be zero Namespace

InvalidMaxIssuance

Max issuance needs to be greater than 0 and initial_issuance Cannot exceed MaxTokensPerCollection Namespace

InvalidMetadataPath

The metadata path is invalid (non-utf8 or empty) Namespace

InvalidNewOwner

The caller can not be the new owner Namespace

InvalidAdditionalData

The additional data cannot be an empty vec Namespace

MaxIssuanceAlreadySet

The max issuance has already been set and can’t be changed Namespace

MaxIssuanceReached

The collection max issuance has been reached and no more tokens can be minted Namespace

MintLimitExceeded

The quantity exceeds the max tokens per mint limit Namespace

NoAvailableIds

No more Ids are available, they’ve been exhausted Namespace

NoCollectionFound

The collection does not exist Namespace

NotCollectionOwner

Origin is not the collection owner and is not permitted to perform the operation Namespace

NoToken

The token does not exist Namespace

NotTokenOwner

Origin does not own the NFT Namespace

PublicMintDisabled

This collection has not allowed public minting Namespace

RoyaltiesInvalid

Total royalties would exceed 100% of sale or an empty vec is supplied Namespace

TokenLimitExceeded

The number of tokens have exceeded the max tokens allowed Namespace

TokenLocked

Cannot operate on a listed NFT Namespace

TransferUtilityBlocked

Transfer has been disabled for tokens within this collection Namespace

BurnUtilityBlocked

Burning has been disabled for tokens within this collection Namespace

PendingIssuanceLimitExceeded

The number of pending issuances has exceeded the max for a collection Namespace

InvalidPendingIssuance

Attempted to accept an issuance that does not exist, or is not set for the caller Namespace

CannotUpdateTokenUtility

Attempted to update the token utility flags for a soulbound token Namespace

InvalidBurnAuthority

Attempted to burn a token from an account that does not adhere to the token’s burn authority Namespace

SerialNumbersNotUnique

The SerialNumbers attempting to be transferred are not unique Namespace

Constants

palletId

This pallet’s Id, used for deriving a sovereign account ID Namespace
Type

stringLimit

The maximum length of a collection name, stored on-chain Namespace
Type

JSON-RPC Methods

ownedTokens

Get all NFTs owned by an account Interface
JSON

tokenUri

Get the URI of a token Interface
JSON

collectionDetails

Get information related to a collection such as name, owner and max issuance Interface
JSON