alisinabh

alisinabh

Ethers - a comprehensive Web3 library for interacting with smart contracts on Ethereum using Elixir

Hello Elixir community!

I am excited to announce the release of a new Elixir library for interacting with the Ethereum blockchain: Ethers!

Ethers is heavily inspired by the popular ethers.js library and aims to provide a comprehensive and easy-to-use solution for Elixir developers working with Ethereum smart contracts. With Ethers, you can effortlessly interact with Ethereum contracts using automatically generated Elixir modules, complete with documentation and type-specs.

Here are some of the key features that differentiate Ethers from other Ethereum Clients.

  • Compile-time contract ABI to Elixir module conversion. This means it is faster in runtime and easier to use than other libraries like exw3
  • Out of the box support for standard contract interfaces such as ERC20, ERC721, ERC1155 and ERC777
  • Easy contract function calling and transaction sending
  • Simple log fetching and event filter creation
  • Developer first experience with typespecs and generated documentation
  • Portable RPC modules (Want to use a different RPC or want to add a feature to the RPC? You can swap it with your own)

Right now this is considered beta-testing release. I would encourage and also ask everybody who is interested to interact with and test Ethers. Did I mentioned that contribution is really welcomed?

Happy coding!

GitHub: alisinabh/elixir_ethers
Hex: ethers
Hexdocs

Most Liked

alisinabh

alisinabh

Ethers version 0.0.1 of Ethers is now published on hex.pm/packages/ethers.

This initial beta version is now shipped with the following functionalities.

  • Contract function generation during compile time from ABIs.
  • Ability to deploy a contract with its byte-code and constructor.
  • Common contract interfaces like ERC20, ERC721, ERC777 and ERC1155. (built-ins)
  • ENS and other name services resolve functionality and contracts.
  • Implicit type conversion and common type utility functions.

Feel free to give it a try and file your issues in github or your suggestions here.

alisinabh

alisinabh

Ethers 0.2.0 is out. This version adds new features which helps users to sign transactions locally, with JSON RPC endpoints or even bring their own signer implementation (e.g. using AWS KMS or proprietary HSM modules).

Please feel free to try it out and share your feedback.

Thanks!

alisinabh

alisinabh

By default on EVM chains when you issue a getLogs call you get logs from the last block only. You need to specify fromBlock and toBlock values. (Example below)

{:ok, current_block} = Ethers.current_block_number()
Ethers.get_logs!(
  filter, 
  fromBlock: current_block_number - 128, 
  toBlock: current_block_number
)

I can see there is a gap in the docs regarding these parameters. Will create an issue to track and fix this.

Thank you for introducing W3WS to me. Didn’t know about that!

Where Next?

Popular in Announcing Top

wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
mathieuprog
Hello :waving_hand: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First a...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 10342 134
New
mikehostetler
I’m excited to announce Jido, a framework providing foundational primitives for building autonomous agent systems in Elixir. While develo...
New
bryanjos
Hi, I just published version 0.23.0 of Elixirscript. https://github.com/bryanjos/elixirscript/blob/master/CHANGELOG.md Most of the chan...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps w...
New
sabiwara
Dune is a sandbox for Elixir and aims to safely evaluate user-provided code. You can try it out using this basic Elixir playground made ...
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
Hal9000
Here is my first stab at this. README pasted below. https://github.com/Hal9000/elixir_random Comments and critiques are welcome. Thank...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement