swapExactTokensForETH
This method swaps an exact amount of one ERC20 token (_token0
) for ether.
Function
Parameters
Parameter
Description
_to
The address of the recipient.
_token0
An ERC20 token address.
_amountIn
The amount of _token0 to be swapped.
_amountOutMin
The minimal amount of ether that the user will accept for a given amount of _amountIn
.
_deadline
The UTC timestamp that if reached, causes the swap transaction to fail automatically.
Return values
Value
Description
uint _val
The amount of _token1
returned.
Last updated