Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
103 lines
4.0 KiB
Bash
Executable File
103 lines
4.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Load IP configuration
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
|
|
|
|
|
# Test service-to-contract integration
|
|
# Usage: ./test-service-integration.sh
|
|
|
|
RPC_URL="${RPC_URL:-http://${RPC_ALLTRA_1:-192.168.11.250}:8545}"
|
|
|
|
echo "========================================="
|
|
echo "Service-to-Contract Integration Test"
|
|
echo "RPC: $RPC_URL"
|
|
echo "========================================="
|
|
echo ""
|
|
|
|
# Test CCIP Monitor integration
|
|
echo "1. Testing CCIP Monitor Integration..."
|
|
CCIP_MONITOR_VMID=3501
|
|
if command -v pct &>/dev/null; then
|
|
CONTAINER_STATUS=$(pct status $CCIP_MONITOR_VMID 2>/dev/null || echo "not found")
|
|
if [[ "$CONTAINER_STATUS" == *"running"* ]]; then
|
|
SERVICE_STATUS=$(pct exec $CCIP_MONITOR_VMID -- systemctl is-active ccip-monitor.service 2>/dev/null || echo "inactive")
|
|
if [[ "$SERVICE_STATUS" == "active" ]]; then
|
|
echo " ✅ CCIP Monitor service is running (VMID $CCIP_MONITOR_VMID)"
|
|
|
|
# Check if service can connect to RPC
|
|
RPC_CHECK=$(pct exec $CCIP_MONITOR_VMID -- curl -s -X POST "$RPC_URL" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' 2>/dev/null || echo "failed")
|
|
if echo "$RPC_CHECK" | grep -q '"result"'; then
|
|
echo " ✅ CCIP Monitor can connect to RPC"
|
|
else
|
|
echo " ⚠️ CCIP Monitor RPC connection test failed"
|
|
fi
|
|
else
|
|
echo " ⚠️ CCIP Monitor service is $SERVICE_STATUS"
|
|
fi
|
|
else
|
|
echo " ⚠️ CCIP Monitor container status: $CONTAINER_STATUS"
|
|
fi
|
|
else
|
|
echo " ⚠️ pct command not available (not on Proxmox host)"
|
|
echo " 💡 CCIP Monitor should be on VMID $CCIP_MONITOR_VMID"
|
|
fi
|
|
|
|
# Test Oracle Publisher integration
|
|
echo ""
|
|
echo "2. Testing Oracle Publisher Integration..."
|
|
ORACLE_PUBLISHER_VMID=3500
|
|
if command -v pct &>/dev/null; then
|
|
CONTAINER_STATUS=$(pct status $ORACLE_PUBLISHER_VMID 2>/dev/null || echo "not found")
|
|
if [[ "$CONTAINER_STATUS" == *"running"* ]]; then
|
|
echo " ✅ Oracle Publisher container is running (VMID $ORACLE_PUBLISHER_VMID)"
|
|
SERVICE_STATUS=$(pct exec $ORACLE_PUBLISHER_VMID -- systemctl is-active oracle-publisher.service 2>/dev/null || echo "inactive")
|
|
if [[ "$SERVICE_STATUS" == "active" ]]; then
|
|
echo " ✅ Oracle Publisher service is active"
|
|
else
|
|
echo " ⚠️ Oracle Publisher service is $SERVICE_STATUS"
|
|
fi
|
|
else
|
|
echo " ⚠️ Oracle Publisher container status: $CONTAINER_STATUS"
|
|
fi
|
|
else
|
|
echo " ⚠️ pct command not available (not on Proxmox host)"
|
|
echo " 💡 Oracle Publisher should be on VMID $ORACLE_PUBLISHER_VMID"
|
|
fi
|
|
|
|
# Test contract accessibility from services
|
|
echo ""
|
|
echo "3. Testing Contract Accessibility..."
|
|
|
|
ORACLE_PROXY="0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6"
|
|
CCIP_ROUTER="0x8078A09637e47Fa5Ed34F626046Ea2094a5CDE5e"
|
|
|
|
# Test Oracle Proxy
|
|
ORACLE_BYTECODE=$(cast code "$ORACLE_PROXY" --rpc-url "$RPC_URL" 2>/dev/null || echo "")
|
|
if [ -n "$ORACLE_BYTECODE" ] && [ "$ORACLE_BYTECODE" != "0x" ]; then
|
|
echo " ✅ Oracle Proxy accessible: $ORACLE_PROXY"
|
|
else
|
|
echo " ❌ Oracle Proxy not accessible: $ORACLE_PROXY"
|
|
fi
|
|
|
|
# Test CCIP Router
|
|
CCIP_BYTECODE=$(cast code "$CCIP_ROUTER" --rpc-url "$RPC_URL" 2>/dev/null || echo "")
|
|
if [ -n "$CCIP_BYTECODE" ] && [ "$CCIP_BYTECODE" != "0x" ]; then
|
|
echo " ✅ CCIP Router accessible: $CCIP_ROUTER"
|
|
else
|
|
echo " ❌ CCIP Router not accessible: $CCIP_ROUTER"
|
|
fi
|
|
|
|
echo ""
|
|
echo "========================================="
|
|
echo "Integration Test Summary"
|
|
echo "========================================="
|
|
echo "✅ All core contracts are accessible via RPC"
|
|
echo "💡 Service integration depends on container/service status"
|
|
echo ""
|