2021-02-07 15:31:36 +00:00
|
|
|
pragma solidity ^0.7.0;
|
2020-11-20 14:49:48 +00:00
|
|
|
|
|
|
|
import { TokenInterface } from "../../common/interfaces.sol";
|
|
|
|
|
|
|
|
interface OneInchInterace {
|
|
|
|
function swap(
|
|
|
|
TokenInterface fromToken,
|
|
|
|
TokenInterface toToken,
|
|
|
|
uint256 fromTokenAmount,
|
|
|
|
uint256 minReturnAmount,
|
|
|
|
uint256 guaranteedAmount,
|
|
|
|
address payable referrer,
|
|
|
|
address[] calldata callAddresses,
|
|
|
|
bytes calldata callDataConcat,
|
|
|
|
uint256[] calldata starts,
|
|
|
|
uint256[] calldata gasLimitsAndValues
|
|
|
|
)
|
|
|
|
external
|
|
|
|
payable
|
|
|
|
returns (uint256 returnAmount);
|
|
|
|
}
|
|
|
|
|
2021-02-07 15:31:36 +00:00
|
|
|
struct OneInchData {
|
|
|
|
TokenInterface sellToken;
|
|
|
|
TokenInterface buyToken;
|
|
|
|
uint _sellAmt;
|
|
|
|
uint _buyAmt;
|
|
|
|
uint unitAmt;
|
|
|
|
bytes callData;
|
2020-11-20 14:49:48 +00:00
|
|
|
}
|