Files
proxmox/docs/04-configuration/EXPLORER_FUNCTIONALITY_REVIEW.md
defiQUG b3a8fe4496
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
chore: sync all changes to Gitea
- Config, docs, scripts, and backup manifests
- Submodule refs unchanged (m = modified content in submodules)

Made-with: Cursor
2026-03-02 11:37:34 -08:00

3.9 KiB
Raw Blame History

Explorer functionality review (routes, API, Snap)

Reference for what works, what the SPA calls, and fixes applied.

1. Site routes and navigation

All primary routes return HTTP 200 and render the same SPA shell (Explore: Home, Blocks, Transactions; Tools: Bridge, WETH, Tokens, Watchlist; MetaMask Snap; language toggle; Connect Wallet):

  • /, /home, /blocks, /transactions, /bridge, /weth, /tokens, /watchlist, /analytics, /operator

Static routing and nginx serving are OK.

2. Exact API URLs the SPA calls

When the page is at https://explorer.d-bis.org, the SPA uses relative /api. In DevTools → Network, filter by api and confirm these:

Widget / feature URL
Stats (Total Blocks, etc.) GET /api/v2/stats
Gas & Network GET /api/v2/blocks?page=1&page_size=20, GET /api/v2/stats, GET /api/v2/transactions?page=1&page_size=100
Latest Blocks GET /api/v2/blocks?page=1&page_size=10
Latest Transactions GET /api/v2/transactions?page=1&page_size=10
Tokens (list) GET /api/v2/tokens?page=1&page_size=100
Bridge Monitoring No API call — content is static HTML. If it stays "Loading bridge data…", a JS error may prevent the bridge view from running.

If any of these return non-200 or (failed) CORS, thats the failing path. If all return 200 but the UI still shows "Loading…", the issue is in the SPA (parsing, DOM update, or an exception after fetch). See explorer-monorepo/docs/EXPLORER_LOADING_TROUBLESHOOTING.md.

3. Blockscout stats endpoint

  • https://explorer.d-bis.org/api/v2/stats returns 200 with total_blocks, total_transactions, gas_prices, average_block_time, etc. So the API is up.

4. MetaMask Snap section

  • /snap/ — Chain 138 Snap page loads; set GATSBY_SNAP_API_BASE_URL for market/summary/bridge/swap cards.
  • /snap/sendFix applied: The "Send on Chain 138" link is now built as an absolute HTTPS URL when GATSBY_SNAP_SITE_URL is set (e.g. https://explorer.d-bis.org/snap/send), so the link no longer leads to an HTTP redirect. Rebuild the Snap site with GATSBY_SNAP_SITE_URL=https://explorer.d-bis.org (see chain138-snap/scripts/build-snap-site-for-explorer.sh) and redeploy to VMID 5000.

5. Contract verification

  • Blockscout supports contract verification (Etherscan-compatible and v2 API). From the explorer: open an addressContract tab → Verify & Publish (if the instance shows it).
  • Forge (CLI): Use the forge-verification-proxy and then run verification scripts so Forges payload is translated to Blockscout v2. See 08-monitoring/BLOCKSCOUT_VERIFICATION_GUIDE.md and forge-verification-proxy/README.md. Scripts: scripts/verify/run-contract-verification-with-proxy.sh, scripts/verify-contracts-blockscout.sh.
  • Gaps and more: EXPLORER_GAPS_AND_RECOMMENDATIONS.md § Contract verification.

6. Conclusions from observed behavior

  • Static routing / nginx: OK (all pages load).
  • Blockscout stats: OK (/api/v2/stats returns 200).
  • SPA dynamic widgets: If still "Loading…" after fixes (relative /api, no filter=to, cache-bust ?v=3), verify (1) deployed explorer-spa.js on VMID 5000 is the latest, (2) hard-refresh (Ctrl+Shift+R), (3) DevTools Console for first error and Network for failing API URL + status.
  • Snap send: Use absolute HTTPS link (rebuild with GATSBY_SNAP_SITE_URL, redeploy Snap site).
  • Full gaps, bridge/lanes, verification, user/API keys: EXPLORER_GAPS_AND_RECOMMENDATIONS.md.