Withdrawable
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
You are referring to the Legacy
version of KyberSwap docs.
For the most updated information, please refer to:
is PermissionGroups\ imports ERC20Interface, PermissionGroups
Source: Withdrawable.sol
The Withdrawable contract's role is to allow recovery of any ERC20 token or ETH received in a contract. This will prevent any accidental loss of tokens.
<AUTOGENERATED_TABLE_OF_CONTENTS>
EtherWithdraw
Event for logging the withdrawal of ETH received in a contract.
event EtherWithdraw(uint amount, address sendTo) | Parameter | Type | Description | | --------- |:-------:|:--------------------:| | amount
| uint | amount of ETH in wei | | sendTo
| address | recipient's address |\
TokenWithdraw
Event for logging the withdrawal of a token received in a contract.
event TokenWithdraw(ERC20 token, uint amount, address sendTo) | Parameter | Type | Description | | --------- |:-------:|:-----------------------------:| | token
| ERC20 | ERC20 token contract address | | amount
| uint | amount of ERC20 tokens in wei | | sendTo
| address | recipient's address |\
withdrawEther
Withdraws ETH from the contract.
function withdrawEther(uint amount, address sendTo) external onlyAdmin | Parameter | Type | Description | | --------- |:-------:|:---------------------:| | amount
| uint | amount of ETH in wei | | sendTo
| address | recipient's address | Modifiers: onlyAdmin\
withdrawToken
Withdraws an ERC20 token from the contract.
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin | Parameter | Type | Description | | --------- |:-------:|:-----------------------------:| | token
| ERC20 | ERC20 token contract address | | amount
| uint | amount of ERC20 tokens in wei | | sendTo
| address | recipient's address | Modifiers: onlyAdmin