Crates.io | pallet-nfts |
lib.rs | pallet-nfts |
version | 32.0.0 |
source | src |
created_at | 2022-12-23 13:10:02.562411 |
updated_at | 2024-09-26 06:47:11.966136 |
description | FRAME NFTs pallet |
homepage | https://paritytech.github.io/polkadot-sdk/ |
repository | https://github.com/paritytech/polkadot-sdk.git |
max_upload_size | |
id | 744527 |
size | 437,190 |
A pallet for dealing with non-fungible assets.
The NFTs pallet provides functionality for non-fungible tokens' management, including:
To use it in your runtime, you need to implement
nfts::Config
.
The supported dispatchable functions are documented in the
nfts::Call
enum.
The NFTs pallet in Substrate is designed to make the following possible:
create
: Create a new collection by placing a deposit.
mint
: Mint a new item within a collection (when the minting is public).
transfer
: Send an item to a new owner.
redeposit
: Update the deposit amount of an item, potentially freeing funds.
approve_transfer
: Name a delegate who may authorize a transfer.
cancel_approval
: Revert the effects of a previous approve_transfer
.
approve_item_attributes
: Name a delegate who may change item's attributes within a namespace.
cancel_item_attributes_approval
: Revert the effects of a previous approve_item_attributes
.
set_price
: Set the price for an item.
buy_item
: Buy an item.
pay_tips
: Pay tips, could be used for paying the creator royalties.
create_swap
: Create an offer to swap an NFT for another NFT and optionally some fungibles.
cancel_swap
: Cancel previously created swap offer.
claim_swap
: Swap items in an atomic way.
destroy
: Destroy a collection. This destroys all the items inside the collection and refunds the deposit.
force_mint
: Mint a new item within a collection.
burn
: Destroy an item within a collection.
lock_item_transfer
: Prevent an individual item from being transferred.
unlock_item_transfer
: Revert the effects of a previous lock_item_transfer
.
clear_all_transfer_approvals
: Clears all transfer approvals set by calling the approve_transfer
.
lock_collection
: Prevent all items within a collection from being transferred (making them all soul bound
).
lock_item_properties
: Lock item's metadata or attributes.
transfer_ownership
: Alter the owner of a collection, moving all associated deposits. (Ownership of individual items
will not be affected.)
set_team
: Alter the permissioned accounts of a collection.
set_collection_max_supply
: Change the max supply of a collection.
update_mint_settings
: Update the minting settings for collection.
set_attribute
: Set a metadata attribute of an item or collection.
clear_attribute
: Remove a metadata attribute of an item or collection.
set_metadata
: Set general metadata of an item (E.g. an IPFS address of an image url).
clear_metadata
: Remove general metadata of an item.
set_collection_metadata
: Set general metadata of a collection.
clear_collection_metadata
: Remove general metadata of a collection.
force_create
: Create a new collection (the collection id can not be chosen).force_collection_owner
: Change collection's owner.force_collection_config
: Change collection's config.force_set_attribute
: Set an attribute.Please refer to the Call
enum and
its associated variants for documentation on each function.
License: Apache-2.0
Polkadot SDK stable2409