Appearance
Solidity API
ERC20Extended
This contract inherits from:
- IERC20Extended: Interface defining the extended approval functions
- ERC20ExtendedInternal: Internal implementation of the extended functions
Implements safe approval extensions for the ERC20 standard This contract provides enhanced approval functionality to mitigate the transaction-ordering vulnerability in the standard ERC20 approve method (see https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729)
increaseAllowance
solidity
function increaseAllowance(address spender, uint256 amount) external returns (bool)Increase the allowance granted to a spender
_External wrapper for increaseAllowance internal function Allows users to increase the amount a spender is allowed to transfer on their behalf without having to set the allowance to zero first
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | Address to be granted increased spending rights |
| amount | uint256 | The additional amount to add to the current allowance |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bool | success True if the operation succeeded |
decreaseAllowance
solidity
function decreaseAllowance(address spender, uint256 amount) external returns (bool)Decrease the allowance granted to a spender
_External wrapper for decreaseAllowance internal function Allows users to reduce the amount a spender is allowed to transfer on their behalf in a safe way
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | Address whose spending rights will be reduced |
| amount | uint256 | The amount to subtract from the current allowance |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bool | success True if the operation succeeded |