Practical overview
When it fits
Use Ethrpc when a Go application needs to call Ethereum JSON-RPC methods through an endpoint, especially for chain queries, transaction workflows or log filtering.
Who it is for
- Go developers building applications that need Ethereum JSON-RPC access.
- Teams implementing blockchain data queries, transaction submission or event-log monitoring in Go.
Documented uses
- Read account balances, blocks, transactions and transaction receipts.
- Check node and network information such as client version, peer count and sync status.
- Estimate gas, call contracts, and submit transactions through the connected endpoint.
- Create filters and retrieve filter changes or Ethereum logs.
Requirements & limits
The public GitHub repository specifies an MIT license.
- The application must provide an Ethereum JSON-RPC endpoint; the README example uses a local endpoint.
- The method list marks some RPC calls as unavailable and compiler-related calls as deprecated, so check required method coverage.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Connect a Go program to an Ethereum JSON-RPC endpoint
Create an Ethrpc client and request the endpoint's Web3 client version.
Before you start
- A Go application that imports github.com/onrik/ethrpc
- An Ethereum JSON-RPC endpoint address
Steps
Create a client with ethrpc.New and the endpoint address.
Call client.Web3ClientVersion().
Handle the returned error and use the version value.
Expected outcome
The program can request and log the connected node's client version, as shown in the README.
Guide limitations
- The example does not set up or provide an Ethereum node.
- The documented example uses a local endpoint at http://127.0.0.1:8545.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- onrik/ethrpc · Official homepage title · retained in its source language

