Centralize explorer bridge destination selectors

This commit is contained in:
defiQUG
2026-03-28 15:18:49 -07:00
parent e5f038c9db
commit ff8d94383c
13 changed files with 28 additions and 96 deletions

View File

@@ -5,6 +5,7 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "$PROJECT_ROOT/scripts/lib/ccip-destinations.sh"
source "$PROJECT_ROOT/scripts/lib/address-inventory.sh"
# Colors
@@ -176,7 +177,7 @@ echo ""
# 7. Bridge Destination Configuration
log_header "7. Bridge Destination Configuration"
ETHEREUM_SELECTOR="5009297550715157269"
ETHEREUM_SELECTOR="${ETHEREUM_SELECTOR:-$(ccip_destination_selector_by_name "Ethereum Mainnet")}"
if [ -n "$WETH9_BRIDGE_CODE" ] && [ "$WETH9_BRIDGE_CODE" != "0x" ]; then
DEST=$(cast call "$WETH9_BRIDGE" "destinations(uint64)" "$ETHEREUM_SELECTOR" --rpc-url "$RPC_URL" 2>/dev/null || echo "")
DEST_HEX=$(echo "$DEST" | sed 's/0x//')