feat(FnameResolver): Add support for ENS name resolution#466
Open
VolodymyrBg wants to merge 1 commit intofarcasterxyz:mainfrom
Open
feat(FnameResolver): Add support for ENS name resolution#466VolodymyrBg wants to merge 1 commit intofarcasterxyz:mainfrom
VolodymyrBg wants to merge 1 commit intofarcasterxyz:mainfrom
Conversation
This PR adds support for the ENS name resolution function to the FnameResolver contract. Previously, the resolver only supported the addr(bytes32) function, but now it also supports the name(bytes32) function, which allows reverse resolution from addresses to names. This makes the resolver more compliant with ENS standards and improves its functionality. The implementation: 1. Adds a new INameQuery interface with the name function 2. Updates the resolve function to accept name function calls 3. Modifies resolveWithProof to return different data based on the original function call 4. Adds tests to verify the new functionality Fixes the "ResolverFunctionNotSupported" error that was previously thrown for all non-addr function calls, as indicated in the code comment.
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.
This PR adds support for the ENS name resolution function to the FnameResolver contract.
Previously, the resolver only supported the addr(bytes32) function, but now it also supports the name(bytes32) function, which allows reverse resolution from addresses to names. This makes the resolver more compliant with ENS standards and improves its functionality.
The implementation:
Fixes the "ResolverFunctionNotSupported" error that was previously thrown for all non-addr function calls, as indicated in the code comment.
PR-Codex overview
This PR introduces a new interface
INameQueryfor name resolution in theFnameResolvercontract and updates theresolveandresolveWithProoffunctions to support both address and name resolution.Detailed summary
INameQuerywith functionname(bytes32 node).resolvefunction to support name resolution.resolveWithProoffunction to acceptextraDataand determine the original function called.resolveWithProofto include the fname when requested.