refactor mixSwap && add trade adapter

This commit is contained in:
owen05
2021-01-14 18:31:43 +08:00
parent 6e126ba6ae
commit a9ab9e981c
13 changed files with 296 additions and 139 deletions

View 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;
}

View File

@@ -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);

View File

@@ -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);
}