Adding Token to an inflationary Smart Contract

Hello everyone. I have created a token with the following function:

function mint(uint256 amount) public onlyOwner returns (bool) {
_mint(_msgSender(), amount);

I am wondering how I can mint more tokens without creating a new smart contract.

By the way, how can I add address to be in the Minter role?

The owner of the contract (initially set to the account that deployed it) will be able to call the mint function.

Please read the documentation for AccessControl.

1 Like