Withdrawable

circle-exclamation

contract Withdrawable

is PermissionGroupsarrow-up-right\ imports ERC20Interface, PermissionGroupsarrow-up-right

Source: Withdrawable.solarrow-up-right

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>

EtherWithdrawarrow-up-right

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 |\

TokenWithdrawarrow-up-right

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 |\

withdrawEtherarrow-up-right

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: onlyAdminarrow-up-right\

withdrawTokenarrow-up-right

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: onlyAdminarrow-up-right

Last updated

Was this helpful?