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

[ethpm] Support ENS in Registry URIs #1489

Merged

Conversation

njgheorghita
Copy link
Contributor

@njgheorghita njgheorghita commented Nov 1, 2019

What was wrong?

ENS support was needed in ERC1319 URIs.

Todo:

Cute Animal Picture

image

@njgheorghita njgheorghita changed the title Support ens in Registry URIs [ethpm] Support ENS in Registry URIs Nov 1, 2019
@njgheorghita njgheorghita force-pushed the ethpm-support-ens-in-registry-uri branch 3 times, most recently from fc89b2a to 3c99fcb Compare November 1, 2019 15:40
@njgheorghita
Copy link
Contributor Author

ping @pipermerriam for 👀

if ns.address(address_or_ens):
address = ns.address(address_or_ens)
ens = address_or_ens
elif is_address(address_or_ens):
Copy link
Member

Choose a reason for hiding this comment

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

Seems like you might want this one to come first in the if/elif ordering since it's a simpler check and might be the more common case.

@@ -78,11 +82,23 @@ def parse_registry_uri(uri: str) -> RegistryURI:
"""
Validate and return (authority, pkg name, version) from a valid registry URI
"""
from web3.auto.infura import w3
Copy link
Member

Choose a reason for hiding this comment

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

It would be ideal if we could setup a test chain and install the ENS infrastructure on it easily so that we could test this stuff locally without hitting infura. Maybe that's a project for the Web3.py codebase to support under something like web3.tools for doing one-step setup of all of the ENS contracts on a development chain.

@njgheorghita njgheorghita force-pushed the ethpm-support-ens-in-registry-uri branch from 3c99fcb to f263445 Compare November 8, 2019 00:27
@njgheorghita njgheorghita merged commit f4bac7f into ethereum:master Nov 8, 2019
@njgheorghita njgheorghita deleted the ethpm-support-ens-in-registry-uri branch November 8, 2019 00:45
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.

2 participants