# Withdrawable

{% hint style="warning" %}
You are referring to the **`Legacy`** version of KyberSwap docs.

For the most updated information, please refer to:

* [**`Classic`**](https://github.com/KyberNetwork/kyberswap-documentation/blob/main/reference/legacy/api-abi/misc-contracts/broken-reference/README.md)
* [**`Elastic`**](/reference/legacy/kyberswap-elastic.md)
* [**`Limit Order`**](/kyberswap-solutions/limit-order.md)
* [**`Aggregator`**](/kyberswap-solutions/kyberswap-aggregator.md)
  {% endhint %}

## contract Withdrawable

is [PermissionGroups](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-permissiongroups.md)\ imports ERC20Interface, [PermissionGroups](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-permissiongroups.md)

*Source*: [Withdrawable.sol](https://github.com/KyberNetwork/smart-contracts/blob/master/contracts/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[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#index) <a href="#index" id="index"></a>

\<AUTOGENERATED\_TABLE\_OF\_CONTENTS>

### REFERENCE[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#reference) <a href="#reference" id="reference"></a>

#### Events[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#events) <a href="#events" id="events"></a>

#### `EtherWithdraw`[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#etherwithdraw) <a href="#etherwithdraw" id="etherwithdraw"></a>

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`[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#tokenwithdraw) <a href="#tokenwithdraw" id="tokenwithdraw"></a>

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[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#functions) <a href="#functions" id="functions"></a>

#### `withdrawEther`[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#withdrawether) <a href="#withdrawether" id="withdrawether"></a>

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](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-permissiongroups.md#onlyadmin)\\

#### `withdrawToken`[​](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-withdrawable#withdrawtoken) <a href="#withdrawtoken" id="withdrawtoken"></a>

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](https://docs.kyberswap.com/Legacy/api-abi/misc/api_abi-permissiongroups.md#onlyadmin)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kyberswap.com/reference/legacy/api-abi/misc-contracts/withdrawable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
