Hanzo
Hanzo Skills Reference

Hanzo Explorer

Hanzo Explorer is an EVM blockchain explorer for inspecting and analyzing transactions, accounts, smart contracts, and tokens on Lux Network and other EVM-compatible chains. It is a fork of Blocksc...

Overview

Hanzo Explorer is an EVM blockchain explorer for inspecting and analyzing transactions, accounts, smart contracts, and tokens on Lux Network and other EVM-compatible chains. It is a fork of Blockscout (v8.1.1), an open-source alternative to Etherscan. Built with Elixir/Phoenix (backend) and a separate frontend, it provides full blockchain indexing, smart contract verification, and a REST/GraphQL API. Includes Lux-specific Docker configurations for mainnet deployment.

Why Hanzo Explorer?

  • Full EVM support: Transactions, accounts, balances, tokens (ERC-20/721/1155), internal transactions
  • Smart contract verification: Solidity source verification and interaction UI
  • GraphQL + REST API: Programmatic access to all indexed blockchain data
  • NFT media handling: Dedicated media handler for NFT assets
  • Lux-native: Pre-built Docker configs for Lux mainnet/testnet
  • Microservices: Stats, visualizer (Sol2UML), sig-provider, user-ops-indexer

Tech Stack

  • Backend: Elixir 1.17.3 + OTP 27 (Phoenix framework)
  • Database: PostgreSQL 14+
  • Cache: Redis
  • Frontend: Node.js 20.17 (separate Blockscout frontend)
  • Indexer: Custom blockchain indexer (Elixir)
  • JSON-RPC: ethereum_jsonrpc client for EVM nodes
  • Deployment: Docker Compose, Kubernetes, Ansible
  • Microservices: Rust-based (stats, visualizer, sig-provider, user-ops-indexer)
  • CI: CircleCI

OSS Base

Repo: hanzoai/explorer (fork of blockscout/blockscout). GPL v3.0 License.

When to use

  • Deploying a block explorer for Lux Network or any EVM chain
  • Indexing and querying blockchain data (transactions, tokens, contracts)
  • Verifying and interacting with smart contracts
  • Building analytics dashboards on top of blockchain data
  • Running a self-hosted alternative to Etherscan

Hard requirements

  1. Elixir 1.17+ with OTP 27
  2. PostgreSQL 14+ for blockchain data storage
  3. Redis for caching
  4. Running EVM JSON-RPC node (Lux, Geth, Erigon, etc.)
  5. Node.js 20+ for frontend build

Quick reference

ItemValue
Repogithub.com/hanzoai/explorer
Branchmaster
Version8.1.1
BackendElixir 1.17 + Phoenix
DatabasePostgreSQL 14+
LicenseGPL v3.0
Upstreamblockscout/blockscout

One-file quickstart

Docker Compose (quickest)

# Standard EVM chain
cd docker-compose
docker-compose up --build

# Lux mainnet specific
cd docker-luxnet
docker-compose -f explorer.yml up -d

Manual development

# Install Elixir dependencies
mix deps.get

# Create and migrate database
mix ecto.create && mix ecto.migrate

# Start the server
mix phx.server

Core Concepts

Architecture

hanzoai/explorer/
  apps/                         Umbrella Elixir apps
    block_scout_web/            Phoenix web app (API + UI)
    ethereum_jsonrpc/           JSON-RPC client for EVM nodes
    explorer/                   Core data models + indexing logic
    indexer/                    Blockchain indexer (blocks, txs, tokens)
    nft_media_handler/          NFT media processing
    utils/                      Shared utilities
  config/                       Elixir configuration
  docker-compose/               Generic Docker configs
    docker-compose.yml          Standard setup (Postgres, Redis, backend, frontend, nginx)
    erigon.yml                  Erigon JSON-RPC client config
    geth.yml                    Geth JSON-RPC client config
    hardhat-network.yml         HardHat dev network config
    microservices.yml           Stats, visualizer, sig-provider
    envs/                       Environment variable files
  docker-luxnet/                Lux Network specific configs
    explorer.yml                Lux mainnet explorer compose
    microservices.yml           Lux microservices compose
    services/                   Service definitions
  docker-testnet/               Testnet configurations
  docker/                       Dockerfile and build configs
  rel/                          Elixir release configuration
  bin/                          Helper scripts
  mix.exs                       Umbrella project definition

Umbrella Apps

AppPurpose
block_scout_webPhoenix web application, REST API, GraphQL API
ethereum_jsonrpcJSON-RPC client for communicating with EVM nodes
explorerCore domain logic, Ecto schemas, chain data models
indexerReal-time blockchain indexer (blocks, transactions, tokens, logs)
nft_media_handlerNFT image/media fetching and processing
utilsShared utility functions

Microservices (Rust)

ServicePurpose
StatsChain statistics and analytics
Sol2UML VisualizerSolidity contract visualization
Sig-providerFunction signature decoding
User-ops-indexerERC-4337 account abstraction indexing

Docker Compose Configs

ConfigUse Case
docker-compose.ymlStandard full setup with all services
erigon.ymlErigon JSON-RPC backend
geth.ymlGeth/Reth JSON-RPC backend
geth-clique-consensus.ymlGeth with Clique PoA
hardhat-network.ymlHardHat local dev network
external-db.ymlExplorer with external PostgreSQL
external-backend.ymlFrontend with external API
external-frontend.ymlBackend with external frontend
microservices.ymlAll Rust microservices
no-services.ymlExplorer only, no microservices

Environment Variables

# Backend (in docker-compose/envs/common-blockscout.env)
DATABASE_URL=postgresql://user:pass@postgres:5432/blockscout
ETHEREUM_JSONRPC_VARIANT=geth
ETHEREUM_JSONRPC_HTTP_URL=http://host.docker.internal:8545
ETHEREUM_JSONRPC_WS_URL=ws://host.docker.internal:8546

# Frontend (in docker-compose/envs/common-frontend.env)
NEXT_PUBLIC_API_HOST=localhost
NEXT_PUBLIC_API_PORT=80

Lux Network Integration

The docker-luxnet/ directory contains Lux-specific configurations for connecting to Lux Network's EVM-compatible C-Chain. These configs are pre-tuned for Lux's block times, gas model, and RPC endpoints.

Troubleshooting

IssueCauseSolution
Indexer not syncingWrong JSON-RPC URLVerify ETHEREUM_JSONRPC_HTTP_URL points to running node
DB connection errorPostgreSQL not readyWait for DB startup or check DATABASE_URL
Frontend blankAPI URL mismatchCheck NEXT_PUBLIC_API_HOST matches backend
Linux localhost issueDocker networkingUse http://0.0.0.0/ instead of http://127.0.0.1/
  • hanzo/hanzo-evm.md - Hanzo EVM execution engine (Rust, reth fork)
  • hanzo/hanzo-network.md - Lux/Hanzo network infrastructure
  • hanzo/hanzo-web3.md - Web3 services and gateway
  • hanzo/hanzo-contracts.md - Smart contract development

How is this guide?

Last updated on

On this page