event-tail

A CLI tool that provides a real-time `tail -f` style stream of smart contract events from any EVM network.


Usage

The tool connects to a WebSocket RPC endpoint and listens for new logs matching your specified contract address and event name.

Basic Example

To monitor the Transfer event on a specific ERC721 contract, you would run:


event-tail --address 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D \
           --event Transfer \
           --rpc-url wss://mainnet.alchemy.io/ws/YOUR_KEY
                    

ABI Resolution

event-tail needs the contract's ABI to decode event logs. It can get this in two ways:

  1. From Etherscan (Recommended): If you provide an --etherscan-api-key, the tool will automatically fetch the ABI for any verified contract.
  2. From a Local File: You can provide a path to a local JSON artifact file using --abi-path.

Options

  • --address <ADDRESS>: The smart contract address to monitor. (Required)
  • --event <NAME>: The name of the event to listen for (e.g., 'Transfer'). (Required)
  • --rpc-url <URL>: The WebSocket RPC URL (must start with wss://). (Required)
  • --etherscan-api-key <KEY>: Your Etherscan API key for automatic ABI fetching.
  • --abi-path <PATH>: The local path to the contract's JSON ABI or artifact file.