Add ENS utility library for mainnet address resolution#156
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
Add ENS utility library for mainnet address resolution#156devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- Add ENSClient class for resolving ENS names to Ethereum addresses - Add ENSResolution and ReverseENSResolution Pydantic models - Support both forward and reverse ENS resolution - Include input validation and error handling - Add web3.py dependency for onchain ENS lookups - Follow established patterns from ArbiScan utilities Co-Authored-By: talosgma@gmail.com <talosgma@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
Author
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
ccf2936 to
015ec79
Compare
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.
Add ENS utility library for mainnet address resolution
Summary
This PR introduces a standalone ENS (Ethereum Name Service) utility library for resolving ENS names to Ethereum addresses on mainnet. The implementation follows the established patterns from the existing ArbiScan utilities and includes:
The library supports custom RPC providers via environment variables (INFURA_PROJECT_ID) with fallback to public endpoints.
Review & Testing Checklist for Human
Recommended test plan: Run the included
test_ens_utility.pyscript and verify it handles both successful resolutions and graceful error handling for network issues.Diagram
%%{ init : { "theme" : "default" }}%% flowchart TD pyproject["pyproject.toml<br/>+web3 dependency"]:::minor-edit ens_models["src/talos/models/ens.py<br/>ENSResolution models"]:::major-edit ens_utils["src/talos/utils/ens.py<br/>ENSClient + utilities"]:::major-edit arbiscan_utils["src/talos/utils/arbiscan.py<br/>ArbiScanClient pattern"]:::context arbiscan_models["src/talos/models/arbiscan.py<br/>Pydantic models pattern"]:::context validation["src/talos/utils/validation.py<br/>sanitize_user_input"]:::context ens_utils --> ens_models ens_utils --> validation ens_models -.-> arbiscan_models ens_utils -.-> arbiscan_utils pyproject --> ens_utils subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#F5F5F5Notes
type: ignore[union-attr]comments for web3.py's complex union types - this is a known limitation of web3.py's type annotations.Session details: Requested by @talos-agent
Link to Devin run: https://app.devin.ai/sessions/ade086eff99240beb646051dfe16da92