Introduction

lazy-etherscan is an Ethereum blockchain explorer that can be used from your terminal.

Features

  • No Browser Required - Use it effortlessly even in environments where browsers are unavailable, such as within servers.
  • Developer Friendly - Operate efficiently using keyboard shortcuts.
  • Easily Switch Endpoints - Switch between endpoints, including Mainnet, Testnets, custom node connections, and even BSC endpoints.
  • Rich Search Functionality - You can search by the following words.
    • Address
    • Block Number
    • ENS ID
    • Transaction Hash
    • Ticker Name (USDT, BNB,UNI, ...)

User Guide

Installation

This software has been tested and verified to work correctly on the following operating systems:

  • Ubuntu 22.04.2 LTS
  • macOS Ventura 13.2

Prerequisites

Optional: Etherscan API Key

To see statistics information about Ethereum, you have to set an Etherscan's free API key. You can get it from here. And add it to your environment variables. If you are using zsh, run the following command.

$ echo 'export ETHERSCAN_API_KEY=XXXXXXXXXXXX' >> ~/.zshenv

Optional: ethereum-input-data-decoder

To see transactions' decoded input data, you have to preinstall ethereum-input-data-decoder. Please run the following command.

$ npm install -g ethereum-input-data-decoder

Installation using Cargo

$ cargo install lazy-etherscan
$ lazy-etherscan

Build from source

$ git clone https://github.com/woxjro/lazy-etherscan --recursive
$ cd lazy-etherscan
$ cargo run --

Configuration

Endpoint

The default endpoint is https://eth.public-rpc.com, and you can also set your preferred endpoint. You can find free endpoints from ChainList. To set your endpoint, run with a --endpoint option.

$ lazy-etherscan --endpoint=https://rpc.flashbots.net

In the case of the L2 blockchain networks and BSC RPC endpoints listed below, it has been confirmed that this software works to some extent.

Other Configuration

To check other configurations, run the following command.

$ lazy-etherscan --help

Usage

The basic usage is as follows:

  • Press q to exit lazy-etherscan.
  • Press s to focus on the search bar. You can search by the following words.
    • Address
    • Block Number
    • ENS ID
    • Transaction Hash
    • Ticker Name (USDT, BNB,UNI, ...)
  • Press 1 to navigate the Latest Blocks panel. Use j to move to a block below and k to an above block.
    • Press r to refresh the Latest Blocks.
  • Press 2 to navigate the Latest Transactions panel. Use j to move to a transaction below and k to move to a transaction above.
    • Press r to refresh the Latest Transactions.
  • Press <Ctrl+e> to toggle the sidebar.
  • Press <Ctrl+p> to move to a previous screen.

Examples

Searching by Tickers

Here is an example of searching with USDT.

Press s to focus on the search bar. Then, press i to enter edit mode. Type USDT and press Enter.

On the search results screen, the left side displays the source code of the contract, and the right side shows the contract's ABI. You can navigate between them using the left and right arrow keys. Scroll through the focused elements using the j/k keys.

demo

Additionally, you can toggle the sidebar by pressing <Ctrl+e>, allowing you to view both the source code and ABI simultaneously, as shown in the image below:

demo

Exploring a Block

Next, let's explore how to investigate blocks.

You can input the block number in the search bar or select it from the Latest Blocks pane to navigate to the Block Details screen.

Use j/k to navigate between selectable items such as Transactions, Withdrawals, Fee Recipient, and Parent Hash.

For example, selecting Transactions and pressing Enter will take you to a pane displaying a list of transactions in the block.

demo

Moreover, pressing <Ctrl+e> toggles the sidebar, revealing more detailed information about the transaction list.

demo

Contributors

Made with contrib.rocks.