This commit is contained in:
squidbear
2025-03-24 10:55:56 +01:00
parent de597f9985
commit 68a3179e6c

View File

@@ -15,4 +15,4 @@ request="{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"
echo "${request}" echo "${request}"
curl -s -X POST "${1}" -H "Content-Type: application/json" --data "'${request}'" | jq -r '.result.number, .result.hash' | gawk '{if (NR==1) print "Block Number:", strtonum($0); else print "Block Hash:", $0}' curl -s -X POST "${1}" -H "Content-Type: application/json" --data "${request}" | jq -r '.result.number, .result.hash' | gawk '{if (NR==1) print "Block Number:", strtonum($0); else print "Block Hash:", $0}'