dsa-connectors-old/contracts/connectors/1inch.sol

645 lines
20 KiB
Solidity
Raw Normal View History

2020-05-08 09:11:46 +00:00
pragma solidity ^0.6.0;
2020-08-09 16:07:13 +00:00
pragma experimental ABIEncoderV2;
2020-05-08 21:11:13 +00:00
// import files from common directory
import { TokenInterface , MemoryInterface, EventInterface} from "../common/interfaces.sol";
import { Stores } from "../common/stores.sol";
import { DSMath } from "../common/math.sol";
2020-05-08 09:11:46 +00:00
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);
}
2020-08-09 16:07:13 +00:00
interface OneProtoInterface {
2020-08-14 20:21:26 +00:00
function swap(
2020-08-09 16:07:13 +00:00
TokenInterface fromToken,
TokenInterface destToken,
uint256 amount,
uint256 minReturn,
uint256[] calldata distribution,
2020-08-14 20:21:26 +00:00
uint256 flags // See contants in IOneSplit.sol
2020-08-09 16:07:13 +00:00
) external payable returns(uint256);
2020-08-14 20:21:26 +00:00
function swapMulti(
2020-08-09 16:07:13 +00:00
TokenInterface[] calldata tokens,
uint256 amount,
uint256 minReturn,
uint256[] calldata distribution,
2020-08-14 20:21:26 +00:00
uint256[] calldata flags
2020-08-09 16:07:13 +00:00
) external payable returns(uint256 returnAmount);
function getExpectedReturn(
TokenInterface fromToken,
TokenInterface destToken,
uint256 amount,
uint256 parts,
uint256 flags // See constants in IOneSplit.sol
)
external
view
returns(
uint256 returnAmount,
uint256[] memory distribution
);
}
2020-08-14 20:21:26 +00:00
interface OneProtoMappingInterface {
function oneProtoAddress() external view returns(address);
}
2020-08-09 16:07:13 +00:00
2020-05-08 21:11:13 +00:00
contract OneHelpers is Stores, DSMath {
2020-08-14 20:21:26 +00:00
/**
* @dev Return 1proto mapping Address
*/
function getOneProtoMappingAddress() internal pure returns (address payable) {
return 0x8d0287AFa7755BB5f2eFe686AA8d4F0A7BC4AE7F;
}
2020-08-09 16:07:13 +00:00
/**
* @dev Return 1proto Address
*/
2020-08-14 20:21:26 +00:00
function getOneProtoAddress() internal view returns (address payable) {
return payable(OneProtoMappingInterface(getOneProtoMappingAddress()).oneProtoAddress());
2020-08-09 16:07:13 +00:00
}
2020-05-08 09:11:46 +00:00
/**
2020-05-08 21:11:13 +00:00
* @dev Return 1Inch Address
2020-05-08 09:11:46 +00:00
*/
function getOneInchAddress() internal pure returns (address) {
return 0x11111254369792b2Ca5d084aB5eEA397cA8fa48B;
}
2020-05-10 21:53:56 +00:00
/**
2020-07-24 12:52:04 +00:00
* @dev Return 1inch Token Taker Address
2020-05-10 21:53:56 +00:00
*/
2020-07-24 12:58:26 +00:00
function getOneInchTokenTaker() internal pure returns (address payable) {
2020-05-10 21:53:56 +00:00
return 0xE4C9194962532fEB467DCe8b3d42419641c6eD2E;
}
2020-05-09 20:28:08 +00:00
/**
2020-07-24 12:52:04 +00:00
* @dev Return 1inch swap function sig
2020-05-09 20:28:08 +00:00
*/
2020-07-24 12:58:26 +00:00
function getOneInchSig() internal pure returns (bytes4) {
2020-05-09 20:28:08 +00:00
return 0xf88309d7;
}
2020-05-08 09:11:46 +00:00
function convert18ToDec(uint _dec, uint256 _amt) internal pure returns (uint256 amt) {
amt = (_amt / 10 ** (18 - _dec));
}
function convertTo18(uint _dec, uint256 _amt) internal pure returns (uint256 amt) {
amt = mul(_amt, 10 ** (18 - _dec));
}
function getTokenBal(TokenInterface token) internal view returns(uint _amt) {
2020-05-08 21:11:13 +00:00
_amt = address(token) == getEthAddr() ? address(this).balance : token.balanceOf(address(this));
2020-05-08 09:11:46 +00:00
}
function getTokensDec(TokenInterface buyAddr, TokenInterface sellAddr) internal view returns(uint buyDec, uint sellDec) {
2020-05-08 21:11:13 +00:00
buyDec = address(buyAddr) == getEthAddr() ? 18 : buyAddr.decimals();
sellDec = address(sellAddr) == getEthAddr() ? 18 : sellAddr.decimals();
2020-05-08 09:11:46 +00:00
}
2020-07-24 11:59:21 +00:00
2020-08-09 16:07:13 +00:00
function getSlippageAmt(
TokenInterface _buyAddr,
TokenInterface _sellAddr,
uint _sellAmt,
uint unitAmt
) internal view returns(uint _slippageAmt) {
(uint _buyDec, uint _sellDec) = getTokensDec(_buyAddr, _sellAddr);
uint _sellAmt18 = convertTo18(_sellDec, _sellAmt);
_slippageAmt = convert18ToDec(_buyDec, wmul(unitAmt, _sellAmt18));
2020-07-29 13:51:14 +00:00
}
2020-08-09 16:07:13 +00:00
function convertToTokenInterface(address[] memory tokens) internal pure returns(TokenInterface[] memory) {
TokenInterface[] memory _tokens = new TokenInterface[](tokens.length);
for (uint i = 0; i < tokens.length; i++) {
_tokens[i] = TokenInterface(tokens[i]);
2020-07-29 13:51:14 +00:00
}
2020-08-09 16:07:13 +00:00
return _tokens;
2020-07-29 13:51:14 +00:00
}
2020-05-08 09:11:46 +00:00
}
2020-08-09 16:07:13 +00:00
contract OneProtoResolver is OneHelpers {
struct OneProtoData {
TokenInterface sellToken;
TokenInterface buyToken;
uint _sellAmt;
uint _buyAmt;
uint unitAmt;
uint[] distribution;
uint disableDexes;
}
function oneProtoSwap(
OneProtoInterface oneProtoContract,
OneProtoData memory oneProtoData
) internal returns (uint buyAmt) {
TokenInterface _sellAddr = oneProtoData.sellToken;
TokenInterface _buyAddr = oneProtoData.buyToken;
uint _sellAmt = oneProtoData._sellAmt;
uint _slippageAmt = getSlippageAmt(_buyAddr, _sellAddr, _sellAmt, oneProtoData.unitAmt);
uint ethAmt;
if (address(_sellAddr) == getEthAddr()) {
ethAmt = _sellAmt;
} else {
_sellAddr.approve(address(oneProtoContract), _sellAmt);
}
uint initalBal = getTokenBal(_buyAddr);
2020-08-14 20:21:26 +00:00
oneProtoContract.swap.value(ethAmt)(
2020-08-09 16:07:13 +00:00
_sellAddr,
_buyAddr,
_sellAmt,
_slippageAmt,
oneProtoData.distribution,
2020-08-14 20:21:26 +00:00
oneProtoData.disableDexes
2020-08-09 16:07:13 +00:00
);
uint finalBal = getTokenBal(_buyAddr);
buyAmt = sub(finalBal, initalBal);
require(_slippageAmt <= buyAmt, "Too much slippage");
}
struct OneProtoMultiData {
address[] tokens;
TokenInterface sellToken;
TokenInterface buyToken;
uint _sellAmt;
uint _buyAmt;
uint unitAmt;
uint[] distribution;
uint[] disableDexes;
}
function oneProtoSwapMulti(OneProtoMultiData memory oneProtoData) internal returns (uint buyAmt) {
TokenInterface _sellAddr = oneProtoData.sellToken;
TokenInterface _buyAddr = oneProtoData.buyToken;
uint _sellAmt = oneProtoData._sellAmt;
uint _slippageAmt = getSlippageAmt(_buyAddr, _sellAddr, _sellAmt, oneProtoData.unitAmt);
OneProtoInterface oneSplitContract = OneProtoInterface(getOneProtoAddress());
uint ethAmt;
if (address(_sellAddr) == getEthAddr()) {
ethAmt = _sellAmt;
} else {
_sellAddr.approve(address(oneSplitContract), _sellAmt);
}
uint initalBal = getTokenBal(_buyAddr);
2020-08-14 20:21:26 +00:00
oneSplitContract.swapMulti.value(ethAmt)(
2020-08-09 16:07:13 +00:00
convertToTokenInterface(oneProtoData.tokens),
_sellAmt,
_slippageAmt,
oneProtoData.distribution,
2020-08-14 20:21:26 +00:00
oneProtoData.disableDexes
2020-08-09 16:07:13 +00:00
);
uint finalBal = getTokenBal(_buyAddr);
buyAmt = sub(finalBal, initalBal);
require(_slippageAmt <= buyAmt, "Too much slippage");
}
}
contract OneInchResolver is OneProtoResolver {
2020-05-09 20:28:08 +00:00
function checkOneInchSig(bytes memory callData) internal pure returns(bool isOk) {
bytes memory _data = callData;
bytes4 sig;
// solium-disable-next-line security/no-inline-assembly
assembly {
sig := mload(add(_data, 32))
}
2020-07-24 12:58:26 +00:00
isOk = sig == getOneInchSig();
2020-05-09 20:28:08 +00:00
}
2020-07-31 07:31:21 +00:00
struct OneInchData {
2020-07-30 13:20:25 +00:00
TokenInterface sellToken;
TokenInterface buyToken;
uint _sellAmt;
uint _buyAmt;
uint unitAmt;
2020-07-31 07:31:21 +00:00
bytes callData;
2020-07-24 11:12:04 +00:00
}
2020-05-09 00:40:44 +00:00
function oneInchSwap(
2020-07-31 07:31:21 +00:00
OneInchData memory oneInchData,
2020-05-09 00:40:44 +00:00
uint ethAmt
) internal returns (uint buyAmt) {
2020-07-31 07:31:21 +00:00
TokenInterface buyToken = oneInchData.buyToken;
(uint _buyDec, uint _sellDec) = getTokensDec(buyToken, oneInchData.sellToken);
uint _sellAmt18 = convertTo18(_sellDec, oneInchData._sellAmt);
uint _slippageAmt = convert18ToDec(_buyDec, wmul(oneInchData.unitAmt, _sellAmt18));
uint initalBal = getTokenBal(buyToken);
2020-05-09 00:40:44 +00:00
// solium-disable-next-line security/no-call-value
2020-07-31 07:31:21 +00:00
(bool success, ) = address(getOneInchAddress()).call.value(ethAmt)(oneInchData.callData);
2020-05-09 00:40:44 +00:00
if (!success) revert("1Inch-swap-failed");
2020-07-31 07:31:21 +00:00
uint finalBal = getTokenBal(buyToken);
2020-05-09 00:40:44 +00:00
buyAmt = sub(finalBal, initalBal);
require(_slippageAmt <= buyAmt, "Too much slippage");
}
2020-07-30 13:20:25 +00:00
2020-05-08 09:11:46 +00:00
}
2020-08-09 16:07:13 +00:00
contract OneProtoEventResolver is OneInchResolver {
2020-05-08 10:36:46 +00:00
event LogSell(
2020-05-08 09:11:46 +00:00
address indexed buyToken,
address indexed sellToken,
uint256 buyAmt,
uint256 sellAmt,
uint256 getId,
uint256 setId
);
2020-08-09 16:07:13 +00:00
function emitLogSell(
OneProtoData memory oneProtoData,
uint256 getId,
uint256 setId
) internal {
bytes32 _eventCode;
bytes memory _eventParam;
emit LogSell(
address(oneProtoData.buyToken),
address(oneProtoData.sellToken),
oneProtoData._buyAmt,
oneProtoData._sellAmt,
getId,
setId
);
_eventCode = keccak256("LogSell(address,address,uint256,uint256,uint256,uint256)");
_eventParam = abi.encode(
address(oneProtoData.buyToken),
address(oneProtoData.sellToken),
oneProtoData._buyAmt,
oneProtoData._sellAmt,
getId,
setId
);
emitEvent(_eventCode, _eventParam);
}
event LogSellTwo(
2020-07-30 13:20:25 +00:00
address indexed buyToken,
address indexed sellToken,
2020-07-30 11:56:39 +00:00
uint256 buyAmt,
uint256 sellAmt,
2020-07-30 13:20:25 +00:00
uint256 getId,
uint256 setId
);
2020-08-09 16:07:13 +00:00
function emitLogSellTwo(
OneProtoData memory oneProtoData,
uint256 getId,
uint256 setId
) internal {
bytes32 _eventCode;
bytes memory _eventParam;
emit LogSellTwo(
address(oneProtoData.buyToken),
address(oneProtoData.sellToken),
oneProtoData._buyAmt,
oneProtoData._sellAmt,
getId,
setId
);
_eventCode = keccak256("LogSellTwo(address,address,uint256,uint256,uint256,uint256)");
_eventParam = abi.encode(
address(oneProtoData.buyToken),
address(oneProtoData.sellToken),
oneProtoData._buyAmt,
oneProtoData._sellAmt,
getId,
setId
);
emitEvent(_eventCode, _eventParam);
}
event LogSellMulti(
address[] tokens,
address indexed buyToken,
address indexed sellToken,
uint256 buyAmt,
uint256 sellAmt,
uint256 getId,
uint256 setId
);
function emitLogSellMulti(
OneProtoMultiData memory oneProtoData,
uint256 getId,
uint256 setId
) internal {
bytes32 _eventCode;
bytes memory _eventParam;
emit LogSellMulti(
oneProtoData.tokens,
address(oneProtoData.buyToken),
address(oneProtoData.sellToken),
oneProtoData._buyAmt,
oneProtoData._sellAmt,
getId,
setId
);
_eventCode = keccak256("LogSellMulti(address[],address,address,uint256,uint256,uint256,uint256)");
_eventParam = abi.encode(
oneProtoData.tokens,
address(oneProtoData.buyToken),
address(oneProtoData.sellToken),
oneProtoData._buyAmt,
oneProtoData._sellAmt,
getId,
setId
);
emitEvent(_eventCode, _eventParam);
}
}
contract OneInchEventResolver is OneProtoEventResolver {
event LogSellThree(
address indexed buyToken,
address indexed sellToken,
uint256 buyAmt,
uint256 sellAmt,
uint256 getId,
uint256 setId
);
function emitLogSellThree(
2020-07-31 07:31:21 +00:00
OneInchData memory oneInchData,
2020-07-30 11:56:39 +00:00
uint256 setId
) internal {
bytes32 _eventCode;
bytes memory _eventParam;
2020-08-09 16:07:13 +00:00
emit LogSellThree(
address(oneInchData.buyToken),
address(oneInchData.sellToken),
oneInchData._buyAmt,
oneInchData._sellAmt,
0,
setId
);
_eventCode = keccak256("LogSellThree(address,address,uint256,uint256,uint256,uint256)");
_eventParam = abi.encode(
address(oneInchData.buyToken),
address(oneInchData.sellToken),
oneInchData._buyAmt,
oneInchData._sellAmt,
0,
setId
);
2020-07-30 11:56:39 +00:00
emitEvent(_eventCode, _eventParam);
}
2020-07-31 07:31:21 +00:00
}
2020-07-30 11:56:39 +00:00
2020-08-09 16:07:13 +00:00
contract OneProtoResolverHelpers is OneInchEventResolver {
function _sell(
OneProtoData memory oneProtoData,
uint256 getId,
uint256 setId
) internal {
uint _sellAmt = getUint(getId, oneProtoData._sellAmt);
oneProtoData._sellAmt = _sellAmt == uint(-1) ?
getTokenBal(oneProtoData.sellToken) :
_sellAmt;
OneProtoInterface oneProtoContract = OneProtoInterface(getOneProtoAddress());
(, oneProtoData.distribution) = oneProtoContract.getExpectedReturn(
oneProtoData.sellToken,
oneProtoData.buyToken,
oneProtoData._sellAmt,
5,
0
);
oneProtoData._buyAmt = oneProtoSwap(
oneProtoContract,
oneProtoData
);
setUint(setId, oneProtoData._buyAmt);
emitLogSell(oneProtoData, getId, setId);
}
function _sellTwo(
OneProtoData memory oneProtoData,
uint getId,
uint setId
) internal {
uint _sellAmt = getUint(getId, oneProtoData._sellAmt);
oneProtoData._sellAmt = _sellAmt == uint(-1) ?
getTokenBal(oneProtoData.sellToken) :
_sellAmt;
oneProtoData._buyAmt = oneProtoSwap(
OneProtoInterface(getOneProtoAddress()),
oneProtoData
);
setUint(setId, oneProtoData._buyAmt);
emitLogSellTwo(oneProtoData, getId, setId);
}
function _sellMulti(
OneProtoMultiData memory oneProtoData,
uint getId,
uint setId
) internal {
uint _sellAmt = getUint(getId, oneProtoData._sellAmt);
oneProtoData._sellAmt = _sellAmt == uint(-1) ?
getTokenBal(oneProtoData.sellToken) :
_sellAmt;
oneProtoData._buyAmt = oneProtoSwapMulti(oneProtoData);
setUint(setId, oneProtoData._buyAmt);
emitLogSellMulti(oneProtoData, getId, setId);
}
}
contract OneInchResolverHelpers is OneProtoResolverHelpers {
function _sellThree(
2020-07-31 07:31:21 +00:00
OneInchData memory oneInchData,
uint setId
2020-07-30 11:56:39 +00:00
) internal {
2020-07-31 07:31:21 +00:00
TokenInterface _sellAddr = oneInchData.sellToken;
2020-07-30 13:20:25 +00:00
2020-07-31 07:31:21 +00:00
uint ethAmt;
if (address(_sellAddr) == getEthAddr()) {
ethAmt = oneInchData._sellAmt;
2020-07-30 13:20:25 +00:00
} else {
2020-07-31 07:31:21 +00:00
TokenInterface(_sellAddr).approve(getOneInchTokenTaker(), oneInchData._sellAmt);
2020-07-30 11:56:39 +00:00
}
2020-05-09 07:26:03 +00:00
2020-07-31 07:31:21 +00:00
require(checkOneInchSig(oneInchData.callData), "Not-swap-function");
2020-07-30 13:20:25 +00:00
2020-08-09 16:07:13 +00:00
oneInchData._buyAmt = oneInchSwap(oneInchData, ethAmt);
setUint(setId, oneInchData._buyAmt);
2020-07-30 13:20:25 +00:00
2020-08-09 16:07:13 +00:00
emitLogSellThree(oneInchData, setId);
2020-07-30 13:20:25 +00:00
}
}
2020-08-09 16:07:13 +00:00
contract OneProto is OneInchResolverHelpers {
2020-05-11 00:18:40 +00:00
/**
2020-08-09 16:07:13 +00:00
* @dev Sell ETH/ERC20_Token using 1proto.
2020-05-11 00:18:40 +00:00
* @param buyAddr buying token address.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
2020-08-09 16:07:13 +00:00
* @param sellAddr selling token address.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
2020-05-11 00:18:40 +00:00
* @param sellAmt selling token amount.
* @param unitAmt unit amount of buyAmt/sellAmt with slippage.
2020-08-09 16:07:13 +00:00
* @param getId Get token amount at this ID from `InstaMemory` Contract.
2020-05-11 00:18:40 +00:00
* @param setId Set token amount at this ID in `InstaMemory` Contract.
*/
2020-05-08 09:11:46 +00:00
function sell(
address buyAddr,
address sellAddr,
uint sellAmt,
uint unitAmt,
2020-08-09 16:07:13 +00:00
uint getId,
2020-05-08 09:11:46 +00:00
uint setId
2020-05-09 20:28:08 +00:00
) external payable {
2020-08-09 16:07:13 +00:00
OneProtoData memory oneProtoData = OneProtoData({
2020-07-30 13:20:25 +00:00
buyToken: TokenInterface(buyAddr),
sellToken: TokenInterface(sellAddr),
_sellAmt: sellAmt,
2020-08-09 16:07:13 +00:00
unitAmt: unitAmt,
distribution: new uint[](0),
2020-07-30 13:20:25 +00:00
_buyAmt: 0,
2020-08-09 16:07:13 +00:00
disableDexes: 0
});
_sell(oneProtoData, getId, setId);
}
/**
* @dev Sell ETH/ERC20_Token using 1proto using off-chain calculation.
* @param buyAddr buying token address.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
* @param sellAddr selling token address.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
* @param sellAmt selling token amount.
* @param unitAmt unit amount of buyAmt/sellAmt with slippage.
* @param distribution distribution of swap across different dex.
* @param disableDexes disable a dex. (To disable none: 0)
* @param getId Get token amount at this ID from `InstaMemory` Contract.
* @param setId Set token amount at this ID in `InstaMemory` Contract.
*/
function sellTwo(
address buyAddr,
address sellAddr,
uint sellAmt,
uint unitAmt,
uint[] calldata distribution,
uint disableDexes,
uint getId,
uint setId
) external payable {
OneProtoData memory oneProtoData = OneProtoData({
buyToken: TokenInterface(buyAddr),
sellToken: TokenInterface(sellAddr),
_sellAmt: sellAmt,
unitAmt: unitAmt,
distribution: distribution,
disableDexes: disableDexes,
_buyAmt: 0
});
_sellTwo(oneProtoData, getId, setId);
}
/**
* @dev Sell ETH/ERC20_Token using 1proto using muliple token.
* @param tokens array of tokens.
* @param sellAmt selling token amount.
* @param unitAmt unit amount of buyAmt/sellAmt with slippage.
* @param distribution distribution of swap across different dex.
* @param disableDexes disable a dex. (To disable none: 0)
* @param getId Get token amount at this ID from `InstaMemory` Contract.
* @param setId Set token amount at this ID in `InstaMemory` Contract.
*/
function sellMulti(
address[] calldata tokens,
uint sellAmt,
uint unitAmt,
uint[] calldata distribution,
uint[] calldata disableDexes,
uint getId,
uint setId
) external payable {
OneProtoMultiData memory oneProtoData = OneProtoMultiData({
tokens: tokens,
buyToken: TokenInterface(address(tokens[tokens.length - 1])),
sellToken: TokenInterface(address(tokens[0])),
unitAmt: unitAmt,
distribution: distribution,
disableDexes: disableDexes,
_sellAmt: sellAmt,
_buyAmt: 0
2020-07-30 13:20:25 +00:00
});
2020-08-09 16:07:13 +00:00
_sellMulti(oneProtoData, getId, setId);
2020-07-30 13:20:25 +00:00
}
2020-08-09 16:07:13 +00:00
}
2020-05-09 20:28:08 +00:00
2020-08-09 16:07:13 +00:00
contract OneInch is OneProto {
2020-07-30 13:20:25 +00:00
/**
2020-07-31 07:31:21 +00:00
* @dev Sell ETH/ERC20_Token using 1inch.
2020-07-30 13:20:25 +00:00
* @param buyAddr buying token address.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
* @param sellAddr selling token amount.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
* @param sellAmt selling token amount.
* @param unitAmt unit amount of buyAmt/sellAmt with slippage.
2020-07-31 07:31:21 +00:00
* @param callData Data from 1inch API.
2020-07-30 13:20:25 +00:00
* @param setId Set token amount at this ID in `InstaMemory` Contract.
*/
2020-08-09 16:07:13 +00:00
function sellThree(
2020-07-30 13:20:25 +00:00
address buyAddr,
address sellAddr,
uint sellAmt,
uint unitAmt,
2020-07-31 07:31:21 +00:00
bytes calldata callData,
2020-07-30 13:20:25 +00:00
uint setId
) external payable {
2020-07-31 07:31:21 +00:00
OneInchData memory oneInchData = OneInchData({
2020-07-30 13:20:25 +00:00
buyToken: TokenInterface(buyAddr),
sellToken: TokenInterface(sellAddr),
unitAmt: unitAmt,
2020-07-31 07:31:21 +00:00
callData: callData,
2020-08-09 16:07:13 +00:00
_sellAmt: sellAmt,
_buyAmt: 0
2020-07-30 13:20:25 +00:00
});
2020-08-09 16:07:13 +00:00
_sellThree(oneInchData, setId);
2020-07-24 11:12:04 +00:00
}
}
2020-07-30 13:20:25 +00:00
2020-08-09 16:07:13 +00:00
contract ConnectOne is OneInch {
string public name = "1inch-1proto-v1";
2020-05-08 09:11:46 +00:00
}