mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Minor change uniswapV2
This commit is contained in:
parent
27790932b9
commit
742eaac571
|
@ -4,21 +4,21 @@ contract Events {
|
||||||
event LogDepositLiquidity(
|
event LogDepositLiquidity(
|
||||||
address indexed tokenA,
|
address indexed tokenA,
|
||||||
address indexed tokenB,
|
address indexed tokenB,
|
||||||
uint amtA,
|
uint256 amtA,
|
||||||
uint amtB,
|
uint256 amtB,
|
||||||
uint uniAmount,
|
uint256 uniAmount,
|
||||||
uint getId,
|
uint256 getId,
|
||||||
uint setId
|
uint256 setId
|
||||||
);
|
);
|
||||||
|
|
||||||
event LogWithdrawLiquidity(
|
event LogWithdrawLiquidity(
|
||||||
address indexed tokenA,
|
address indexed tokenA,
|
||||||
address indexed tokenB,
|
address indexed tokenB,
|
||||||
uint amountA,
|
uint256 amountA,
|
||||||
uint amountB,
|
uint256 amountB,
|
||||||
uint uniAmount,
|
uint256 uniAmount,
|
||||||
uint getId,
|
uint256 getId,
|
||||||
uint[] setId
|
uint256[] setId
|
||||||
);
|
);
|
||||||
|
|
||||||
event LogBuy(
|
event LogBuy(
|
||||||
|
|
|
@ -18,11 +18,11 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
function deposit(
|
function deposit(
|
||||||
address tokenA,
|
address tokenA,
|
||||||
address tokenB,
|
address tokenB,
|
||||||
uint amtA,
|
uint256 amtA,
|
||||||
uint unitAmt,
|
uint256 unitAmt,
|
||||||
uint slippage,
|
uint256 slippage,
|
||||||
uint getId,
|
uint256 getId,
|
||||||
uint setId
|
uint256 setId
|
||||||
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
||||||
uint _amt = getUint(getId, amtA);
|
uint _amt = getUint(getId, amtA);
|
||||||
|
|
||||||
|
@ -52,11 +52,11 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
function withdraw(
|
function withdraw(
|
||||||
address tokenA,
|
address tokenA,
|
||||||
address tokenB,
|
address tokenB,
|
||||||
uint uniAmt,
|
uint256 uniAmt,
|
||||||
uint unitAmtA,
|
uint256 unitAmtA,
|
||||||
uint unitAmtB,
|
uint256 unitAmtB,
|
||||||
uint getId,
|
uint256 getId,
|
||||||
uint[] calldata setIds
|
uint256[] calldata setIds
|
||||||
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
||||||
uint _amt = getUint(getId, uniAmt);
|
uint _amt = getUint(getId, uniAmt);
|
||||||
|
|
||||||
|
@ -87,10 +87,10 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
function buy(
|
function buy(
|
||||||
address buyAddr,
|
address buyAddr,
|
||||||
address sellAddr,
|
address sellAddr,
|
||||||
uint buyAmt,
|
uint256 buyAmt,
|
||||||
uint unitAmt,
|
uint256 unitAmt,
|
||||||
uint getId,
|
uint256 getId,
|
||||||
uint setId
|
uint256 setId
|
||||||
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
||||||
uint _buyAmt = getUint(getId, buyAmt);
|
uint _buyAmt = getUint(getId, buyAmt);
|
||||||
(TokenInterface _buyAddr, TokenInterface _sellAddr) = changeEthAddress(buyAddr, sellAddr);
|
(TokenInterface _buyAddr, TokenInterface _sellAddr) = changeEthAddress(buyAddr, sellAddr);
|
||||||
|
@ -137,10 +137,10 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
function sell(
|
function sell(
|
||||||
address buyAddr,
|
address buyAddr,
|
||||||
address sellAddr,
|
address sellAddr,
|
||||||
uint sellAmt,
|
uint256 sellAmt,
|
||||||
uint unitAmt,
|
uint256 unitAmt,
|
||||||
uint getId,
|
uint256 getId,
|
||||||
uint setId
|
uint256 setId
|
||||||
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
) external payable returns (string memory _eventName, bytes memory _eventParam) {
|
||||||
uint _sellAmt = getUint(getId, sellAmt);
|
uint _sellAmt = getUint(getId, sellAmt);
|
||||||
(TokenInterface _buyAddr, TokenInterface _sellAddr) = changeEthAddress(buyAddr, sellAddr);
|
(TokenInterface _buyAddr, TokenInterface _sellAddr) = changeEthAddress(buyAddr, sellAddr);
|
||||||
|
@ -183,5 +183,5 @@ abstract contract UniswapResolver is Helpers, Events {
|
||||||
}
|
}
|
||||||
|
|
||||||
contract ConnectV2UniswapV2 is UniswapResolver {
|
contract ConnectV2UniswapV2 is UniswapResolver {
|
||||||
string public name = "UniswapV2-v1";
|
string public constant name = "UniswapV2-v1";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user