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

Support Universal Resolver for looking up name / reverse records for ENS #4684

Open
tornadocontrib opened this issue Apr 10, 2024 · 3 comments
Labels
enhancement New feature or improvement.

Comments

@tornadocontrib
Copy link

Describe the Feature

Currently resolving ENS names with ethers.js is very slow due to not supporting universal resolver yet.

If the universal resolver contract is deployed for the chain ( currently mainnet and sepolia supports it , see https://github.com/ensdomains/ensjs-v3/blob/main/packages/ensjs/src/contracts/consts.ts for the full list of it ), it would be able to support multicall like batched calls without waiting for another call like how the current name resolving on ethers.js does it.

This would also speedup overall process of the ethers.js components which uses ens.

You can see some examples on https://github.com/wevm/viem/blob/main/src/actions/ens/getEnsAddress.ts and https://github.com/wevm/viem/blob/main/src/actions/ens/getEnsResolver.ts of how the universal resolver works.

Or on https://github.com/ensdomains/ensjs-v3/blob/main/docs/basics/batching-calls.md for docs.

Code Example

No response

@tornadocontrib tornadocontrib added the enhancement New feature or improvement. label Apr 10, 2024
@tornadocontrib
Copy link
Author

tornadocontrib commented Apr 10, 2024

cc @ricmoo I think this is very crucial task and should be implemented as soon as possible. Also right now none of the other libraries of ENS supports this as they only support viem right now.

@ricmoo
Copy link
Member

ricmoo commented Apr 10, 2024

Thanks! I hadn’t heard of this. Are the calls to the universal resolver done sequentially on-chain? I’m curious how the Ethers MulticallProvider works with this.

@tornadocontrib
Copy link
Author

tornadocontrib commented Apr 10, 2024

@ricmoo For the usecase of ethers.js you don't need multicall to query those records unless if we want to support an array of names or addresses. However, the universal resolver could solve the necessity of multiple eth_calls sent to the nodes to query a name or an address because we don't need to connect an additional resolver contract per name.

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

No branches or pull requests

2 participants