feat(FnameResolver): Add support for ENS name resolution #466
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
INameQuery
for name resolution in theFnameResolver
contract and updates theresolve
andresolveWithProof
functions to support both address and name resolution.Detailed summary
INameQuery
with functionname(bytes32 node)
.resolve
function to support name resolution.resolveWithProof
function to acceptextraData
and determine the original function called.resolveWithProof
to include the fname when requested.