Developing Contract Logic

Published by Marianne Poser on

Now the smart contract will be extended with logic and its own functions. The following scenario will serve as a small use case for this: The smart contract represents an (infinite) treasure chest that can be opened by users using keys. If it is opened, the user receives an NFT in return. To get the keys, a user must collect coins and exchange them for keys. This procedure can also be mapped directly in the same contract, thanks to the ERC1155 multi-token contract. How the user collects coins and how the NFTs are designed will not be considered here.

Categories: