ensdomains / evmgateway

This repository implements a generic CCIP-Read gateway for fetching state proofs of data on other EVM chains. The intended use is for contracts on L1 to be able to fetch and verify data from contracts on L2 in a read context.
MIT License
128 stars 28 forks source link

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

Closed Chomtana closed 4 months ago

Chomtana commented 5 months ago

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

Additional Improvements

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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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

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

Arachnid commented 4 months ago

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 commented 3 months ago

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

https://github.com/ensdomains/ens-app-v3/issues/732