diff --git a/reference-rpc-endpoint.json b/reference-rpc-endpoint.json index 84091355..09b76145 100644 --- a/reference-rpc-endpoint.json +++ b/reference-rpc-endpoint.json @@ -7,5 +7,5 @@ "urls": ["https://eth.drpc.org"]}, "playnance-mainnet": { "id": 1829, - "urls": ["https://rpc.playblock.io"] + "urls": ["https://rpc.playblock.io"]} } diff --git a/reference-rpc-endpoint.sh b/reference-rpc-endpoint.sh index ae5c940d..68113e3d 100755 --- a/reference-rpc-endpoint.sh +++ b/reference-rpc-endpoint.sh @@ -4,10 +4,7 @@ if [ $# -gt 2 ]; then exit 1 fi -read -r id -if [ -z "$id" ]; then - id="$1" -fi +id="$1" if [[ $id == 0x* ]]; then id=$(printf "%d" "$id") @@ -15,7 +12,7 @@ fi index="${2:-0}" -json_file="reference-rpc-endpoint.json" +json_file="/root/rpc/reference-rpc-endpoint.json" if [ ! -f "$json_file" ]; then exit 1 fi diff --git a/sync-status.sh b/sync-status.sh index 8f6f1718..15558f54 100755 --- a/sync-status.sh +++ b/sync-status.sh @@ -35,7 +35,7 @@ for path in $pathlist; do if [ -n "$2" ]; then ref="$2" else - chain_id=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' $RPC_URL | jq -r '.result') + chain_id=$(curl --ipv4 -m 1 -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' $RPC_URL | jq -r '.result') chain_id_decimal=$((16#${chain_id#0x})) ref=$($BASEPATH/reference-rpc-endpoint.sh $chain_id_decimal) fi