I want a mint function but instead of _mint(to, amount) i want _mint(msg.sender, amount) how can i do it??
1 Answer
You can try this:
function mint(uint256 _amount) public {
//Now you call the internal mint function from your ERC20 token
//You can find more about it here
//https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
_mint(msg.sender, _amount);
}
function _mint(uint amount) public { _mint(msg.sender, amount; }
, or so