From 52d7ec6d40407c6485d1f6ef4ca8fcf7b42bdb02 Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 15 Jan 2026 09:17:22 +0000 Subject: [PATCH] Fix Starknet chain ID matching - handle hex-encoded ASCII Juno returns chain ID as hex-encoded ASCII (0x534e5f5345504f4c4941) rather than plain string (SN_SEPOLIA). Match both formats. Co-Authored-By: Claude Opus 4.5 --- sync-status.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sync-status.sh b/sync-status.sh index cfad222c..70d1af57 100755 --- a/sync-status.sh +++ b/sync-status.sh @@ -53,11 +53,12 @@ for path in $pathlist; do chain_id=$(echo "$chain_id_response" | jq -r '.result' 2>/dev/null) # Map Starknet chain IDs to reference endpoints + # Chain ID can be plain string or hex-encoded ASCII case "$chain_id" in - "SN_MAIN") + "SN_MAIN"|"0x534e5f4d41494e") ref=$($BASEPATH/reference-rpc-endpoint.sh 23448594291968336) ;; - "SN_SEPOLIA") + "SN_SEPOLIA"|"0x534e5f5345504f4c4941") ref=$($BASEPATH/reference-rpc-endpoint.sh 393402133025997800000000) ;; *)