-
Notifications
You must be signed in to change notification settings - Fork 269
Add Elixir Ethers library #365
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
base: master
Are you sure you want to change the base?
Conversation
Hey @gskril, Any chance of this getting merged? |
Hey @alisinabh sorry for the slow review here. Does Elixir Ethers support resolving ENS data (like I could be missing something in which case I'm happy to merge. |
No worries at all.
Yes, this library supports specific ENS resolve and reverse resolve functionalities in it's Ethers.NameService module. As an example, one can resolve address of a given ens name like this Ethers.NameService.resolve("vitalik.eth")
# Result
{:ok, "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"} It also supports things like: Reverse resolve and CCIP read. You can read more about it here: https://hexdocs.pm/ethers/Ethers.NameService.html
Ethers is a swiss-army knife library for interacting with EVM chains using Elixir. It supports contract calls, ENS, Multicall, Signers, CCIP etc. It is not a ENS only library and if it is against your guidelines I understand. If you have any other questions or need more examples I would be happy to answer :) |
Awesome, I was able to get it running locally and confirm the result for vitalik.eth! I'm having trouble resolving the ETH address for names that use resolvers with CCIP Read, though. See below: Ethers.NameService.resolve("greg.offchaindemo.eth")
** (ArgumentError) Invalid HEX input <<59, 59, 87, 222, 24, 34, 255, 90, 46, 84, 75, 64, 8, 219, 168, 147, 84, 214, 234, 243, 170, 139, 201, 148, 123, 252, 249, 205, 224, 93, 48, 108, 64, 33, 63, 113>>
(ethers 0.6.5) lib/ethers/utils.ex:64: Ethers.Utils.hex_decode!/1
(ethers 0.6.5) lib/ethers/name_service.ex:90: Ethers.NameService.ensip10_resolve/3
(ethers 0.6.5) lib/ethers/name_service.ex:66: Ethers.NameService.do_resolve/3
iex:3: (file) |
@gskril Thank you for reporting this. This was a bug caused by a recent refactor. |
Hi,
This PR adds Elixir Ethers library to the libraries section. Ethers directly implements ENS Resolution as part of its public API.
Thank you