This document defines ERC20Mint Module for the CMTA Token specification.
[TOC]
Traditional securities could be issued in different ways. Bonds are usually issued all at once. Normal shares could be issued several times, when the issuer wants to raise more capital. ETF shares are continuously issued on demand. The Mint Module covers scenarios for CMTA Token specification when the issuer needs to create new tokens in response to securities issuances.
File Name | SHA-1 Hash |
---|---|
./modules/wrapper/core/ERC20MintModule.sol | 163107a3a34a1924a3c84b2d66149fed16ac9cc1 |
Contract | Type | Bases | ||
---|---|---|---|---|
└ | Function Name | Visibility | Mutability | Modifiers |
ERC20MintModule | Implementation | ERC20Upgradeable, AuthorizationModule | ||
└ | __ERC20MintModule_init_unchained | Internal 🔒 | 🛑 | onlyInitializing |
└ | mint | Public ❗️ | 🛑 | onlyRole |
└ | mintBatch | Public ❗️ | 🛑 | onlyRole |
Symbol | Meaning |
---|---|
🛑 | Function can modify state |
💵 | Function is payable |
This section describes the Ethereum API of Issue Module.
function mint(address account, uint256 value)
public onlyRole(MINTER_ROLE)
Creates a value
amount of tokens and assigns them to account
, by transferring it from address(0)
- Only authorized users (
MINTER_ROLE
) are allowed to call this function. account
cannot be the zero address (check made by _mint).
function mintBatch(address[] calldata accounts,uint256[] calldata values)
public onlyRole(MINTER_ROLE)
For each address in accounts
, create the corresponding amount of tokens given by amounts
and allocate them to the given addressto
.
Only authorized users (MINTER_ROLE
) are allowed to call this function
accounts
and values
must have the same length
accounts
cannot contain a zero address (check made by _mint).
event Mint(address indexed account, uint256 value)
Emitted when the specified value
amount of new tokens are created and
allocated to the specified account
.