Appearance
Solidity API
IERC20Internal
This interface defines the core events that must be emitted by ERC20 implementations as specified in the EIP-20 standard. These events are crucial for tracking token movements and allowance changes on-chain.
Transfer
solidity
event Transfer(address from, address to, uint256 value)_Emitted when value tokens are moved from one account (from) to another (to). Note that value may be zero.
This event MUST be emitted when tokens are transferred, including:
- Regular transfers between accounts (via transfer or transferFrom)
- Minting of new tokens (transfer from zero address)
- Burning of tokens (transfer to zero address)_
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | The address tokens are transferred from (zero address for mints) |
| to | address | The address tokens are transferred to (zero address for burns) |
| value | uint256 | The amount of tokens transferred |
Approval
solidity
event Approval(address owner, address spender, uint256 value)_Emitted when the allowance of a spender for an owner is set by a call to {approve}. value is the new allowance.
This event MUST be emitted on any successful call to approve or similar functions that modify the allowance (e.g., increaseAllowance, decreaseAllowance). The event should be emitted even when the allowance is set to the same value._
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | The address that owns the tokens |
| spender | address | The address that is approved to spend the tokens |
| value | uint256 | The amount of tokens approved to be spent |