The Token Listener interface allows contracts to "listen" to the complete token lifecycle of mint, transfer and burn. There are two functions that must be implemented:
The beforeTokenMint function must be called whenever a token is minted.
function beforeTokenMint(address to,uint256 amount,address controlledToken,address referrer) external;
The address that is receiving the newly minted tokens
The amount of new tokens
The token being minted
The address that referred the user (for rewards)
The beforeTokenTransfer function must be called whenever a token is transferred or burned.
function beforeTokenTransfer(address from,address to,uint256 amount,address controlledToken) external;
The address that is sending the tokens
The address that is receiving tokens. May be the zero address if burning.
The amount of tokens
The token being transferred