Binance Smart Chain DAPP Dev Tutorial – Part III – How to create a BSC NFT Token

Binance Smart Chain DAPP Dev Tutorial - Part III - How to create a BSC NFT Token

This is a community contribution.

Step 1 Develop Environment Set up

Compile Contract

Open https://remix.ethereum.org

Delete the default files, and create a new file: NFT.sol

Copy the Token.sol code from below repo

https://github.com/mathwallet/BSC-Contracts/blob/main/Contracts/NFT.sol

You need to modify NFTToken code based on your needs

For example, you want to create a ColorNFT serie, and this NFT Token is named RED

BaseURI is the meta data of the NFT token, format can be reference is below:

http://developer.mathwallet.org/bsc/nfttest/#

This json need to return a image URL for the NFT, ex:

http://developer.mathwallet.org/bsc/nfttest/red.jpg

Any user should be able to visit this image URL so that it can be showed in wallet and NFT markets.

For compiler version, select 0.5.5

Deploy Contract

Config Contract

完成后在Bscscan上完成合约验证,具体步骤见 BSC开发入门(2)

After deployment, you need to verify the contract on Bscscan, steps can be found in tutorial 2

After verification, you need to use addMinter to add an address

Then this address will be able to call mint function to mint NFT to others

In the Bscscan contract URL, change contract to token, and you will able to review the detail NFT token information.

https://testnet.bscscan.com/token/0x

Submit Token

Now you can submit your NFT token to MathWallet so that more people can receive and transfer it

http://hk.mikecrm.com/diQs9M1