refactor mixSwap && add trade adapter
This commit is contained in:
16
contracts/SmartRoute/intf/IDODOAdapter.sol
Normal file
16
contracts/SmartRoute/intf/IDODOAdapter.sol
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
|
||||
Copyright 2020 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity 0.6.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
interface IDODOAdapter {
|
||||
|
||||
function sellBase(address to, address pool) external;
|
||||
|
||||
function sellQuote(address to, address pool) external;
|
||||
}
|
||||
@@ -138,14 +138,14 @@ interface IDODOV2Proxy01 {
|
||||
uint256 deadLine
|
||||
) external payable returns (uint256 returnAmount);
|
||||
|
||||
function mixSwapV1(
|
||||
function mixSwap(
|
||||
address fromToken,
|
||||
address toToken,
|
||||
uint256 fromTokenAmount,
|
||||
uint256 minReturnAmount,
|
||||
address[] memory mixAdapters,
|
||||
address[] memory mixPairs,
|
||||
uint256[] memory directions,
|
||||
address[] memory portionPath,
|
||||
uint256 directions,
|
||||
bool isIncentive,
|
||||
uint256 deadLine
|
||||
) external payable returns (uint256 returnAmount);
|
||||
|
||||
@@ -9,4 +9,12 @@ interface IUni {
|
||||
address to,
|
||||
uint deadline
|
||||
) external returns (uint[] memory amounts);
|
||||
|
||||
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
|
||||
|
||||
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
|
||||
|
||||
function token0() external view returns (address);
|
||||
|
||||
function token1() external view returns (address);
|
||||
}
|
||||
Reference in New Issue
Block a user