Skip to main content

ICashManager.sol

Read code on GitHub

Methods

refundETH

Transfers the ETH balance of the contract to the caller

Solidity
function refundETH() external payable

sweepToken

Transfers the tokens in the contract to a recipient

Solidity
function sweepToken(address token, uint256 amountMin, address recipient) external payable

Parameters

NameTypeDescription
tokenaddressAddress of the token to sweep
amountMinuint256Minimum amount to transfer
recipientaddressRecipient of the tokens

unwrap

Unwraps WETH to ETH and transfers to a recipient

Solidity
function unwrap(uint256 amountMin, address recipient) external payable

Parameters

NameTypeDescription
amountMinuint256Minimum amount to unwrap
recipientaddressAddress of the recipient

wrap

Wraps ETH into WETH and transfers to the msg.sender

Solidity
function wrap(uint256 value) external payable

Parameters

NameTypeDescription
valueuint256Amount of ETH to wrap

Errors

BalanceTooLowError

Thrown when the amount required is above balance

Solidity
error BalanceTooLowError(uint256 balance, uint256 requiredAmount)

Parameters

NameTypeDescription
balanceuint256Actual ETH or token balance of the contract
requiredAmountuint256ETH or token amount required by the user

OnlyWETHError

Thrown when the sender is not WETH

Solidity
error OnlyWETHError()