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

@@ -1,9 +1,13 @@
#!/bin/bash
# Complete test suite for tiered architecture deployment
set -e
set -euo pipefail
BASE_URL="${API_BASE_URL:-http://localhost:8080}"
DB_HOST="${DB_HOST:-localhost}"
DB_PORT="${DB_PORT:-5432}"
DB_USER="${DB_USER:-explorer}"
DB_NAME="${DB_NAME:-explorer}"
echo "=== Full Deployment Test Suite ==="
echo "Base URL: $BASE_URL"
echo ""
@@ -18,6 +22,15 @@ YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
print_auth_hint_if_needed() {
local body="${1:-}"
local message
message=$(echo "$body" | jq -r '.error.message // empty' 2>/dev/null || true)
if [[ "$message" == *wallet_nonces* ]] || [[ "$message" == *"storage is not initialized"* ]]; then
echo " Hint: wallet auth storage is missing. Run bash scripts/run-migration-0010.sh and restart the backend."
fi
}
test_endpoint() {
local method=$1
local endpoint=$2
@@ -62,6 +75,7 @@ test_endpoint() {
if [ ${#body} -lt 200 ]; then
echo " Response: $body"
fi
print_auth_hint_if_needed "$body"
((FAILED++))
return 1
fi
@@ -89,13 +103,13 @@ test_endpoint "GET" "/api/v1/track4/operator/bridge/events" "401" "Track 4: Requ
echo ""
echo -e "${BLUE}=== Database Verification ===${NC}"
if export PGPASSWORD="${DB_PASSWORD:-changeme}" && psql -h "${DB_HOST:-localhost}" -U "${DB_USER:-explorer}" -d "${DB_NAME:-explorer}" -c "SELECT COUNT(*) FROM wallet_nonces;" -t > /dev/null 2>&1; then
if export PGPASSWORD="${DB_PASSWORD:-changeme}" && psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -c "SELECT COUNT(*) FROM wallet_nonces;" -t > /dev/null 2>&1; then
echo -e "${GREEN}✓ Database: Connected${NC}"
((PASSED++))
# Check tables
echo -n "Checking track schema tables... "
TABLE_COUNT=$(export PGPASSWORD="${DB_PASSWORD:-changeme}" && psql -h "${DB_HOST:-localhost}" -U "${DB_USER:-explorer}" -d "${DB_NAME:-explorer}" -c "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'public' AND table_name IN ('addresses', 'token_transfers', 'wallet_nonces', 'operator_roles');" -t 2>/dev/null | tr -d ' ')
TABLE_COUNT=$(export PGPASSWORD="${DB_PASSWORD:-changeme}" && psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -c "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'public' AND table_name IN ('addresses', 'token_transfers', 'wallet_nonces', 'operator_roles');" -t 2>/dev/null | tr -d ' ')
if [ "$TABLE_COUNT" -ge "4" ]; then
echo -e "${GREEN}✓ All tables exist${NC}"
((PASSED++))
@@ -121,4 +135,3 @@ else
echo -e "${YELLOW}⚠️ Some tests failed or need attention${NC}"
exit 0 # Don't fail deployment, just report
fi