Files
explorer/chains.example.yaml
T
zeekayandHanzo Dev 066916145d fix(explorer): balances from the chain; one source for sibling hostnames
indexer v1.4.6 -> v1.4.7 and pass the chain's RPC to the standalone API, so
native-coin balances are read from the node rather than from
evm_addresses.balance — a column the indexer writes as the literal '0' on
first sight and never updates. Every address page reported a balance of
zero, WLUX's 159,126,795.518 LUX included. v1.4.7 also counts token holders
and transfers from the rows that hold them, stops calling the base fee
"burnt" on a chain that credits the whole fee to the coinbase, and returns
addresses on the evm_* schema instead of an empty page.

The network switcher advertised testnet.explore.lux.network and
devnet.explore.lux.network. Neither resolves; the live hosts are
explorer.lux-{test,dev}.network. networksForHost already derives sibling
hostnames from the request host and derives them correctly, so the
switcher now takes its domains from there and config keeps only what
config knows — the label and the chain ID. Devnet's was wrong too:
96370, where the devnet genesis cChainGenesis.config.chainId and a live
eth_chainId both say 96367.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-27 14:28:41 -07:00

267 lines
6.5 KiB
YAML

# chains.example.yaml — full per-network customization for the unified Lux
# explorer. Mount as /etc/explorer/chains.yaml or pass --config=chains.yaml.
#
# Every chain gets its own SQLite file under {data_dir}/{slug}/ and its own
# /v1/indexer/{slug}/* + /v1/graph/{slug}/{subgraph}/* routes. Branding is
# per-chain; the SPA reads it at runtime via /envs.js so a deploy can
# rebrand by remounting this file + assets — no image rebuild.
data_dir: /data
http_addr: :8090
# Default branding the SPA uses when the request hostname does not match a
# chain-specific brand below. Per-chain `brand:` overrides win.
brand_default:
name: Lux Explorer
coin: LUX
accent_color: "#5cf"
icon_url: /icon.svg
logo_url: /logo.svg
# Cross-explorer link list rendered in the SPA's network switcher.
# `domain` is derived from the request host at serve time (see
# networkSwitcher in frontend.go) — do not write it here. A hand-kept copy
# of a hostname is a second source of truth, and this one had drifted to
# testnet.explorer.lux.network / devnet.explorer.lux.network, neither of
# which resolves. Config supplies what only config knows: label + chain ID.
networks:
- label: Mainnet
chain_id: 96369
- label: Testnet
chain_id: 96368
- label: Devnet
chain_id: 96367
chains:
# ── Lux native chains ─────────────────────────────────────────
- slug: cchain
name: Lux C-Chain
chain_id: 96369
type: evm
rpc: ${LUX_CCHAIN_RPC:-https://api.lux.network/ext/bc/C/rpc}
coin: LUX
enabled: true
default: true
# DEX settlement precompile. Logs from this address are indexed into the
# `dex` (CLOB) subgraph as Fill/Market; defaults to 0x9999 if unset.
pool_manager: "0x0000000000000000000000000000000000009999"
indexer: { poll_interval: 30s }
graph:
enabled: true
subgraphs:
- { name: amm, schema: amm, enabled: true }
# Native DEX (CLOB) — Order/Market/Fill from 0x9999 settlement events.
- { name: dex, schema: dex, enabled: true }
- { name: securities, schema: securities, enabled: false }
brand:
name: Lux C-Chain
coin: LUX
accent_color: "#5cf"
- slug: pchain
name: P-Chain
type: linear
rpc: ${LUX_RPC:-https://api.lux.network}/ext/bc/P
coin: LUX
enabled: true
- slug: xchain
name: X-Chain
type: dag
rpc: ${LUX_RPC:-https://api.lux.network}/ext/bc/X
coin: LUX
enabled: true
- slug: achain
name: A-Chain
type: dag
rpc: ${LUX_RPC:-https://api.lux.network}/ext/bc/A
coin: LUX
enabled: true
- slug: bchain
name: B-Chain
type: dag
rpc: ${LUX_RPC:-https://api.lux.network}/v1/bc/B
coin: LUX
enabled: true
- slug: qchain
name: Q-Chain
type: dag
rpc: ${LUX_RPC:-https://api.lux.network}/ext/bc/Q
coin: LUX
enabled: true
- slug: tchain
name: T-Chain
type: dag
rpc: ${LUX_RPC:-https://api.lux.network}/v1/bc/T
coin: LUX
enabled: true
- slug: zchain
name: Z-Chain
type: dag
rpc: ${LUX_RPC:-https://api.lux.network}/ext/bc/Z
coin: LUX
enabled: true
- slug: kchain
name: K-Chain
type: dag
rpc: ${LUX_RPC:-https://api.lux.network}/ext/bc/K
coin: LUX
enabled: true
# ── Lux subnet chains (EVM) ───────────────────────────────────
- slug: zoo
name: Zoo
chain_id: 200200
type: evm
rpc: ${ZOO_RPC:-https://api.lux.network/ext/bc/Zoo/rpc}
coin: ZOO
enabled: true
indexer: { poll_interval: 30s }
graph:
enabled: true
subgraphs:
- { name: amm, schema: amm, enabled: true }
brand:
name: Zoo
coin: ZOO
accent_color: "#7c3aed"
- slug: hanzo
name: Hanzo
chain_id: 36963
type: evm
rpc: ${HANZO_RPC:-https://api.lux.network/ext/bc/Hanzo/rpc}
coin: HANZO
enabled: true
indexer: { poll_interval: 30s }
graph:
enabled: true
subgraphs:
- { name: amm, schema: amm, enabled: true }
brand:
name: Hanzo
coin: HANZO
accent_color: "#0b1220"
- slug: spc
name: SPC
chain_id: 36911
type: evm
rpc: ${SPC_RPC:-https://api.lux.network/ext/bc/SPC/rpc}
coin: SPC
enabled: true
indexer: { poll_interval: 30s }
- slug: pars
name: Pars
chain_id: 494949
type: evm
rpc: ${PARS_RPC:-https://api.lux.network/ext/bc/Pars/rpc}
coin: PARS
enabled: true
indexer: { poll_interval: 30s }
- slug: dex
name: Lux DEX
type: evm
rpc: ${LUX_RPC:-https://api.lux.network}/ext/bc/D/rpc
coin: LUX
enabled: true
indexer: { poll_interval: 15s }
graph:
enabled: true
subgraphs:
- { name: amm, schema: amm, enabled: true }
- { name: clob, schema: all, enabled: true }
# ── External chains (bridge / MPC counterparties) ─────────────
- slug: ethereum
name: Ethereum
chain_id: 1
type: evm
rpc: ${ETH_RPC:-https://eth.llamarpc.com}
coin: ETH
enabled: false
graph:
enabled: false
subgraphs:
- { name: uniswap-v3, schema: uniswap-v3, enabled: true }
- slug: arbitrum
name: Arbitrum One
chain_id: 42161
type: evm
rpc: ${ARB_RPC:-https://arb1.arbitrum.io/rpc}
coin: ETH
enabled: false
- slug: optimism
name: Optimism
chain_id: 10
type: evm
rpc: ${OP_RPC:-https://mainnet.optimism.io}
coin: ETH
enabled: false
- slug: base
name: Base
chain_id: 8453
type: evm
rpc: ${BASE_RPC:-https://mainnet.base.org}
coin: ETH
enabled: false
- slug: polygon
name: Polygon
chain_id: 137
type: evm
rpc: ${POLYGON_RPC:-https://polygon-rpc.com}
coin: MATIC
enabled: false
- slug: bsc
name: BNB Chain
chain_id: 56
type: evm
rpc: ${BSC_RPC:-https://bsc-dataseed.binance.org}
coin: BNB
enabled: false
- slug: avalanche
name: Avalanche C-Chain
chain_id: 43114
type: evm
rpc: ${AVAX_RPC:-https://api.avax.network/ext/bc/C/rpc}
coin: AVAX
enabled: false
- slug: solana
name: Solana
type: solana
rpc: ${SOL_RPC:-https://api.mainnet-beta.solana.com}
coin: SOL
enabled: false
- slug: bitcoin
name: Bitcoin
type: bitcoin
rpc: ${BTC_RPC:-}
coin: BTC
enabled: false
- slug: cosmos
name: Cosmos Hub
type: cosmos
rpc: ${ATOM_RPC:-https://cosmos-rpc.publicnode.com}
coin: ATOM
enabled: false