Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross chain resolver compatibility with resolver interface and ENS UI #37

Closed

Conversation

Chomtana
Copy link

@Chomtana Chomtana commented Apr 4, 2024

Problem

Screenshot 2567-04-05 at 00 19 02

Current cross chain resolver doesn't implement standard public resolver interfaces (IAddrResolver, IAddressResolver, ITextResolver and IContentHashResolver). Causing ENS UI to not support the cross chain resolver and show a warning on updating the resolver.

Solution

  • Implement function according to IAddrResolver, IAddressResolver, ITextResolver and IContentHashResolver interface
  • Implement IERC165 supportsInterface
  • Implement callback return type handler system based on function signature (If from ExtendedResolver resolve function, return ABI-encoded response, otherwise, return actual response)

Additional Improvements

  • Upgrade version of packages to fix build errors
  • Use workspace:* for evmgateway dependencies

Test

We have tested our L1Resolver contract on https://web.getlaika.app/ and confirmed that it's working correctly on Sepolia <-> OP Sepolia CCIP Read.

Screenshot 2567-04-05 at 02 10 25 Screenshot 2567-04-05 at 02 10 43 Screenshot 2567-04-05 at 02 11 07 Screenshot 2567-04-05 at 02 14 18

However, I can't test on https://app.ens.domains/ because https://ccip-v2.ens.xyz/ post request has frozen forever. So, resolver records aren't loaded.

Note: disputegame.eth name hash is 0x438bfe3fc990665148f8ac1638323ab84054a5c22a1ab61fe63cebc3040129cb

@makoto
Copy link
Member

makoto commented Apr 8, 2024

Hi.
Thank you for the PR but I don't think we should expose the low getter functions (eg: addr, text) mostly because they won't be able to handle wildcard resolve takes dns encoded name and recuresively look for matching target which you cannot do with node

@Chomtana
Copy link
Author

Chomtana commented Apr 8, 2024

image

It seems to be an error on the Cloudflare function that prevents it from being resolved. Wondering why the manual test passed well.

@Chomtana
Copy link
Author

Chomtana commented Apr 9, 2024

That's because of REDACTED part. Changing that to a random wallet works.

I think @chainlink/ccip-read-server doesn't support REDACTED

@Arachnid
Copy link
Member

Arachnid commented Apr 9, 2024

Thank you for the contribution! However, as @makoto points out, this will not work on wildcard names - these methods will only function if the target has been set for the exact name, which is not what we want.

A better solution would be to fix the UI so that it doesn't warn like this on resolvers that implement these interfaces via resolve.

@Chomtana
Copy link
Author

It appear that if we don't implement these addr, text and contenthash interface, ENS UI won't resolve the CCIP at all

ensdomains/ens-app-v3#732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants