From c3b327f1a681b98a44f6b710da5dcd97d99783bc Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Fri, 25 Jun 2021 20:57:53 +0530 Subject: [PATCH] Updated 1inch connector --- contracts/mainnet/connectors/1inch/helpers.sol | 9 +++++++-- contracts/mainnet/connectors/1inch/main.sol | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/contracts/mainnet/connectors/1inch/helpers.sol b/contracts/mainnet/connectors/1inch/helpers.sol index 1aa7b6a1..41cc4b0d 100644 --- a/contracts/mainnet/connectors/1inch/helpers.sol +++ b/contracts/mainnet/connectors/1inch/helpers.sol @@ -9,10 +9,15 @@ abstract contract Helpers is DSMath, Basic { /** * @dev 1Inch Address */ - address internal constant oneInchAddr = 0x111111125434b319222CdBf8C261674aDB56F3ae; + address internal constant oneInchAddr = 0x11111112542D85B3EF69AE05771c2dCCff4fAa26; /** * @dev 1inch swap function sig */ - bytes4 internal constant oneInchSig = 0x90411a32; + bytes4 internal constant oneInchSwapSig = 0x7c025200; + + /** + * @dev 1inch swap function sig + */ + bytes4 internal constant oneInchUnoswapSig = 0x2e95b6c8; } \ No newline at end of file diff --git a/contracts/mainnet/connectors/1inch/main.sol b/contracts/mainnet/connectors/1inch/main.sol index cc3b7384..a1c3eec0 100644 --- a/contracts/mainnet/connectors/1inch/main.sol +++ b/contracts/mainnet/connectors/1inch/main.sol @@ -25,7 +25,7 @@ abstract contract OneInchResolver is Helpers, Events { assembly { sig := mload(add(_data, 32)) } - isOk = sig == oneInchSig; + isOk = isOk = sig == oneInchSwapSig || sig == oneInchUnoswapSig; } /** @@ -124,5 +124,5 @@ abstract contract OneInch is OneInchResolverHelpers { } contract ConnectV2OneInch is OneInch { - string public name = "1Inch-v1"; + string public name = "1Inch-v1.1"; }