Practical overview
When it fits
Use it when a Go application needs a plugin-based listener to gather specified Ethereum data and deliver event updates to application logic.
Who it is for
- Go developers building applications that need to react to Ethereum events.
- Teams tracking smart-contract activity for application state, analytics, or transaction status.
Documented uses
- Listen for new blocks and selected contract events such as ERC-20 transfers.
- Track historical Ethereum activity for analysis or application state reconstruction.
- Pass transaction or receipt updates into workflows that update positions, calculations, balances, or histories.
Requirements & limits
The project is public source code under the Apache-2.0 license. The README gives a Go installation command and documents sample Docker commands.
- The library is designed to be extended with plugins for the event types and data an application needs.
- Its documented watcher polls newly mined blocks through an HTTP client, so an Ethereum endpoint is part of the integration setup.
- The README describes revert messages for fork-affected updates, relevant to applications that must revise downstream state.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Listen for new Ethereum block numbers in Go
Create a watcher that prints numbers for newly mined Ethereum blocks.
Before you start
- A Go development environment.
- An Ethereum HTTP API URL; the README example uses an Infura mainnet URL.
Steps
Create a Go program and construct an HTTP-based Ethereum watcher with a context and the API URL.
Register a block-number plugin with a callback that prints the block number and removal flag.
Call
RunTillExit()to run the watcher.
Expected outcome
The example is designed to print block numbers and their removal flags as new blocks are observed.
Guide limitations
- The README example uses a specific Infura URL; it does not document how to obtain or configure API credentials.
- The example is for newly mined blocks, not historical event retrieval.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- HydroProtocol/ethereum-watcher · Official homepage title · retained in its source language

