Metaverse Metaverse Gamefi Chain Game NFT Blind Box

Today, I will tell you about the development of NFT blind boxes.

First write an NFT contract, in which we can customize some attributes, such as: level, planting, grazing, aquaculture, mining, etc. Then inherit the NFT721 protocol, and the contract code is roughly as follows.

Call safeMint to create an NFT.

The second contract is the contract for opening the blind box. The source code is as follows.

 Here is a demo I made

Farm Lifehttp://106.52.21.244:8084/#/

Guess you like

Origin blog.csdn.net/yanning1314/article/details/123126546