-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add 'get_text' method to look up ENS text record values #2286
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR! The code looks solid, but it will need a test before we merge. Let me know if you want some direction in that regard!
Edit: The failing integration tests are just flaky, so feel free to ignore timeout errors on those.
|
I can add tests, no problem. Would this be the correct file to do so? https://github.com/ethereum/web3.py/blob/master/tests/ens/test_ens.py I noticed in other places in your tests code it was using Can use an alternative, just concerned that if the text record is changed in future it may result in failed test. |
|
Thanks for the bump @payton! @smk762 sorry, I don't know how I missed this! We get a lot of issues so feel free to bump if you haven't heard in a few days.
It looks like the public API methods all have their own file in tests/ens, so I would just make a new file and add tests there.
I would just use an alternative if there is one, maybe one that seems like it has staying power :) if tests fail, we can re-evaluate. Thank you! |
|
I started working on tests for this, and realized that we probably need a |
|
Just kidding about the separate PR, they're more inter-related than I thought. I'll just add to this PR. |
What was wrong?
Noticed this at https://docs.ens.domains/dapp-developer-guide/resolving-names
How was it fixed?
Usage:
ns.get_text('dragonhound.eth', "avatar")Returns:
https://i.imgur.com/gAD7BxX.jpgTodo:
Cute Animal Picture