From 68a3179e6cc4b360e5de6c502f072f2db0341a01 Mon Sep 17 00:00:00 2001 From: squidbear <379651+czarly@users.noreply.github.com> Date: Mon, 24 Mar 2025 10:55:56 +0100 Subject: [PATCH] fix --- get-block.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-block.sh b/get-block.sh index d71cae8b..e05d6d9d 100755 --- a/get-block.sh +++ b/get-block.sh @@ -11,8 +11,8 @@ if is_decimal "$block_input"; then block_input="0x$(printf "%x" "$block_input")" fi -request="{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"${block_input}\",false],\"id\":1}" +request="{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"${block_input}\", false],\"id\":1}" 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}'