Hello,
Unfortunately I didn’t find a similar question.
I’m following the Ethereum Game developement course and in the beginning the instructor said that we will get the MINT function production ready and secure, because it’s open to any one how wants to MINT. However I could not find it by the end of the course. Do you know how we can secure the mint function so only a person who really won the token get it. I know we can add Minter Role and only minter can Mint but that would not be the correct solution. Do you know how we can the MINT function production ready ? maybe in solidy or in a custom backend ? thanks !
PS: I just found this Discussion: How to mint GameToken the "proper" way but is a mapping really secure ? because anyone can have access to the mapping function because it’s be external without any role requirement ! So someone can add himself as player and then mint my token. am I wrong ?
When I read for exemple axie infinity mint function:
contract ERC20Mintable is HasMinters, ERC20 {
function mint(address _to, uint256 _value) public onlyMinter returns (bool _success) {
return _mint(_to, _value);
}
there’s onlyMinter role. But how can we manage this in the game ?