Mystery Box System
Mystery box mechanism is creative gameplay that users are willing to pay at a fixed price and obtain random content from the surprise box in the form of NFT. When the user opens the mystery box, the contract will trigger the burn function to burn the corresponding mystery box of this holder. At the same time, it will trigger the mint method written in the contract to mint a randomized NFT to this holder under the certain probability set ahead.
The random function assigns an integer to each result starting from 1. When the user opens a mystery box, the contract will randomly generate a number. This number corresponds to the result of the mystery box.
Last updated