Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition Info NFTS Pallet #4476

Merged
merged 18 commits into from
Feb 15, 2023
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion docs/learn/learn-nft-pallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ NFT-related actions within their dApp.

## NFTs Pallet

:::info For Developers Only

The information presented here below is for developers. A user-friendly portal for NFTs, DEX and
Assets is under construction.

:::

NFTs is a [FRAME pallet](https://polkadot.js.org/docs/substrate/extrinsics#nfts) currently deployed
on Westmint, which provides a multitude of functions to interact with NFTs.

Expand Down Expand Up @@ -40,7 +47,7 @@ specifying different settings:

:::info

Note that currently Polkadot-JS does not support bitflags. Leave the settings field as it is.
Note that currently, Polkadot-JS UI does not support bitflags. Leave the settings field as it is.
Everything is unlocked by default (bitflag value `0`).

:::
Expand Down Expand Up @@ -117,6 +124,38 @@ You can mint an NFT using the `nfts.mint` extrinsic. You must then specify the f

Creating an item usually involves setting some attributes specific to that item.

### Uploading Files and Metadata

When you have a collection ID and an item ID you need to upload
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

- Open an account on [Pinata](https://www.pinata.cloud/).
- Follow
[these steps](https://docs.pinata.cloud/what-can-i-learn-here/pinning-your-first-file-with-pinata)
to upload the file you want to mint.
- After uploading your file, get the Content Identifier (CID). This is a unique string of letters
and numbers proving that the NFT is yours.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
- Prepare the metadata file and add your CID (see below):

```
{
"name":"Your Collection Name",
"description":"Collection's Description",
"image":"Your Collection CID"
}
```

- Upload the metadata file to Pinata and get the updated CID.
- You can add the CID when minting your NFT on the Polkadot-JS UI. Go to Developer > Extrinsics and
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
select the `nfts.setCollectionMetadata` (for collections) or `nfts.setMetadata` (for single NFTs)
extrinsic. Under the `data: Bytes` field you can enter the CID or upload the metadata file.

:::info NFT/DEX/Asset Portal

With the new NFT/DEX/Asset portal, all the above steps will be executed "under-the-hood" and the
user will not have to worry about all technicalities.

filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
:::

### Other Actions

- Buying an item up for sale.
Expand Down Expand Up @@ -150,9 +189,18 @@ Creating an item usually involves setting some attributes specific to that item.
- Take ownership of an NFT from the [pallet-nfts](#nfts-pallet)
- Create a new asset in [pallet-assets](https://polkadot.js.org/docs/substrate/extrinsics#assets)
- Mint the input amount to the previous owner of the NFT as the beneficiary
- Mass minting: Minting multiple items in one single transaction. Ths will require the user to
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
provide a .csv file with two columns: NFT ID and CID if metadata.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

## Uniques Pallet

:::info

The Uniques Pallet is being decommissioned. Everything related to NFTs will be covered by the the
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
[NFTs Pallet](#nfts-pallet).

:::

Uniques is a [FRAME pallet](https://github.com/paritytech/substrate/tree/master/frame/uniques)
deployed on the Statemint and Statemine system parachains. It implements the most basic kind of NFT
-- a data record referencing some metadata. This metadata reference is mutable until frozen, so NFTs
Expand Down