UniswapV2Library
Overview
License: MIT
library UniswapV2Library
Functions info
sortTokens
function sortTokens(
address tokenA,
address tokenB
) internal pure returns (address token0, address token1)
pairFor
function pairFor(
address factory,
address tokenA,
address tokenB
) internal pure returns (address pair)
getReserves
function getReserves(
address factory,
address tokenA,
address tokenB
) internal view returns (uint256 reserveA, uint256 reserveB)
quote
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) internal pure returns (uint256 amountB)
getAmountOut
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountOut)
getAmountIn
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountIn)
getAmountsOut
function getAmountsOut(
address factory,
uint256 amountIn,
address[] memory path
) internal view returns (uint256[] memory amounts)
getAmountsIn
function getAmountsIn(
address factory,
uint256 amountOut,
address[] memory path
) internal view returns (uint256[] memory amounts)
Last updated