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,7 +1,7 @@
#!/bin/bash
# Complete deployment and testing script
set -e
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
@@ -16,6 +16,14 @@ YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
extract_error_message() {
local body="${1:-}"
if [ -z "$body" ]; then
return 0
fi
echo "$body" | jq -r '.error.message // empty' 2>/dev/null || true
}
# Step 1: Verify components
echo -e "${BLUE}Step 1: Verifying components...${NC}"
bash "$SCRIPT_DIR/verify-tiered-architecture.sh"
@@ -41,14 +49,16 @@ if bash "$SCRIPT_DIR/check-database-connection.sh" 2>&1 | grep -q "✅ Connected
# Try migration
echo -e "${BLUE}Running migration...${NC}"
if bash "$SCRIPT_DIR/run-migration-0010.sh" 2>&1 | tail -5; then
if bash "$SCRIPT_DIR/run-migration-0010.sh"; then
echo -e "${GREEN}✅ Migration completed${NC}"
else
echo -e "${YELLOW}⚠️ Migration may have already been run or failed${NC}"
echo -e "${RED} Migration failed${NC}"
exit 1
fi
else
DB_READY=false
echo -e "${YELLOW}⚠️ Database not accessible - Track 1 endpoints will work, Track 2-4 require database${NC}"
echo " Wallet connect will stay unavailable until DB access is fixed and migration 0010 is applied."
echo " To fix: Set DB_PASSWORD environment variable or fix database credentials"
fi
echo ""
@@ -143,14 +153,28 @@ fi
# Test auth endpoints
echo -n "Testing /api/v1/auth/nonce... "
NONCE_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "http://localhost:8080/api/v1/auth/nonce" \
-H "Content-Type: application/json" \
-d '{"address":"0x1234567890123456789012345678901234567890"}' 2>&1)
NONCE_CODE=$(echo "$NONCE_RESPONSE" | tail -n1)
if [ "$NONCE_CODE" = "200" ] || [ "$NONCE_CODE" = "500" ]; then
echo -e "${GREEN}${NC} (HTTP $NONCE_CODE)"
if [ "$DB_READY" = true ]; then
NONCE_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "http://localhost:8080/api/v1/auth/nonce" \
-H "Content-Type: application/json" \
-d '{"address":"0x1234567890123456789012345678901234567890"}' 2>&1)
NONCE_CODE=$(echo "$NONCE_RESPONSE" | tail -n1)
NONCE_BODY=$(echo "$NONCE_RESPONSE" | sed '$d')
NONCE_ERROR=$(extract_error_message "$NONCE_BODY")
if [ "$NONCE_CODE" = "200" ]; then
echo -e "${GREEN}${NC} (HTTP $NONCE_CODE)"
elif [ "$NONCE_CODE" = "503" ]; then
echo -e "${RED}${NC} (HTTP $NONCE_CODE)"
echo " Wallet auth storage is not ready: ${NONCE_ERROR:-service unavailable}"
echo " Fix: bash scripts/run-migration-0010.sh, then restart the backend."
exit 1
else
echo -e "${YELLOW}⚠️${NC} (HTTP $NONCE_CODE)"
if [ -n "$NONCE_ERROR" ]; then
echo " Response: $NONCE_ERROR"
fi
fi
else
echo -e "${YELLOW}⚠️${NC} (HTTP $NONCE_CODE)"
echo -e "${YELLOW}⚠️${NC} skipped (database unavailable; wallet auth cannot work yet)"
fi
# Test Track 2 (should require auth)
@@ -214,4 +238,3 @@ echo ""
echo -e "${GREEN}✅ Deployment and testing complete!${NC}"
echo ""