fix: make ENS resolution ENSv2-ready#3008
Open
yashgo0018 wants to merge 2 commits into
Open
Conversation
|
@yashgo0018 is attempting to deploy a commit to the Aave Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR migrates ENS lookups from an ethers-based provider helper to a shared viem-based ENS client.
Changes:
- Removed
getENSProvider(ethersStaticJsonRpcProvider) from network config utilities. - Added
src/utils/ensClient.tsto centralize ENS name/address lookups via viemPublicClient. - Updated ENS consumers (domain fetcher, hooks, and UI inputs) to use the new ENS client and viem address utilities.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/marketsAndNetworksConfig.ts | Removes the legacy ethers ENS provider helper. |
| src/utils/ensClient.ts | Introduces a cached viem PublicClient and ENS lookup/resolve helpers. |
| src/store/utils/domain-fetchers/ens.ts | Switches ENS name lookup to the new viem-based client. |
| src/libs/hooks/use-get-ens.tsx | Replaces ethers utils/provider usage with viem ENS lookup + hashing utilities. |
| src/components/transactions/Bridge/BridgeDestinationInput.tsx | Uses viem isAddress and the new ENS address resolver. |
| src/components/WalletConnection/ReadOnlyModal.tsx | Uses viem isAddress and the new ENS address resolver (removes manual normalize/provider). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ction and bridge components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
General Changes
ensClientutility for mainnet ENS forward and reverse resolution, using the configured mainnet RPC URL and viem's mainnet Universal Resolver address.getENSProviderhelper now that ENS lookups no longer depend onStaticJsonRpcProvider.resolveName/lookupAddress.Developer Notes
viemdependency.resolveEnsAddress, so invalid.ethinput is handled as a failed resolution instead of throwing from UI handlers/effects.Validation
ur.integration-tests.ethresolves to0x2222222222222222222222222222222222222222through a viem Universal Resolver smoke test.0x1111111111111111111111111111111111111111for the same sentinel, so0x2222222222222222222222222222222222222222confirms the Universal Resolver path is being used.Reviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
.env.examplefile as well as the pertinant.github/actions/*files