Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- Config, docs, scripts, and backup manifests - Submodule refs unchanged (m = modified content in submodules) Made-with: Cursor
3.9 KiB
3.9 KiB
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, that’s 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/statsreturns 200 withtotal_blocks,total_transactions,gas_prices,average_block_time, etc. So the API is up.
4. MetaMask Snap section
/snap/— Chain 138 Snap page loads; setGATSBY_SNAP_API_BASE_URLfor market/summary/bridge/swap cards./snap/send— Fix applied: The "Send on Chain 138" link is now built as an absolute HTTPS URL whenGATSBY_SNAP_SITE_URLis set (e.g.https://explorer.d-bis.org/snap/send), so the link no longer leads to an HTTP redirect. Rebuild the Snap site withGATSBY_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 address → Contract tab → Verify & Publish (if the instance shows it).
- Forge (CLI): Use the forge-verification-proxy and then run verification scripts so Forge’s 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/statsreturns 200). - SPA dynamic widgets: If still "Loading…" after fixes (relative
/api, nofilter=to, cache-bust?v=3), verify (1) deployedexplorer-spa.json 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.