ERC20Issuance_v1.sol
Inherits: IERC20Issuance_v1, ERC20Capped, Ownable
Author: Inverter Network
This contract creates an {ERC20Capped} token with a supply cap and a whitelist-gated functionality to mint and burn tokens.
The contract implements functionalities for:
Managing a whitelist of allowed minters.
Minting and burning tokens by members of said whitelist.
Enforcing a supply cap on minted tokens.
State Variables
allowedMinters
The mapping of allowed minters.
mapping(address => bool) public allowedMinters;_decimals
The number of decimals of the token.
uint8 internal immutable _decimals;Functions
onlyMinter
Modifier to guarantee the caller is a minter.
constructor
decimals
setMinter
Sets the minting rights of an address.
Parameters
_minter
address
The address of the minter.
_allowed
bool
If the address is allowed to mint or not.
mint
Mints new tokens.
Parameters
_to
address
The address of the recipient.
_amount
uint256
The amount of tokens to mint.
burn
Burns tokens.
Parameters
_from
address
The address of the owner or approved address.
_amount
uint256
The amount of tokens to burn.
_setMinter
Sets the minting rights of an address.
Parameters
_minter
address
The address of the minter.
_allowed
bool
If the address is allowed to mint or not.
Last updated