mirror of
https://github.com/luxfi/explorer.git
synced 2026-09-24 00:25:12 +00:00
Module renamed to github.com/luxfi/explorer (was -unified). Imports
luxfi/indexer/{daemon,evm,storage,explorer} and luxfi/graph/{engine,
indexer,storage} as libraries; embeds the luxfi/explore SPA via go:embed
all:static.
A new ChainSupervisor wraps the existing ChainRegistry: adding a chain
(via config / mDNS / admin API) spawns a per-chain indexer goroutine plus
one graph engine + indexer per enabled subgraph; removing cancels them
and frees the routes from a sync.Map dispatcher mounted on /v1/indexer/,
/v1/explorer/ (legacy alias), and /v1/graph/.
Config schema is fully per-chain: indexer poll interval, list of graph
subgraphs (each can pick a built-in schema like amm, securities, fhe…),
brand (name/coin/accent + on-disk icon/logo paths), token features, and
top-level networks list. /envs.js exposes the chain list and active
brand to the SPA at runtime, so a deploy can rebrand by remounting
chains.yaml + assets — no image rebuild.
Dockerfile clones luxfi/explore + luxfi/indexer + luxfi/graph as
siblings inside the build, populates ./static from the SPA build, and
produces one binary. CI checks out the three repos as siblings so the
local replace in go.mod works without tagged releases.
111 lines
2.7 KiB
YAML
111 lines
2.7 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.
|
|
|
|
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.
|
|
networks:
|
|
- label: Mainnet
|
|
domain: explorer.lux.network
|
|
chain_id: 96369
|
|
- label: Testnet
|
|
domain: testnet.explorer.lux.network
|
|
chain_id: 96368
|
|
- label: Devnet
|
|
domain: devnet.explorer.lux.network
|
|
chain_id: 96370
|
|
|
|
chains:
|
|
- slug: cchain
|
|
name: Lux C-Chain
|
|
chain_id: 96369
|
|
type: evm
|
|
rpc: ${LUX_CCHAIN_RPC:-https://api.lux.network/mainnet/ext/bc/C/rpc}
|
|
coin: LUX
|
|
enabled: true
|
|
default: true
|
|
|
|
indexer:
|
|
poll_interval: 30s
|
|
start_block: 0
|
|
|
|
graph:
|
|
enabled: true
|
|
subgraphs:
|
|
- { name: amm, schema: amm, enabled: true }
|
|
- { name: securities, schema: securities, enabled: false }
|
|
|
|
brand:
|
|
name: Lux C-Chain
|
|
coin: LUX
|
|
accent_color: "#5cf"
|
|
icon_url: /icon.svg
|
|
logo_url: /logo.svg
|
|
|
|
tokens:
|
|
featured: []
|
|
allow_list: []
|
|
block_list: []
|
|
|
|
- slug: zoo
|
|
name: Zoo
|
|
chain_id: 200200
|
|
type: evm
|
|
rpc: ${ZOO_RPC:-https://api.lux.network/mainnet/ext/bc/2Y625Kvdd4wZ5LKx9kLSf1jGALyARmXVN1YsTb4F3Hzv4bPDbp/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/mainnet/ext/bc/2GiQb73CeJESjc4omFv2YtQHZrRgJf25NXPzAr5J6UNHRcDV2F/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/mainnet/ext/bc/rtjwvtE1tEvrokmpeYdTq7b2zqZgmybKwR5MLjKMGAR1W78dQ/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/mainnet/ext/bc/2pUskxqaL5Bpx7uRUGG1fDjPckjxQ4UKX4sLKeaS1NdSVBJd3F/rpc}
|
|
coin: PARS
|
|
enabled: true
|
|
indexer: { poll_interval: 30s }
|