eth-cli 2.0 (beta) – Franco Victorio

0 34


eth-cli 2.0.0-beta is now available at npm! To try it out, use npm to install the next version:

npm i -g eth-cli@next

eth-cli is a collection of command line tools for Ethereum developers. Check the readme to find out more.

2.0 adds a bunch of new commands, from simple ones like block:number and address:balance:

$ eth block:number --mainnet
8713998
$ eth address:balance --rinkeby 0x0000000000000000000000000000000000000000
1100.2658

to powerful ones like contract:call:

$ eth contract:call --mainnet erc20 'totalSupply()' 0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359
85381767150786278594489310

Just run eth to see all the commands, and eth help <command> to find out more about each one.

We added experimental support for Human-Readable ABIs, powered by the amazing work of the ethers.js team. Now instead of passing an ABI file or the name of an added ABI, you can just do:

$ eth contract:call --mainnet 'function balanceOf(address) returns (uint)' 'balanceOf("0x0000000000000000000000000000000000000000")' 0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359
57745154339762891643733

The main breaking change is that the --url flag was replaced by --network (or -n ). This better reflects the fact that you can now add custom networks and use them in any command:

$ eth network:add xdai --url 'https://dai.poa.network'
$ eth block:number --network xdai
6213579

Found a bug? Have some suggestions? Just open an issue and let us know!

You might also like

Pin It on Pinterest

Share This

Share this post with your friends!

WhatsApp chat