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>
21 lines
834 B
Bash
Executable File
21 lines
834 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# WebSocket connectivity verification for RPC endpoints
|
|
# Requires: curl (for HTTP upgrade) or wscat/websocat if installed
|
|
|
|
set -euo pipefail
|
|
|
|
WS_URL="${1:-wss://wss.defi-oracle.io}"
|
|
TIMEOUT="${2:-5}"
|
|
|
|
echo "Testing WebSocket: $WS_URL (timeout ${TIMEOUT}s)"
|
|
|
|
if command -v websocat &>/dev/null; then
|
|
echo '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | timeout "$TIMEOUT" websocat -t "$WS_URL" -n1 2>/dev/null && echo "OK" || echo "FAIL"
|
|
elif command -v wscat &>/dev/null; then
|
|
timeout "$TIMEOUT" wscat -c "$WS_URL" -x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' 2>/dev/null && echo "OK" || echo "FAIL"
|
|
else
|
|
echo "Install websocat or wscat for WebSocket testing: apt install websocat"
|
|
echo "Fallback: node scripts/verify-ws-rpc-chain138.mjs"
|
|
exit 1
|
|
fi
|