mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
99 lines
2.1 KiB
Solidity
99 lines
2.1 KiB
Solidity
//SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.7.0;
|
|
|
|
interface IQuickSwapRouter {
|
|
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 removeLiquidity(
|
|
address tokenA,
|
|
address tokenB,
|
|
uint256 liquidity,
|
|
uint256 amountAMin,
|
|
uint256 amountBMin,
|
|
address to,
|
|
uint256 deadline
|
|
) external returns (uint256 amountA, uint256 amountB);
|
|
|
|
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 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);
|
|
}
|
|
|
|
interface IQuickSwapFactory {
|
|
function getPair(address tokenA, address tokenB)
|
|
external
|
|
view
|
|
returns (address pair);
|
|
|
|
function allPairs(uint256) external view returns (address pair);
|
|
|
|
function allPairsLength() external view returns (uint256);
|
|
|
|
function feeTo() external view returns (address);
|
|
|
|
function feeToSetter() external view returns (address);
|
|
|
|
function createPair(address tokenA, address tokenB)
|
|
external
|
|
returns (address pair);
|
|
}
|