View Categories

ERC721

11 articles

Can I add multiple files in one NFT?

Last Updated: July 31, 2023

No, you can’t. You cannot add more than one file in one NFT under the public or private category. If you need to do so, you need to upload multiple files and duplicate the same wallet address on a list when minting as shown below. This will create multiple unique NFTs with different token IDs and all are assigned to the same wallet. 0x8d0CE07483596c76e0C8bB17Eb32e7dA7e3d270c 0x8d0CE07483596c76e0C8bB17Eb32e7dA7e3d270c 0x8d0CE07483596c76e0C8bB17Eb32e7dA7e3d270c 0x8d0CE07483596c76e0C8bB17Eb32e7dA7e3d270c 0x8d0CE07483596c76e0C8bB17Eb32e7dA7e3d270c

What’s the difference between public and private category?

Last Updated: July 31, 2023

Public category is for creating NFTs or SBTs containing files that are visible publicly on the blockchain. Private category only stores the file hash string (such as 4669105d5a7440f09650d63986ccc1161efab6a252a1e5e5ddbb425410252564) in the NFT. Typically, you’d always use the public category. You would only use the private category when you need to notarize a personal file that you do not which the public to access. Thus, the file hash acts as proof of your file’s existence by carrying its hash string on the blockchain.

Can I mint more than one NFT at once?

Last Updated: July 31, 2023

Yes, certainly. You can mint many ERC721 NFTs or SBTs for many wallets under one blockchain transaction. You need to provide the same amount of files and wallet addresses. Each file will be stored in one NFT with a unique token ID for each wallet. The files are stored on IPFS decentralized data storage network. The order shall be the first file selected and uploaded will be saved in the first NFT for the first wallet on the list. For example, if you selected file1.png to be the first to be uploaded and the wallet 0x8d0CE07483596c76e0C8bB17Eb32e7dA7e3d270c is the first on your list of addresses, then this wallet will own the NFT containing the file fiel1.png and the token ID shall be 0. Do note that you can’t create multiple NFTs for one single wallet at once. This applies to public and private NFTs.  

I’m getting rate limit error when uploading my NFT files

Last Updated: July 31, 2023

Because we use nft.storage to store your NFT files on IPFS, there’s a limit on how many files you can upload at once. Currently, the rate limit will be triggered if the nft.storage API receives more than 30 requests using the same API key within a 10-second window. What you can do is reduce the number of NFTs you wish to mint at once which in effect will reduce the number of files being uploaded to nft.storage at once.

How to view my file hash on blockchain after minting?

Last Updated: August 1, 2023

You can view your file hash string by checking the token URI of your NFT under your manage ERC721 token page. Please see below.

How do I get the token ID of NFT after minting?

Last Updated: July 31, 2023

The token IDs are displayed under your manage ERC721 token page. You also get to view which wallet owns which token ID via the buttons on the right as depicted below in red boxes.

Is the file hash stored on IPFS or the block itself?

Last Updated: August 1, 2023

The file hash string is stored in the block itself on the blockchain, not on IPFS. You may view the file hash by accessing your token on the ERC721 token management page and clicking on the “check token URI” button.

How do I mint an ERC721 soulbound token (SBT)

Last Updated: August 1, 2023

To mint a single ERC721 soulbound token (SBT), you may follow this video tutorial below.

How to mint one ERC721 NFT for multiple wallets?

Last Updated: August 1, 2023

The video tutorial below demonstrates how you can create NFTs that have similar content for multiple wallet addresses. Each NFT still uses a unique token ID and is owned by an individual wallet. Although the video uses soulbound tokens, the steps are all similar for NFT except that you need to pick an ERC721 NFT smart contract when deploying instead of an SBT contract.  

How to mint multiple unique NFTs for different wallets?

Last Updated: August 1, 2023

To bulk mint multiple NFTs for different wallet addresses where each NFT contains unique content, please follow the video tutorial below.

How to get or grant roles in OpenZeppelin Solidity contract code with access control?

Last Updated: August 6, 2023

If you’re using OpenZeppelin smart contract code with access control, you will encounter a function called grantRole (see red box) depicted below on Remix on how to assign a role to a wallet address. The question you might ask is what should I fill in the role parameter. You actually have to fill in the role such as MINTER_ROLE to assign the minting privilege to an address, or DEFAULT_ADMIN_ROLE to assign a wallet to be the admin of the contract. But the parameter only accepts bytes32 input. Thus, to obtain the bytes32 data, scroll down on the list of functions you have and find the variable MINTER_ROLE or DEFAULT_ADMIN_ROLE and click on them, as shown below, in red boxes. And you will get the bytes32 version such as 0x0000000000000000000000000000000000000000000000000000000000000000 for DEFAULT_ADMIN_ROLE and 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6 for MINTER_ROLE. You then just have to copy these data types and paste them on the role parameter in the grantRole function and also include a wallet address. Then, hit the call button.