mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
162 lines
3.6 KiB
Solidity
162 lines
3.6 KiB
Solidity
// SPDX-License-Identifier: agpl-3.0
|
|
pragma solidity >=0.6.2;
|
|
|
|
interface IUniswapV2Router01 {
|
|
function factory() external pure returns (address);
|
|
|
|
function WETH() external pure returns (address);
|
|
|
|
function addLiquidity(
|
|
address tokenA,
|
|
address tokenB,
|
|
uint256 amountADesired,
|
|
uint256 amountBDesired,
|
|
uint256 amountAMin,
|
|
uint256 amountBMin,
|
|
address to,
|
|
uint256 deadline
|
|
)
|
|
external
|
|
returns (
|
|
uint256 amountA,
|
|
uint256 amountB,
|
|
uint256 liquidity
|
|
);
|
|
|
|
function addLiquidityETH(
|
|
address token,
|
|
uint256 amountTokenDesired,
|
|
uint256 amountTokenMin,
|
|
uint256 amountETHMin,
|
|
address to,
|
|
uint256 deadline
|
|
)
|
|
external
|
|
payable
|
|
returns (
|
|
uint256 amountToken,
|
|
uint256 amountETH,
|
|
uint256 liquidity
|
|
);
|
|
|
|
function removeLiquidity(
|
|
address tokenA,
|
|
address tokenB,
|
|
uint256 liquidity,
|
|
uint256 amountAMin,
|
|
uint256 amountBMin,
|
|
address to,
|
|
uint256 deadline
|
|
) external returns (uint256 amountA, uint256 amountB);
|
|
|
|
function removeLiquidityETH(
|
|
address token,
|
|
uint256 liquidity,
|
|
uint256 amountTokenMin,
|
|
uint256 amountETHMin,
|
|
address to,
|
|
uint256 deadline
|
|
) external returns (uint256 amountToken, uint256 amountETH);
|
|
|
|
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 returns (uint256 amountA, uint256 amountB);
|
|
|
|
function removeLiquidityETHWithPermit(
|
|
address token,
|
|
uint256 liquidity,
|
|
uint256 amountTokenMin,
|
|
uint256 amountETHMin,
|
|
address to,
|
|
uint256 deadline,
|
|
bool approveMax,
|
|
uint8 v,
|
|
bytes32 r,
|
|
bytes32 s
|
|
) external returns (uint256 amountToken, uint256 amountETH);
|
|
|
|
function swapExactTokensForTokens(
|
|
uint256 amountIn,
|
|
uint256 amountOutMin,
|
|
address[] calldata path,
|
|
address to,
|
|
uint256 deadline
|
|
) external returns (uint256[] memory amounts);
|
|
|
|
function swapTokensForExactTokens(
|
|
uint256 amountOut,
|
|
uint256 amountInMax,
|
|
address[] calldata path,
|
|
address to,
|
|
uint256 deadline
|
|
) external returns (uint256[] memory amounts);
|
|
|
|
function swapExactETHForTokens(
|
|
uint256 amountOutMin,
|
|
address[] calldata path,
|
|
address to,
|
|
uint256 deadline
|
|
) external payable returns (uint256[] memory amounts);
|
|
|
|
function swapTokensForExactETH(
|
|
uint256 amountOut,
|
|
uint256 amountInMax,
|
|
address[] calldata path,
|
|
address to,
|
|
uint256 deadline
|
|
) external returns (uint256[] memory amounts);
|
|
|
|
function swapExactTokensForETH(
|
|
uint256 amountIn,
|
|
uint256 amountOutMin,
|
|
address[] calldata path,
|
|
address to,
|
|
uint256 deadline
|
|
) external returns (uint256[] memory amounts);
|
|
|
|
function swapETHForExactTokens(
|
|
uint256 amountOut,
|
|
address[] calldata path,
|
|
address to,
|
|
uint256 deadline
|
|
) external payable returns (uint256[] memory amounts);
|
|
|
|
function quote(
|
|
uint256 amountA,
|
|
uint256 reserveA,
|
|
uint256 reserveB
|
|
) external pure returns (uint256 amountB);
|
|
|
|
function getAmountOut(
|
|
uint256 amountIn,
|
|
uint256 reserveIn,
|
|
uint256 reserveOut
|
|
) external pure returns (uint256 amountOut);
|
|
|
|
function getAmountIn(
|
|
uint256 amountOut,
|
|
uint256 reserveIn,
|
|
uint256 reserveOut
|
|
) external pure returns (uint256 amountIn);
|
|
|
|
function getAmountsOut(uint256 amountIn, address[] calldata path)
|
|
external
|
|
view
|
|
returns (uint256[] memory amounts);
|
|
|
|
function getAmountsIn(uint256 amountOut, address[] calldata path)
|
|
external
|
|
view
|
|
returns (uint256[] memory amounts);
|
|
}
|