From e74ded2f8490f1e772b70821c7d88dab421f639a Mon Sep 17 00:00:00 2001 From: sshmatrix Date: Wed, 26 Jul 2023 16:55:09 +0530 Subject: [PATCH] Fixes for bugs in v1-beta --- src/CCIP2ETH.sol | 6 ++++++ src/GatewayManager.sol | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/CCIP2ETH.sol b/src/CCIP2ETH.sol index 5d4f04a..231f7c9 100644 --- a/src/CCIP2ETH.sol +++ b/src/CCIP2ETH.sol @@ -165,6 +165,12 @@ contract CCIP2ETH is iCCIP2ETH { } } address _owner = ENS.owner(_node); + {/* Fix for Ownership-Wrapper compatibility @Bug + // Update ownership if domain is wrapped + if (isWrapper[_owner]) { + _owner = iToken(_owner).ownerOf(uint256(_node)); + } + */} if (_recordhash.length == 0) { // Check if recordhash exists bytes32 _addrhash = keccak256(abi.encodePacked(_owner)); diff --git a/src/GatewayManager.sol b/src/GatewayManager.sol index 35370e1..87329bf 100644 --- a/src/GatewayManager.sol +++ b/src/GatewayManager.sol @@ -127,6 +127,10 @@ contract GatewayManager is iERC173, iGatewayManager { _jsonPath = funcMap[func]; } else if (func == iResolver.text.selector) { _jsonPath = string.concat("text/", abi.decode(data[36:], (string))); + /* Fix for Text Records @Bug + (, string _str) = abi.decode(data[4:], (bytes32, string)); + _jsonPath = string.concat("text/", _str); + */ } else if (func == iOverloadResolver.addr.selector) { _jsonPath = string.concat("address/", uintToString(abi.decode(data[36:], (uint256)))); } else if (func == iResolver.interfaceImplementer.selector) { @@ -135,7 +139,7 @@ contract GatewayManager is iERC173, iGatewayManager { } else if (func == iResolver.ABI.selector) { _jsonPath = string.concat("abi/", uintToString(abi.decode(data[36:], (uint256)))); } else if (func == iResolver.dnsRecord.selector || func == iOverloadResolver.dnsRecord.selector) { - // e.g, `.well-known/eth/domain/dns/.json` + // e.g. .well-known/eth/domain/dns/.json uint256 resource; if (data.length == 100) { // 4 + 32 + 32 + 32 = 100