eth-cli 2.0 (beta) – Franco Victorio

0 39

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
$ eth address:balance --rinkeby 0x0000000000000000000000000000000000000000

to powerful ones like contract:call:

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

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

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 ''
$ eth block:number --network xdai

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

You might also like
WhatsApp chat