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.
_decimals
The number of decimals of the token.
Functions
onlyMinter
Modifier to guarantee the caller is a minter.
constructor
decimals
setMinter
Sets the minting rights of an address.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the minter. |
|
| If the address is allowed to mint or not. |
mint
Mints new tokens.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the recipient. |
|
| The amount of tokens to mint. |
burn
Burns tokens.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the owner or approved address. |
|
| The amount of tokens to burn. |
_setMinter
Sets the minting rights of an address.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the minter. |
|
| If the address is allowed to mint or not. |
Last updated