fix
This commit is contained in:
@@ -7,5 +7,5 @@
|
|||||||
"urls": ["https://eth.drpc.org"]},
|
"urls": ["https://eth.drpc.org"]},
|
||||||
"playnance-mainnet": {
|
"playnance-mainnet": {
|
||||||
"id": 1829,
|
"id": 1829,
|
||||||
"urls": ["https://rpc.playblock.io"]
|
"urls": ["https://rpc.playblock.io"]}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ if [ $# -gt 2 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -r id
|
|
||||||
if [ -z "$id" ]; then
|
|
||||||
id="$1"
|
id="$1"
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $id == 0x* ]]; then
|
if [[ $id == 0x* ]]; then
|
||||||
id=$(printf "%d" "$id")
|
id=$(printf "%d" "$id")
|
||||||
@@ -15,7 +12,7 @@ fi
|
|||||||
|
|
||||||
index="${2:-0}"
|
index="${2:-0}"
|
||||||
|
|
||||||
json_file="reference-rpc-endpoint.json"
|
json_file="/root/rpc/reference-rpc-endpoint.json"
|
||||||
if [ ! -f "$json_file" ]; then
|
if [ ! -f "$json_file" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ for path in $pathlist; do
|
|||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
ref="$2"
|
ref="$2"
|
||||||
else
|
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}))
|
chain_id_decimal=$((16#${chain_id#0x}))
|
||||||
ref=$($BASEPATH/reference-rpc-endpoint.sh $chain_id_decimal)
|
ref=$($BASEPATH/reference-rpc-endpoint.sh $chain_id_decimal)
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user