#!/usr/bin/env bash # Ensure alltra-lifi-settlement ALL_MAINNET keeps ccipSupported:false and lifiSupported:false # until CCIP/LiFi officially list chain 651940. # Usage: bash scripts/verify/check-allmainnet-chains-flags.sh set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" F="$PROJECT_ROOT/alltra-lifi-settlement/src/config/chains.ts" if [[ ! -f "$F" ]]; then echo "[SKIP] alltra-lifi-settlement/src/config/chains.ts not found" exit 0 fi BLOCK="$(awk '/ALL_MAINNET: \{/{flag=1} flag{print} flag && /^ \},$/ {exit}' "$F")" if echo "$BLOCK" | grep -q 'ccipSupported: true'; then echo "[ERROR] ALL_MAINNET must keep ccipSupported: false until CCIP Directory lists 651940" exit 1 fi if echo "$BLOCK" | grep -q 'lifiSupported: true'; then echo "[ERROR] ALL_MAINNET must keep lifiSupported: false until LiFi API lists 651940" exit 1 fi if ! echo "$BLOCK" | grep -q 'ccipSupported: false'; then echo "[ERROR] ALL_MAINNET block missing ccipSupported: false" exit 1 fi if ! echo "$BLOCK" | grep -q 'lifiSupported: false'; then echo "[ERROR] ALL_MAINNET block missing lifiSupported: false" exit 1 fi echo "[OK] ALL_MAINNET ccipSupported/lifiSupported flags (651940)" exit 0