Appearance
Solidity API
IERC20Extended
Interface for additional ERC20 functionality beyond the standard specification Inherits from IERC20ExtendedInternal to include internal function definitions These extensions provide safer alternatives to the standard approve mechanism by allowing incremental changes to allowances
increaseAllowance
solidity
function increaseAllowance(address spender, uint256 amount) external returns (bool)Increase the allowance granted to a spender
Atomically increases the allowance granted to spender by the caller This is an alternative to {approve} that can be used as a mitigation for the double-spend race condition that can occur with standard ERC20 approve
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | The address which will be granted an increased allowance |
| amount | uint256 | The amount by which to increase the allowance |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bool | success Always returns true (reverts on failure) |
decreaseAllowance
solidity
function decreaseAllowance(address spender, uint256 amount) external returns (bool)Decrease the allowance granted to a spender
Atomically decreases the allowance granted to spender by the caller This is an alternative to {approve} that can be used to reduce or revoke a spender's allowance
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | The address whose allowance will be reduced |
| amount | uint256 | The amount by which to decrease the allowance |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bool | success Always returns true (reverts on failure) |