GameFi
Ask or search…
K

Smart Contracts

Composition

There are 3 Smart Contracts in the whole interaction:

Items Contract.
This are the final NFT items a user has
Lootbox Contract.
This is a contract that creates the random unique for each NFT and gives the ability directly, with only 1 function call, to the owners to redeem the equivalent item after the block with specified block height is minted.
Lootbox Manager
Is a contract for managing who can mint and how many lootboxes.
Users should not be able to mint freely looboxes directly because that would abuse the system and would compromise the whole point of rarities.
The admin of the lootbox-manager facilitate the minting for selected addresses based on events he consider properly ( eg. addresses that whitelisted have 2 lootbox-mints or winner of a tournament gets 3 lootbox-mints )