feat: explorer API, wallet, CCIP scripts, and config refresh

- Backend REST/gateway/track routes, analytics, Blockscout proxy paths.
- Frontend wallet and liquidity surfaces; MetaMask token list alignment.
- Deployment docs, verification scripts, address inventory updates.

Check: go build ./... under backend/ (pass).
Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-07 23:22:12 -07:00
parent 4044fb07e1
commit bdae5a9f6e
224 changed files with 19671 additions and 3291 deletions

View File

@@ -8,6 +8,8 @@ set -euo pipefail
BASE_URL="${1:-https://explorer.d-bis.org}"
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
MISSION_CONTROL_SAMPLE_TX="${MISSION_CONTROL_SAMPLE_TX:-0x2f31d4f9a97be754b800f4af1a9eedf3b107d353bfa1a19e81417497a76c05c2}"
MISSION_CONTROL_SAMPLE_TOKEN="${MISSION_CONTROL_SAMPLE_TOKEN:-0x93E66202A11B1772E55407B32B44e5Cd8eda7f22}"
# Detect execution context: inside LXC (VMID 5000) or on host
RUN_LOCAL=false
@@ -133,13 +135,13 @@ else
fi
# 8) /snap/ response contains Snap app content (skip if 301 — redirect may not include body)
if echo "$SNAP_BODY" | head -c 8192 | grep -qE 'Connect|template-snap|Snap|MetaMask'; then
if echo "$SNAP_BODY" | grep -qE 'Connect|template-snap|Chain 138 Snap|Install MetaMask Flask|Snap|MetaMask'; then
echo "$BASE_URL/snap/ contains Snap app content"
((PASS++)) || true
elif [ "$SNAP_CODE" = "301" ]; then
echo "$BASE_URL/snap/ returned 301 (redirect); content check skipped"
else
echo "$BASE_URL/snap/ response missing expected content (Connect|Snap|MetaMask)"
echo "$BASE_URL/snap/ response missing expected content (Connect|Chain 138 Snap|MetaMask)"
((FAIL++)) || true
fi
@@ -156,6 +158,77 @@ else
echo "⏭ Skipping nginx /snap/ check (not inside VM and pct not used)"
fi
# 10) Visual Command Center returns 200
HTTP_CODE="$(curl -sS -o /tmp/chain138-command-center.verify.$$ -w "%{http_code}" --connect-timeout 10 "$BASE_URL/chain138-command-center.html" 2>/dev/null || echo 000)"
if [ "$HTTP_CODE" = "200" ]; then
echo "$BASE_URL/chain138-command-center.html returns 200"
((PASS++)) || true
else
echo "$BASE_URL/chain138-command-center.html returned $HTTP_CODE (expected 200)"
((FAIL++)) || true
fi
# 11) Visual Command Center contains expected explorer architecture content
if grep -qE 'Visual Command Center|Mission Control|mainnet cW mint corridor' /tmp/chain138-command-center.verify.$$ 2>/dev/null; then
echo "$BASE_URL/chain138-command-center.html contains command-center content"
((PASS++)) || true
else
echo "$BASE_URL/chain138-command-center.html missing expected command-center content"
((FAIL++)) || true
fi
rm -f /tmp/chain138-command-center.verify.$$
# 12) Mission Control SSE stream returns 200 with text/event-stream
MC_STREAM_HEADERS="/tmp/mission-control-stream.headers.$$"
MC_STREAM_BODY="/tmp/mission-control-stream.body.$$"
MC_STREAM_EXIT=0
if ! curl -sS -N -D "$MC_STREAM_HEADERS" -o "$MC_STREAM_BODY" --connect-timeout 10 --max-time 8 \
"$BASE_URL/explorer-api/v1/mission-control/stream" >/dev/null 2>&1; then
MC_STREAM_EXIT=$?
fi
if grep -qE '^HTTP/[0-9.]+ 200' "$MC_STREAM_HEADERS" 2>/dev/null \
&& grep -qi '^content-type: text/event-stream' "$MC_STREAM_HEADERS" 2>/dev/null \
&& { [ "$MC_STREAM_EXIT" -eq 0 ] || [ "$MC_STREAM_EXIT" -eq 28 ]; } \
&& grep -qE '^(event|data):' "$MC_STREAM_BODY" 2>/dev/null; then
echo "$BASE_URL/explorer-api/v1/mission-control/stream returns Mission Control SSE"
((PASS++)) || true
else
echo "$BASE_URL/explorer-api/v1/mission-control/stream missing expected SSE response"
((FAIL++)) || true
fi
rm -f "$MC_STREAM_HEADERS" "$MC_STREAM_BODY"
# 13) Mission Control bridge trace returns labeled JSON
MC_TRACE_BODY="/tmp/mission-control-trace.body.$$"
HTTP_CODE="$(curl -sS -o "$MC_TRACE_BODY" -w "%{http_code}" --connect-timeout 10 \
"$BASE_URL/explorer-api/v1/mission-control/bridge/trace?tx=$MISSION_CONTROL_SAMPLE_TX" 2>/dev/null || echo 000)"
if [ "$HTTP_CODE" = "200" ] \
&& grep -q '"tx_hash"' "$MC_TRACE_BODY" 2>/dev/null \
&& grep -q '"from_registry"' "$MC_TRACE_BODY" 2>/dev/null \
&& grep -q '"to_registry"' "$MC_TRACE_BODY" 2>/dev/null; then
echo "$BASE_URL/explorer-api/v1/mission-control/bridge/trace returns labeled trace JSON"
((PASS++)) || true
else
echo "$BASE_URL/explorer-api/v1/mission-control/bridge/trace failed verification"
((FAIL++)) || true
fi
rm -f "$MC_TRACE_BODY"
# 14) Mission Control liquidity proxy returns pool JSON
MC_LIQUIDITY_BODY="/tmp/mission-control-liquidity.body.$$"
HTTP_CODE="$(curl -sS -o "$MC_LIQUIDITY_BODY" -w "%{http_code}" --connect-timeout 10 \
"$BASE_URL/explorer-api/v1/mission-control/liquidity/token/$MISSION_CONTROL_SAMPLE_TOKEN/pools" 2>/dev/null || echo 000)"
if [ "$HTTP_CODE" = "200" ] \
&& grep -q '"pools"' "$MC_LIQUIDITY_BODY" 2>/dev/null \
&& grep -q '"dex"' "$MC_LIQUIDITY_BODY" 2>/dev/null; then
echo "$BASE_URL/explorer-api/v1/mission-control/liquidity/token/.../pools returns pool JSON"
((PASS++)) || true
else
echo "$BASE_URL/explorer-api/v1/mission-control/liquidity/token/.../pools failed verification"
((FAIL++)) || true
fi
rm -f "$MC_LIQUIDITY_BODY"
echo ""
echo "=============================================="
echo "Result: $PASS passed, $FAIL failed"