State Variables
TOKEN_ADMIN_ROLE
handlerAddress
Functions
constructor
Constructor sets params| Name | Type | Description |
|---|---|---|
_name | string | Name of the token |
_symbol | string | Symbol of the token |
_tokenAdmin | address | Token Admin address |
mint
Function mints new tokens.| Name | Type | Description |
|---|---|---|
to | address | recipient address |
amount | uint256 | number of tokens to mint |
transfer
TRANSFER FUNCTION GROUP START *This is overridden from IERC20-transfer. It handles all fees/discounts and then uses ERC20 _transfer to do the actual transfers Requirements:tocannot be the zero address.- the caller must have a balance of at least
amount.*
transferFrom
*This is overridden from IERC20-transferFrom. It handles all fees/discounts and then uses ERC20 _transfer to do the actual transfers Emits an event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of . NOTE: Does not update the allowance if the current allowance is the maximumuint256.
Requirements:
fromandtocannot be the zero address.frommust have a balance of at leastamount.- the caller must have allowance for
from’s tokens of at leastamount.*
_handleFees
This transfers all the P2P transfer fees to the individual fee sinks| Name | Type | Description |
|---|---|---|
from | address | sender address |
amount | uint256 | number of tokens being transferred |
_beforeTokenTransfer
TRANSFER FUNCTION GROUP END Function called before any token transfers to confirm transfer is within rules of the protocol| Name | Type | Description |
|---|---|---|
from | address | sender address |
to | address | recipient address |
amount | uint256 | number of tokens to be transferred |
getHandlerAddress
Rule Processor Module Check This function returns the handler address| Name | Type | Description |
|---|---|---|
<none> | address | handlerAddress |
connectHandlerToToken
This function does not check for zero address. Zero address is a valid address for this function’s purpose. Function to connect Token to previously deployed Handler contract| Name | Type | Description |
|---|---|---|
_deployedHandlerAddress | address | address of the currently deployed Handler Address |