Withdrawable
You are referring to the Legacy
version of KyberSwap docs.
For the most updated information, please refer to:
Classic
contract Withdrawable
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.
INDEX
<AUTOGENERATED_TABLE_OF_CONTENTS>
REFERENCE
Events
EtherWithdraw
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
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 |
Functions
withdrawEther
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
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
Last updated