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

feat: Allow ENS resolver to answer more queries #464

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gskril
Copy link

@gskril gskril commented Feb 8, 2025

Motivation

Accompanies farcasterxyz/fname-registry#505 to make nice ENS profiles from fnames. I also added additional checks on the CCIP Read callback function for extra safety.

I wasn't sure what the version should be, so left that untouched for now.

Change Summary

Adds support for addr(node, cointype) and text(node, key) lookups by changing the EIP-712 type.

Merge Checklist


PR-Codex overview

This PR focuses on enhancing the FnameResolver contract and its related tests by introducing new parameters, modifying function signatures, and improving error handling for resolver functions.

Detailed summary

  • Updated pre-commit hook in .rusty-hook.toml.
  • Added FNAME_RESOLVER_DNS_ENCODED_NAME and FNAME_RESOLVER_PASSTHROUGH_ADDRESS environment variables.
  • Modified DeploymentParams struct and runDeploy function in script/DeployL1.s.sol.
  • Enhanced the FnameResolver contract with new mappings for allowed functions and text records.
  • Updated resolve and resolveWithProof functions to improve validation and error handling.
  • Added a MockResolver contract for testing purposes.
  • Revised test cases in FnameResolverTest to cover new functionality and edge cases.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@gskril gskril marked this pull request as ready for review February 9, 2025 00:06
@gskril
Copy link
Author

gskril commented Feb 10, 2025

Adding note to self that I can implement in the morning: if the name arg in resolve() is farcaster.eth, we should pass that request to the ENS public resolver. This allows the farcaster.eth name itself to have onchain records while all subnames read from the fname registry.

Edit: implemented this. The owner of farcaster.eth can set records on the ENS public resolver (resolver.eth) even if the name uses a different resolver, and requests will pass through seamlessly. Figured this was cleaner than adding all the relevant code to the FnameResolver directly.

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

Successfully merging this pull request may close these issues.

1 participant