Explorer Overview
Explorer working
Everything you need to understand and use the ZigScan explorer for ZIGChain. This guide is optimized with relevant search terms (ZIGChain blockchain explorer, ZIG token price, ZIGChain transactions, ZIGChain blocks, ZIGChain smart contracts, ZIGChain DeFi analytics) and explains every major feature. Pair this with docs/QUICKSTART.md for setup and .env for configuration.
Quick Start For Everyone
Home dashboard: See live blocks, transactions, TPS, validators, TVL, account totals, and ZIG price/supply. Auto-refresh is built in; no login required.
Global search: Paste a transaction hash, wallet address (bech32), block height, contract address, or token denom/symbol into the top search bar. ZigScan routes you to the correct detail page.
Transactions feed:
/transactionslists all ZIGChain transactions with category filters (all, token transfers, DeFi), action-type filters, date ranges, and CSV export for the visible table.Block explorer:
/blocksshows recent blocks;/block/[blockDetail]reveals proposer, timestamp, gas, and included transactions.Wallets/addresses:
/address/<bech32>shows balances, staking, delegations, rewards, account numbers/sequences, and history (loaded on demand for speed).Tokens and markets:
/assets/<denom>shows token profile, price/volume charts (OHLCV), liquidity, trades, holders, social links, FDV/MCAP, and pool references.DeFi analytics:
/defi,/defi/oroswap, and/defi/memesdotfunsurface pool TVL, swaps/trades, and volume from the DEX API.Smart contracts and codes:
/smart-contractslists code IDs and instantiated contracts; detail pages show creator/admin/label and contract transactions.Watchlists and dashboard: After signup/signin, save addresses, tokens, and contracts. Email verification and Turnstile security are required. Personalized widgets live under
/dashboard.Troubleshooting: If data looks stale, refresh. If a page fails, confirm backend API URL/key in
.env. For lookups, ensure hashes/addresses/denoms are exact.
Feature Deep-Dive (What You Can Do)
ZIGChain blockchain explorer: Monitor real-time blocks, transactions, validators, accounts, and chain stats tailored to ZIGChain.
ZIG token price and supply tracking: View current price, 24h/7d/30d change, market cap, total/circulating supply, non-circulating supply, and volume.
Transaction inspector: See status, gas requested/used, fees, messages, events, sender/recipient, timestamps, and export CSV for compliance or analytics.
Block analysis: Inspect block header, proposer, gas metrics, included txs, and timings to evaluate validator performance and block production.
Wallet insights: Track balances across factory/IBC/CW20 tokens, staking positions, rewards, and transaction history with pagination.
Smart contract explorer: Browse code IDs, contracts, metadata (creator, admin, label, created at, code ID), and contract-specific transactions.
Token analytics: Price/volume OHLCV charts, trades, liquidity, holders, FDV/MCAP, volume buckets, price sources, and social metadata.
DeFi and TVL analytics: Pool stats, swaps, volume, TVL history, and per-pool transactions via the DEX API.
Network statistics: TPS (reported and true), blocks per day, average/min block time, validator counts, staking pool bonded/unbonded, account totals.
Watchlists and personalization: Save and manage watched assets/addresses/contracts via
/api/saved-itemsendpoints behind authenticated flows.
Architecture And Stack
Framework: Next.js 16 App Router, React 19, TypeScript.
Styling: Tailwind v4 config plus custom CSS in
src/app/globals.css.Data sources: ZigScan backend REST API for chain data; DEX API for liquidity/pool/trade data. Axios is the HTTP client.
Global state:
AuthProvider(src/contexts/AuthContext.tsx) for session/user,LoadingProvider(src/app/contexts/LoadingContext.tsx) for navigation/API loading cues.SEO:
src/lib/seoMetadata.ts(Open Graph, Twitter cards, organization/website schema) wired insrc/app/layout.tsx.
Configuration (Environment)
Required:
ZIGSCAN_API_URL,ZIGSCAN_API_KEY.Optional:
DEX_API_URL/NEXT_PUBLIC_DEX_API_URLfor DeFi pools;NEXT_PUBLIC_THUMBNAILIMGE_BASE_URLfor OG images.Security:
NEXT_PUBLIC_TURNSTILE_SITE_KEY,TURNSTILE_SECRET_KEYfor Cloudflare Turnstile; auth API base falls back toNEXT_PUBLIC_ZIGSCAN_API_URL→ZIGSCAN_API_URL→http://localhost:3000.All variables live in
.env;src/utils/zigApi.tsenforces that core keys are present.
Request Flow (How Data Moves)
Next.js API routes and middleware
Next.js API routes proxy sensitive actions:
Auth:
/api/auth/*forwards to backend after Turnstile verification (src/lib/turnstileServer.ts), passing through session cookies.Saved items:
/api/saved-itemsCRUD for watchlists.Token metadata and home refresh: Lightweight endpoints to avoid direct backend exposure.
Middleware: src/proxy.ts is ready for bot/human verification; currently permissive for non-API routes.
Route-by-Route Detail (src/app)
/: Cached network overview (latest block, validators, staking pool, tx stats, block stats), ZIG supply/market, TVL history, accounts total, last 10 blocks/transactions. Client polls/api/home/refresh./blocksand/block/[blockDetail]: Paginated blocks plus deep block detail (header, commit, txs, timings)./transactionsand/tx/[txDetails]: Transaction feed with action/date filters, block-height cursor pagination, CSV export, and full tx detail (events, gas, fee, sender/recipient)./address/[address]: Balances (factory/IBC/CW20), staking, rewards, metadata, and on-demand transaction history./assets/[tokenDenom]: Token profile, OHLCV chart, liquidity/volume, trades, holders, socials, pools, FDV/MCAP, price source./defi,/defi/oroswap,/defi/memesdotfun: DeFi dashboards with pool stats, trades, volume, TVL from the DEX API./smart-contracts: Code IDs and contracts with filters; detail pages use/contract/detailsand/contract/transactions./stats: Network stats (TPS, blocks/day, validators, supply) and charts viagetNetworkOverviewandgetBlockStats./dashboard: Authenticated user area for saved items and personalized widgets./user/*,/verify-email: Signup, signin, reset, email verification with Turnstile protection and API proxies.
Data, Caching, And Resilience
Homepage uses
unstable_cache(revalidate: 5) to avoid API overload while staying fresh.src/utils/zigApi.tsnormalizes timestamps, numbers, and denom-symbol registration; defensive parsing logs errors and falls back to empty data to keep pages rendering.Long-running calls have generous timeouts; many endpoints validate status codes and avoid crashing on 5xx by returning safe defaults.
Last updated
