#!/usr/bin/env bash # Verify Transaction Processing # Checks if validators are processing transactions from mempool 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 RPC_URL="${RPC_URL_138:-http://${RPC_CORE_1}:8545}" WALLET="0x4A666F96fC8764181194447A7dFdb7d471b301C8" echo "=== Verifying Transaction Processing ===" echo "" # Check current nonce CURRENT_NONCE=$(cast nonce "$WALLET" --rpc-url "$RPC_URL" 2>/dev/null || echo "0") echo "Current Nonce: $CURRENT_NONCE" # Check latest block transaction count LATEST_BLOCK=$(cast block-number --rpc-url "$RPC_URL" 2>/dev/null || echo "0") echo "Latest Block: $LATEST_BLOCK" echo "" echo "Checking last 10 blocks for transactions..." TX_COUNT_TOTAL=0 for i in {0..9}; do BLOCK=$((LATEST_BLOCK - i)) TX_COUNT=$(cast rpc eth_getBlockTransactionCountByNumber "0x$(printf '%x' $BLOCK)" --rpc-url "$RPC_URL" 2>/dev/null | cast --to-dec 2>/dev/null || echo "0") if [ "$TX_COUNT" != "0" ]; then echo " ✅ Block $BLOCK: $TX_COUNT transactions" TX_COUNT_TOTAL=$((TX_COUNT_TOTAL + TX_COUNT)) else echo " ⚠️ Block $BLOCK: 0 transactions" fi done echo "" if [ "$TX_COUNT_TOTAL" -gt 0 ]; then echo "✅ Validators are processing transactions! ($TX_COUNT_TOTAL transactions in last 10 blocks)" else echo "⚠️ No transactions in last 10 blocks - validators may still be syncing" echo " Wait a few minutes and check again" fi echo "" echo "=== Account Status ===" ETH_BALANCE=$(cast balance "$WALLET" --rpc-url "$RPC_URL" 2>/dev/null | awk '{printf "%.2f ETH\n", $1/1000000000000000000}' || echo "N/A") WETH9_BALANCE=$(cast call 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 "balanceOf(address)" "$WALLET" --rpc-url "$RPC_URL" 2>/dev/null | cast --to-dec 2>/dev/null | awk '{printf "%.6f WETH9\n", $1/1000000000000000000}' || echo "0 WETH9") echo "ETH Balance: $ETH_BALANCE" echo "WETH9 Balance: $WETH9_BALANCE" echo "" if [ "$CURRENT_NONCE" -gt 13104 ]; then echo "✅ Nonce has advanced! Transactions are being processed." echo " Previous nonce: 13104" echo " Current nonce: $CURRENT_NONCE" else echo "⏳ Nonce still at 13104 - transactions may still be pending" echo " Monitor for a few more minutes" fi