Hi Team,
Newbie question here. I am working with an ERC20 contract, it is burnable and it is pre-minted. In my contract the _min() function is only called once by the Constructor. If this is my use case and I don't want any more tokens minted ever, Do I really need a Cap?
My question is do I need to use ERC20Capped.sol since mint is not exposed in my contract and there is no other way to call it?
Code to reproduce
Here is my contract as is...
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.11;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
contract myToken is ERC20, ERC20Burnable {
constructor(uint256 initialSupply) ERC20("myToken", "MYT") {
_mint(msg.sender, initialSupply);
}
}
Environment
Using Truffle on VS CODE compiling with Solidity 0.8.11