Sft
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
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
transfer
Transfer ownership of an SFT Caller must be the token owner
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
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
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
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
Last updated