IGenericButtonswapRouterErrors
Errors
NonWETHSender
Thrown when ETH is sent by address other than WETH contract
error NonWETHSender(address sender);
Parameters
Name | Type | Description |
---|---|---|
sender | address | The sender of the ETH |
NonWethToken
WETH transfer failed
Thrown when a different token address is provided where WETH address is expected\
error NonWethToken(address weth, address token);
Parameters
Name | Type | Description |
---|---|---|
weth | address | The address of WETH |
token | address | The address of the token |
NonEthToken
Thrown when input is a token instead of should be ETH (0x address)
error NonEthToken(address token);
Parameters
Name | Type | Description |
---|---|---|
token | address | The address of the token |
IncorrectButtonUnderlying
Thrown when the underlying token doesn't match that of the buttonToken
error IncorrectButtonUnderlying(address buttonToken, address underlyingToken, address token);
Parameters
Name | Type | Description |
---|---|---|
buttonToken | address | The address of the buttonToken |
underlyingToken | address | The address of the underlying token |
token | address | The address of the token provided |
IncorrectBalance
Thrown when the amountIn doesn't match the router's current balance of IERC20 token
error IncorrectBalance(address token, uint256 balance, uint256 amountIn);
Parameters
Name | Type | Description |
---|---|---|
token | address | The address of the token |
balance | uint256 | The balance of the token |
amountIn | uint256 |
ExcessiveInputAmount
Thrown when the calculated input amount exceeds the specified maximum
error ExcessiveInputAmount(uint256 amountInMax, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
amountInMax | uint256 | The maximum amount of input token |
amount | uint256 | The amount of input token |
InsufficientOutputAmount
Thrown when insufficient tokens are returned in an operation
error InsufficientOutputAmount(uint256 amountOutMin, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
amountOutMin | uint256 | The minimum amount of output token |
amount | uint256 | The amount of output token |
Expired
Thrown when the deadline is exceeded
error Expired(uint256 deadline, uint256 timestamp);
Parameters
Name | Type | Description |
---|---|---|
deadline | uint256 | The deadline |
timestamp | uint256 | The current timestamp |