Skip to main content

IUniswapV2Router01

Methods

WETH9

function WETH9() external pure returns (address)

Returns

NameTypeDescription
_0addressundefined

addLiquidity

function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external nonpayable returns (uint256 amountA, uint256 amountB, uint256 liquidity)

Parameters

NameTypeDescription
tokenAaddressundefined
tokenBaddressundefined
amountADesireduint256undefined
amountBDesireduint256undefined
amountAMinuint256undefined
amountBMinuint256undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountAuint256undefined
amountBuint256undefined
liquidityuint256undefined

addLiquidityETH

function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity)

Parameters

NameTypeDescription
tokenaddressundefined
amountTokenDesireduint256undefined
amountTokenMinuint256undefined
amountETHMinuint256undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountTokenuint256undefined
amountETHuint256undefined
liquidityuint256undefined

factory

function factory() external pure returns (address)

Returns

NameTypeDescription
_0addressundefined

getAmountIn

function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountIn)

Parameters

NameTypeDescription
amountOutuint256undefined
reserveInuint256undefined
reserveOutuint256undefined

Returns

NameTypeDescription
amountInuint256undefined

getAmountOut

function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountOut)

Parameters

NameTypeDescription
amountInuint256undefined
reserveInuint256undefined
reserveOutuint256undefined

Returns

NameTypeDescription
amountOutuint256undefined

getAmountsIn

function getAmountsIn(uint256 amountOut, address[] path) external view returns (uint256[] amounts)

Parameters

NameTypeDescription
amountOutuint256undefined
pathaddress[]undefined

Returns

NameTypeDescription
amountsuint256[]undefined

getAmountsOut

function getAmountsOut(uint256 amountIn, address[] path) external view returns (uint256[] amounts)

Parameters

NameTypeDescription
amountInuint256undefined
pathaddress[]undefined

Returns

NameTypeDescription
amountsuint256[]undefined

quote

function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB)

Parameters

NameTypeDescription
amountAuint256undefined
reserveAuint256undefined
reserveBuint256undefined

Returns

NameTypeDescription
amountBuint256undefined

removeLiquidity

function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external nonpayable returns (uint256 amountA, uint256 amountB)

Parameters

NameTypeDescription
tokenAaddressundefined
tokenBaddressundefined
liquidityuint256undefined
amountAMinuint256undefined
amountBMinuint256undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountAuint256undefined
amountBuint256undefined

removeLiquidityETH

function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external nonpayable returns (uint256 amountToken, uint256 amountETH)

Parameters

NameTypeDescription
tokenaddressundefined
liquidityuint256undefined
amountTokenMinuint256undefined
amountETHMinuint256undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountTokenuint256undefined
amountETHuint256undefined

removeLiquidityETHWithPermit

function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256 amountToken, uint256 amountETH)

Parameters

NameTypeDescription
tokenaddressundefined
liquidityuint256undefined
amountTokenMinuint256undefined
amountETHMinuint256undefined
toaddressundefined
deadlineuint256undefined
approveMaxboolundefined
vuint8undefined
rbytes32undefined
sbytes32undefined

Returns

NameTypeDescription
amountTokenuint256undefined
amountETHuint256undefined

removeLiquidityWithPermit

function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256 amountA, uint256 amountB)

Parameters

NameTypeDescription
tokenAaddressundefined
tokenBaddressundefined
liquidityuint256undefined
amountAMinuint256undefined
amountBMinuint256undefined
toaddressundefined
deadlineuint256undefined
approveMaxboolundefined
vuint8undefined
rbytes32undefined
sbytes32undefined

Returns

NameTypeDescription
amountAuint256undefined
amountBuint256undefined

swapETHForExactTokens

function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) external payable returns (uint256[] amounts)

Parameters

NameTypeDescription
amountOutuint256undefined
pathaddress[]undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountsuint256[]undefined

swapExactETHForTokens

function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) external payable returns (uint256[] amounts)

Parameters

NameTypeDescription
amountOutMinuint256undefined
pathaddress[]undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountsuint256[]undefined

swapExactTokensForETH

function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) external nonpayable returns (uint256[] amounts)

Parameters

NameTypeDescription
amountInuint256undefined
amountOutMinuint256undefined
pathaddress[]undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountsuint256[]undefined

swapExactTokensForTokens

function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) external nonpayable returns (uint256[] amounts)

Parameters

NameTypeDescription
amountInuint256undefined
amountOutMinuint256undefined
pathaddress[]undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountsuint256[]undefined

swapTokensForExactETH

function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) external nonpayable returns (uint256[] amounts)

Parameters

NameTypeDescription
amountOutuint256undefined
amountInMaxuint256undefined
pathaddress[]undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountsuint256[]undefined

swapTokensForExactTokens

function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) external nonpayable returns (uint256[] amounts)

Parameters

NameTypeDescription
amountOutuint256undefined
amountInMaxuint256undefined
pathaddress[]undefined
toaddressundefined
deadlineuint256undefined

Returns

NameTypeDescription
amountsuint256[]undefined