From 6c70fd8869f231ea348979ae2dacc7e332f11418 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 28 Jun 2025 22:46:35 -0700 Subject: [PATCH] Make block number field optional --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index a25ab30..acdd32b 100644 --- a/index.html +++ b/index.html @@ -27,8 +27,8 @@ GitHub

Enter a block number and a JSON-RPC provider below to recalculate the block's hash from its header fields. Known supported networks: Ethereum, Polygon PoS, BNB Chain, OP Mainnet, Base, Arbitrum One, Linea, Scroll, Blast, Mantle, Avalanche C-Chain, ZKsync Era, Ink Mainnet, Sonic Mainnet, Unichain, World Chain, Soneium, Zircuit Mainnet, and Taiko Alethia.

- - + + @@ -72,7 +72,7 @@ jsonrpc: '2.0', id: 1, method: 'eth_getBlockByNumber', - params: [`0x${BigInt(num).toString(16)}`, false] + params: [num === '' ? 'latest' : `0x${BigInt(num).toString(16)}`, false] }) }).then(r => r.json()).catch(e => e); -- 2.47.3