From aca6cad4d423722255589b02372f2a28728e56b0 Mon Sep 17 00:00:00 2001 From: Samyak Jain <34437877+KaymasJain@users.noreply.github.com> Date: Sat, 9 May 2020 17:26:03 +1000 Subject: [PATCH] 1inch connector method name edit --- contracts/connectors/1inch.sol | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/contracts/connectors/1inch.sol b/contracts/connectors/1inch.sol index a9f61d6..a3cb093 100644 --- a/contracts/connectors/1inch.sol +++ b/contracts/connectors/1inch.sol @@ -155,6 +155,24 @@ contract BasicResolver is Resolver { uint256 setId ); + event LogSellTwo( + address indexed buyToken, + address indexed sellToken, + uint256 buyAmt, + uint256 sellAmt, + uint256 getId, + uint256 setId + ); + + event LogSellThree( + address indexed buyToken, + address indexed sellToken, + uint256 buyAmt, + uint256 sellAmt, + uint256 getId, + uint256 setId + ); + function sell( address buyAddr, address sellAddr, @@ -197,7 +215,7 @@ contract BasicResolver is Resolver { emitEvent(_eventCode, _eventParam); } - function sell( + function sellTwo( address buyAddr, address sellAddr, uint sellAmt, @@ -225,13 +243,13 @@ contract BasicResolver is Resolver { ); setUint(setId, _buyAmt); - emit LogSell(address(_buyAddr), address(_sellAddr), _buyAmt, _sellAmt, getId, setId); - bytes32 _eventCode = keccak256("LogSell(address,address,uint256,uint256,uint256,uint256)"); + emit LogSellTwo(address(_buyAddr), address(_sellAddr), _buyAmt, _sellAmt, getId, setId); + bytes32 _eventCode = keccak256("LogSellTwo(address,address,uint256,uint256,uint256,uint256)"); bytes memory _eventParam = abi.encode(address(_buyAddr), address(_sellAddr), _buyAmt, _sellAmt, getId, setId); emitEvent(_eventCode, _eventParam); } - function sell( + function sellThree( address buyAddr, address sellAddr, uint sellAmt, @@ -250,10 +268,10 @@ contract BasicResolver is Resolver { } uint buyAmt = oneInchSwap(_buyAddr, _sellAddr, callData, sellAmt, unitAmt, sellAmt); - + setUint(setId, buyAmt); - emit LogSell(address(_buyAddr), address(_sellAddr), buyAmt, sellAmt, 0, setId); - bytes32 _eventCode = keccak256("LogSell(address,address,uint256,uint256,uint256,uint256)"); + emit LogSellThree(address(_buyAddr), address(_sellAddr), buyAmt, sellAmt, 0, setId); + bytes32 _eventCode = keccak256("LogSellThree(address,address,uint256,uint256,uint256,uint256)"); bytes memory _eventParam = abi.encode(address(_buyAddr), address(_sellAddr), buyAmt, sellAmt, 0, setId); emitEvent(_eventCode, _eventParam); }