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

Normalize ens registry uris #85

Open
njgheorghita opened this issue Feb 12, 2020 · 0 comments
Open

Normalize ens registry uris #85

njgheorghita opened this issue Feb 12, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@njgheorghita
Copy link
Contributor

njgheorghita commented Feb 12, 2020

What was wrong?

When adding a registry uri to the registry store via ethpm registry add [URI] - all uris should be normalized to their form with a checksummed address before being recorded in the registry store, to avoid duplicate registries in the store where one is recorded with its ENS name and the other with its checksum address. The ENS name should be saved as the registry's alias - unless an alias is passed in with a flag. Any URIs using a erc1319 scheme should also be normalized to use the ethpm scheme.

Normalized form.
ethpm://CHECKSUM_ADDR:CHAIN_ID

How can it be fixed?

Most of the code that will need to be changed is in commands/registry.py and update cli tests in tests/cli/test_registry_cli.py and unit tests in tests/core/test_registry.py

It would also be nice to do some minimal validation that a registry contract exists at the given address before adding it to the store

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

No branches or pull requests

1 participant