mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Added comments in 1inch
This commit is contained in:
parent
dac5a7b1f5
commit
f8b1c04388
|
@ -29,8 +29,8 @@ interface OneSplitInterface {
|
||||||
TokenInterface toToken,
|
TokenInterface toToken,
|
||||||
uint256 amount,
|
uint256 amount,
|
||||||
uint256 minReturn,
|
uint256 minReturn,
|
||||||
uint256[] calldata distribution, // [Uniswap, Kyber, Bancor, Oasis]
|
uint256[] calldata distribution,
|
||||||
uint256 disableFlags // 16 - Compound, 32 - Fulcrum, 64 - Chai, 128 - Aave, 256 - SmartToken, 1024 - bDAI
|
uint256 disableFlags
|
||||||
) external payable;
|
) external payable;
|
||||||
|
|
||||||
function getExpectedReturn(
|
function getExpectedReturn(
|
||||||
|
@ -197,6 +197,15 @@ contract BasicResolver is Resolver {
|
||||||
uint256 setId
|
uint256 setId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dev Sell ETH/ERC20_Token using 1split.
|
||||||
|
* @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.
|
||||||
|
* @param getId Get token amount at this ID from `InstaMemory` Contract.
|
||||||
|
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
||||||
|
*/
|
||||||
function sell(
|
function sell(
|
||||||
address buyAddr,
|
address buyAddr,
|
||||||
address sellAddr,
|
address sellAddr,
|
||||||
|
@ -218,7 +227,7 @@ contract BasicResolver is Resolver {
|
||||||
_sellAddr,
|
_sellAddr,
|
||||||
_buyAddr,
|
_buyAddr,
|
||||||
_sellAmt,
|
_sellAmt,
|
||||||
3, // TODO - shall we hardcode?
|
5,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -240,6 +249,17 @@ contract BasicResolver is Resolver {
|
||||||
emitEvent(_eventCode, _eventParam);
|
emitEvent(_eventCode, _eventParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dev Sell ETH/ERC20_Token using 1split.
|
||||||
|
* @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.
|
||||||
|
* @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(
|
function sellTwo(
|
||||||
address buyAddr,
|
address buyAddr,
|
||||||
address sellAddr,
|
address sellAddr,
|
||||||
|
@ -275,6 +295,15 @@ contract BasicResolver is Resolver {
|
||||||
emitEvent(_eventCode, _eventParam);
|
emitEvent(_eventCode, _eventParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dev Sell ETH/ERC20_Token using 1split.
|
||||||
|
* @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.
|
||||||
|
* @param callData Data from 1inch API.
|
||||||
|
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
||||||
|
*/
|
||||||
function sellThree(
|
function sellThree(
|
||||||
address buyAddr,
|
address buyAddr,
|
||||||
address sellAddr,
|
address sellAddr,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user