State Variables
TOKEN_ADMIN_ROLE
handlerAddress
Functions
constructor
Constructor sets paramsName | 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:to
cannot 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:
from
andto
cannot be the zero address.from
must 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 sinksName | 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 protocolName | 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 addressName | 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 contractName | Type | Description |
---|---|---|
_deployedHandlerAddress | address | address of the currently deployed Handler Address |