ethstat

command module
v0.0.0-...-0a2a6da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

ethstat

Statistics server for the Ethereum network. Parses Ethereum blocks and saves transaction data to Postgres.

Prerequisites

  • Go 1.26+
  • Postgres (default: postgres://postgres:postgres@127.0.0.1:5432/ethstat)

Quick start

# apply migrations
go run . migrate up

# start server
go run . server

Commands

Command Description
go run . server Start HTTP server on :9000
go run . migrate up Apply SQL migrations
go run . migrate down Roll back SQL migrations

Config

Create $HOME/.ethstat.yaml:

pg:
  host: 127.0.0.1
  port: 5432
  user: postgres
  password: postgres
  name: ethstat
  ssl: disable
  pool_size: 100

Or use environment variables: PG_HOST, PG_PORT, PG_USER, PG_PASSWORD, PG_NAME, PG_SSL, PG_POOL_SIZE.

Build & test

make build    # go build
make test     # go test ./...

Lint

golangci-lint run

Docker

docker compose up

Documentation

Overview

Copyright © 2020 Rust Wizard

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
internal
eth
pg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL