Skip to main content

Calls

burn

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

createCollection

Create a new collection to group multiple semi-fungible tokens Tokens can be created within the collection by calling create_token collection_name - the name of the collection collection_owner - the collection 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. The collectionUuid used to store the SFT CollectionInfo is retrieved from the NFT pallet. This is so that CollectionUuids are unique across all collections, regardless of if they are SFT or NFT collections. Namespace
Type

createToken

Create additional tokens for an existing collection These tokens act similar to tokens within an ERC1155 contract Each token has individual issuance, max_issuance, Namespace
Type

createTokenWithAdditionalData

Create additional tokens for an existing collection with additional data. These tokens act similar to tokens within an ERC1155 contract. Each token has individual issuance, max_issuance, and additional data. Namespace
Type

mint

Mints some balances into some serial numbers for an account This acts as a batch mint function and allows for multiple serial numbers and quantities to be passed in simultaneously. Must be called by the collection owner collection_id - the SFT collection to mint into serial_numbers - A list of serial numbers to mint into quantities - A list of quantities to mint into each serial number token_owner - The owner of the tokens, defaults to the caller Namespace
Type

setBaseUri

Set the base URI of a collection (MetadataScheme) Caller must be the current collection owner 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

setTokenName

Namespace
Type

transfer

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

setUtilityFlags

Set utility flags of a collection. This allows restricting certain operations on a collection such as transfer, burn or mint. Caller must be the collection owner.
  • collection_id - The id of the collection
  • utility_flags - An object containing the utility flags.
Namespace
Type

setTokenTransferableFlag

Set transferable flag on a token, allowing or disallowing transfers. Caller must be the collection owner. Namespace
Type

setTokenBurnAuthority

Set burn authority on a token. This value will be immutable once set. Caller must be the collection owner.
  • token_id -. The token id
  • burn_authority - The token burn authority. This value will dictate which account is allowed to burn the token.
Namespace api.tx.sft.setTokenBurnAuthority Type

setAdditionalData

Set additional data for a token. This allows collection owners or token owners to store custom data associated with specific tokens.
  • token_id - The token id to set additional data for
  • additional_data - Custom data to associate with the token
Namespace
Type

burnAsCollectionOwner

Burn a token as the collection owner. The burn authority must have already been set and set to either the collection owner or both.
  • token_owner - The account id of the token owner
  • collection_id - The collection id
  • serial_numbers - Array of serial number and the amount of tokens to burn
Namespace
Type

issueSoulbound

Issue soulbound tokens. The issuance will be pending until the token owner accepts the issuance. The burn authority for the specified tokens must already have been set prior to attempting to issue the tokens.
  • token_owner - Account id of the token owner. The tokens will be burned for this account.
  • collection_id - The collection id to issue the tokens for
  • serial_numbers - List of token ids and the amount to issue
Namespace
Type

acceptSoulboundIssuance

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

Storage

publicMintInfo

Map from collection to its public minting information Namespace
Type

sftCollectionInfo

Map from collection to its information Namespace
Type

tokenInfo

Map from token to its token information, including ownership information Namespace
Type

utilityFlags

Map from a collection id to it’s utility flags Namespace
Type

tokenUtilityFlags

Map from a token id to its utility flags Namespace
Type

additionalData

Map from a token id to its additional data 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

Burn

A token was burned 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

TokenCreate

A new token was created within a collection 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

AdditionalDataSet

Additional data was set for a token Namespace
Type

PendingIssuanceCreated

A pending issuance for a soulbound token has been created Namespace
Type

Issued

Soulbound tokens were successfully issued Namespace
Type

Errors

InsufficientBalance

The user does not own enough of this token to perform the operation Namespace

InvalidMaxIssuance

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

InvalidNewOwner

Caller can not be the new owner Namespace

InvalidQuantity

The specified quantity must be greater than 0 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

MaxOwnersReached

The max amount of owners per token has been reached Namespace

NameInvalid

Given collection or token name is invalid (invalid utf-8, empty) 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

Overflow

The operation would cause a numeric overflow 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

InvalidAdditionalData

The additional data provided is invalid or exceeds the maximum allowed size Namespace

Constants

maxOwnersPerSftToken

Max unique owners that can own an SFT token Namespace
Type

maxSerialsPerMint

Max tokens that can be minted in one transaction Namespace
Type

maxTokensPerSftCollection

Max tokens that a collection can contain Namespace
Type

palletId

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

stringLimit

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