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 ENS provider, catch more exceptions from 4byte.direcotry #71

Merged
merged 13 commits into from Nov 2, 2021

Conversation

kchojn
Copy link
Collaborator

@kchojn kchojn commented Oct 17, 2021

  • Refactored ENS provider, each time a new ens object is taken
  • Catch more exceptions from 4byte.directory (looks like the service is not always working properly)
  • Added more logging
  • Added more exceptions.

Comment on lines 25 to 30
def name(self, provider: Callable, address: Any):
...

@abstractmethod
def address(self, name: Any):
def address(self, provider: Callable, name: Any):
...
Copy link
Contributor

Choose a reason for hiding this comment

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

Types should not be Callable but Web3

Copy link
Collaborator Author

@kchojn kchojn Oct 25, 2021

Choose a reason for hiding this comment

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

Its an abstract base class, all ens resolvers need some provider. Web3Ens got an exact type - Web3

Copy link
Contributor

Choose a reason for hiding this comment

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

Callable is type that implements call method afaik, Web3 does not have it.

Copy link
Contributor

@piotr-rudnik piotr-rudnik left a comment

Choose a reason for hiding this comment

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

Let's talk about this web3 name resolving more, don't reallty now how this will fit in greater scheme of things in what we want to achieve with this.

Comment on lines 25 to 30
def name(self, provider: Callable, address: Any):
...

@abstractmethod
def address(self, name: Any):
def address(self, provider: Callable, name: Any):
...
Copy link
Contributor

Choose a reason for hiding this comment

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

Callable is type that implements call method afaik, Web3 does not have it.

@kchojn kchojn merged commit 4c3e6b4 into EthTx:master Nov 2, 2021
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.

None yet

2 participants