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

refactor: use native contract functionality to perform lookups #9

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fubuloubu
Copy link
Member

What I did

fixes: #7

How I did it

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@fubuloubu fubuloubu mentioned this pull request Feb 14, 2022
4 tasks
@fubuloubu
Copy link
Member Author

Note: this would serve both as an ENS conversion plugin, and also as an SDK for working with ENS contracts!

pass


def normalize_name(name: str) -> str:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add note about copying from web3py, as well as using EIP-162 to design functionality.


# NOTE: ENS Only references data from Ethereum Mainnet
registrar_deployment = list(ENS_PACKAGE.deployments.values())[0]["Registrar"]
with self.networks.ethereum.mainnet.use_provider(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are already connected to mainnet, we could just use the active provider and not have to make 2 connections

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, although this seems like an optimization to make to the context manager

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.

bug: ENS plugin only works on mainnet
2 participants