mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
minor changes
This commit is contained in:
parent
6c95281b8c
commit
ce3e50b585
|
@ -48,7 +48,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountOut: _buyAmt,
|
amountOut: _buyAmt,
|
||||||
amountInMaximum: _slippageAmt,
|
amountInMaximum: _slippageAmt, //require(_sellAmt <= amountInMaximum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
sellData.sellAddr
|
sellData.sellAddr
|
||||||
);
|
);
|
||||||
|
|
||||||
if (_sellAmt == uint256(-1)) { //change uint256(-1)
|
if (_sellAmt == uint(-1)) {
|
||||||
_sellAmt = sellData.sellAddr == ethAddr
|
_sellAmt = sellData.sellAddr == ethAddr
|
||||||
? address(this).balance
|
? address(this).balance
|
||||||
: _sellAddr.balanceOf(address(this));
|
: _sellAddr.balanceOf(address(this));
|
||||||
|
@ -113,7 +113,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountIn: _sellAmt,
|
amountIn: _sellAmt,
|
||||||
amountOutMinimum: _slippageAmt,
|
amountOutMinimum: _slippageAmt, //require(_buyAmt >= amountOutMinimum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountOut: _buyAmt,
|
amountOut: _buyAmt,
|
||||||
amountInMaximum: _slippageAmt,
|
amountInMaximum: _slippageAmt, //require(_sellAmt <= amountInMaximum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
sellData.sellAddr
|
sellData.sellAddr
|
||||||
);
|
);
|
||||||
|
|
||||||
if (_sellAmt == uint256(-1)) { //change uint256(-1)
|
if (_sellAmt == uint(-1)) {
|
||||||
_sellAmt = sellData.sellAddr == ethAddr
|
_sellAmt = sellData.sellAddr == ethAddr
|
||||||
? address(this).balance
|
? address(this).balance
|
||||||
: _sellAddr.balanceOf(address(this));
|
: _sellAddr.balanceOf(address(this));
|
||||||
|
@ -115,7 +115,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountIn: _sellAmt,
|
amountIn: _sellAmt,
|
||||||
amountOutMinimum: _slippageAmt,
|
amountOutMinimum: _slippageAmt, //require(_buyAmt >= amountOutMinimum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountOut: _buyAmt,
|
amountOut: _buyAmt,
|
||||||
amountInMaximum: _slippageAmt,
|
amountInMaximum: _slippageAmt, //require(_sellAmt <= amountInMaximum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
sellData.sellAddr
|
sellData.sellAddr
|
||||||
);
|
);
|
||||||
|
|
||||||
if (_sellAmt == uint256(-1)) { //change uint256(-1)
|
if (_sellAmt == uint(-1)) {
|
||||||
_sellAmt = sellData.sellAddr == ethAddr
|
_sellAmt = sellData.sellAddr == ethAddr
|
||||||
? address(this).balance
|
? address(this).balance
|
||||||
: _sellAddr.balanceOf(address(this));
|
: _sellAddr.balanceOf(address(this));
|
||||||
|
@ -115,7 +115,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountIn: _sellAmt,
|
amountIn: _sellAmt,
|
||||||
amountOutMinimum: _slippageAmt,
|
amountOutMinimum: _slippageAmt, //require(_buyAmt >= amountOutMinimum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountOut: _buyAmt,
|
amountOut: _buyAmt,
|
||||||
amountInMaximum: _slippageAmt,
|
amountInMaximum: _slippageAmt, //require(_sellAmt <= amountInMaximum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
TokenInterface _sellAddr
|
TokenInterface _sellAddr
|
||||||
) = changeMaticAddress(sellData.buyAddr, sellData.sellAddr);
|
) = changeMaticAddress(sellData.buyAddr, sellData.sellAddr);
|
||||||
|
|
||||||
if (_sellAmt == uint256(-1)) {
|
if (_sellAmt == uint(-1)) {
|
||||||
_sellAmt = sellData.sellAddr == maticAddr
|
_sellAmt = sellData.sellAddr == maticAddr
|
||||||
? address(this).balance
|
? address(this).balance
|
||||||
: _sellAddr.balanceOf(address(this));
|
: _sellAddr.balanceOf(address(this));
|
||||||
|
@ -113,7 +113,7 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
recipient: address(this),
|
recipient: address(this),
|
||||||
deadline: block.timestamp + 1,
|
deadline: block.timestamp + 1,
|
||||||
amountIn: _sellAmt,
|
amountIn: _sellAmt,
|
||||||
amountOutMinimum: _slippageAmt,
|
amountOutMinimum: _slippageAmt, //require(_buyAmt >= amountOutMinimum)
|
||||||
sqrtPriceLimitX96: 0
|
sqrtPriceLimitX96: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user