Skip to content

Normalize ens registry uris  #85

@njgheorghita

Description

@njgheorghita

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions