fix
This commit is contained in:
@@ -7,5 +7,5 @@
|
||||
"urls": ["https://eth.drpc.org"]},
|
||||
"playnance-mainnet": {
|
||||
"id": 1829,
|
||||
"urls": ["https://rpc.playblock.io"]
|
||||
"urls": ["https://rpc.playblock.io"]}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@ if [ $# -gt 2 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -r id
|
||||
if [ -z "$id" ]; then
|
||||
id="$1"
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user