Skip to content

Commit

Permalink
Fixes for bugs in v1-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
sshmatrix committed Jul 26, 2023
1 parent 6a5526a commit e74ded2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/CCIP2ETH.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
6 changes: 5 additions & 1 deletion src/GatewayManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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/<record>.json`
// e.g. .well-known/eth/domain/dns/<record>.json
uint256 resource;
if (data.length == 100) {
// 4 + 32 + 32 + 32 = 100
Expand Down

0 comments on commit e74ded2

Please sign in to comment.