I'm studying how to create a currency to use in my game, however, I'm having some doubts (well beginners can say).
And I would like help if possible to accomplish this.
My question is the following, I need to create a coin (token) that will have no limits, and will also have the burn option.
- The question is what would an example of a smart contract with these resources be like?
- Second doubt, security issues such as mining? For example, during the matches that my game will have, the player will win my "token" virtually, however, at some point he will want to convert the virtual token to a digital wallet, at that point the mining starts, right? What would the contract be like for this situation?
I'm with these doubts that are killing me, hahahah I would be very grateful if someone could help me and if you have tutorials to indicate I will be very grateful.
No more thanks in advance, and excellent OpenZeppelin lib.
Regarding your first bullet point, have you checked out the OpenZeppelin token wizard yet? Its a good place to start with making a new token contract (NFTs and ERC20).
Thanks, the token wizard helped me to have a north, however I still have the second question, do you have any idea where I can go?
It depends. Is it a fixed amount of tokens?
In some contracts, there is a fixed amount of tokens, and you would just make a transaction to transfer a token from the wallet_with_the_tokens to the players_wallet, when they win.
If your contract is mintable. The adress/wallet with the MINTER_ROLE can mint tokens (create tokens) , and send them to the player wallets.
look up OpenZeppelin's wizzard, and try starting with an ERC20 mintable burnable token contract. Or maybe a contract for NFT's.
This video helped me understand interactions with the blockchain. https://youtu.be/M576WGiDBdQ
Lesson:4 or Lesson:5 in the video.
and OpenZeppelins's contract libraries and youtube channel are some of the best resources I have found yet.
Beginner here to. Hope It helps
I superficially understood this part of coining, I still have a lot of doubts about how it works and it ends up blocking me... hahaha
I used the suggestion and used the Token Wizard, very practical.
This token of mine will have no limits (it will be the same as the axie's SLP).
My idea is that it will have a Supply at the beginning, but during the game players will gain the virtual currency (off-chain) and once a month I will release the option for them to convert (coin) the currency.
I will be taking a look at the video, again thanks for the help.
The tokenOpenZeppelin wizard is great. The big problem is that it has no forecast for cases of tokens that are sent to the contract. This is a serious design flaw and considered a bug.
Leading OZ developers need to fix this. Think of the amount of values trapped in the thousands of contracts implemented with these codes!