Waffle-CLI

CLI Explorer for Ethereum Contracts using Alethio API

View on GitHub

Waffle-CLI

An Ethereum CLI explorer curated for smart contract monitoring & much more


Waffle-CLI Explorer :computer: is a CLI tool for Ethereum Developers, created using Aleth.io API. This project was started as a part of Gitcoin’s Beyond Blockchain Hackathon aiming to serve as a CLI block explorer curated for developers to monitor smart contracts & much more.


Setting it up

  1. Clone the repo using git clone https://github.com/tezansahu/Waffle-CLI.git
  2. Use npm install to install all the dependencies
  3. Use npm i -g to install the cli globally so that you can use the command waffle-cli to work with the CLI Explorer. You may need to use sudo for this.
  4. Start using the tool by waffle-cli [command] [options]
  5. While using for the first time, you will be asked for an API key. You could obtain you free Aleth.io API Key by going to https://developers.aleth.io/

Waffle-CLI can also be installed directly from npm using:

$ npm install -g waffle-cli

Waffle-CLI_apiKeySetting

[Use --help to know more about the commands & options]

Commands

Basic Searching :mag:


$ waffle-cli search <identifier>

This allows you to search for any transaction/block hash & for any account/contract address. The search support ENS name resolution as well.


$ waffle-cli account [options]

This can be used to display general details about the account address or ENS domain.

Options:

The filters -s, -f & -t can be used only along with -E or -T.

Examples:

$ alethiocli account 0x2461ad11c10ac35dd8adafd6b0af3aacfaf1c3f5
// Displays basic details about given <address> & 10 latest transactions

$ alethiocli account 0x2461ad11c10ac35dd8adafd6b0af3aacfaf1c3f5 -E -t 0xbae664a51bf25898bc587f8a1c650bebc2ef4cf3
// Displays all ether transfers to <toAddress> from the given <address>

$ alethiocli account 0x2461ad11c10ac35dd8adafd6b0af3aacfaf1c3f5 -T
// Displays all token transfers to/from the given <address>

$ alethiocli account 0x2461ad11c10ac35dd8adafd6b0af3aacfaf1c3f5 -T -s 'DAI'
// Display all DAI token transfers to/from the given <address>

$ alethiocli account 0x2461ad11c10ac35dd8adafd6b0af3aacfaf1c3f5 -T -s 'DAI' -f 0x9ae49c0d7f8f9ef4b864e004fe86ac8294e20950
// Display all DAI token transfers from the <fromAddress> to the given <address>

$ alethiocli account 0x2461ad11c10ac35dd8adafd6b0af3aacfaf1c3f5 -T -t 0x9ae49c0d7f8f9ef4b864e004fe86ac8294e20950
// Display all DAI token transfers to the <toAddress> by the given <address>

$ waffle-cli contract <address> [options]

This command deiplays general details about a contract deployed at the provided address

Options:

Examples:

$ alethiocli contract 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359 -b -c 
// Displays the block details in which the contract creation was recorded along with the creation transaction

$ alethiocli contract 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359 -t 
// Displays 10 latest transactions to the contract

$ alethiocli contract 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359 -e 'Transfer(address,address,value)' -n 50 
// Displays 50 latest events logged by the contract with the given signature

$ alethiocli contract 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359 -f 0x2461AD11C10Ac35Dd8aDAfD6B0Af3AacFAf1C3f5 -n 15 
// Displays 15 latest transactions to the contract made by given account

$ alethiocli contract 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359 -m -s '5 Jul 2019 11:00' -e '5 Jul 2019 13:30'
// Displays contract messages (internal transaction) occuring between 11:00 am & 1:30 pm on 5 July 2019 (according to local timezone)

$ waffle-cli block <identifier> [options]

This command is used to get general details about the block given by the block hash or block number.

Options:


$ waffle-cli transaction <hash>

This command is used to get general details about the transaction given by the hash.


Created with ❤️ by Tezan Sahu & Smit Rajput