});
deepStrictEqual(hash, '0x166bd4b075db4a9e114568a8a880459dbc8b82d889d67f51c660fcea9795b6c1');
});
-});
\ No newline at end of file
+});
+
+suite('Hemi', { concurrency: true }, () => {
+ test('Block number 0', { concurrency: true }, () => {
+ const { hash } = calculate({
+ "baseFeePerGas": "0x3b9aca00",
+ "difficulty": "0x0",
+ "extraData": "0x5e205e20762076203c203e203c203e2042544320455448205354415254",
+ "gasLimit": "0x1c9c380",
+ "gasUsed": "0x0",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "miner": "0x4200000000000000000000000000000000000011",
+ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "nonce": "0x0000000000000000",
+ "number": "0x0",
+ "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
+ "size": "0x21f",
+ "stateRoot": "0xf43052e971c03bebb1f9cadf2f7188e8db3d5a502cd8249a1fd06e39ff390ada",
+ "timestamp": "0x66dea2d7",
+ "transactions": [],
+ "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "uncles": []
+ });
+ deepStrictEqual(hash, '0x6b070d8b8f3bf81c9314ff863748e3db2662ecc0a8dbd4c394a8b646ae0c8b8b');
+ });
+
+ test('Block number 3722528', { concurrency: true }, () => {
+ const { hash } = calculate({
+ "baseFeePerGas": "0xfc",
+ "blobGasUsed": "0x0",
+ "difficulty": "0x0",
+ "excessBlobGas": "0x0",
+ "extraData": "0x00000000fa00000006",
+ "gasLimit": "0x1c9c380",
+ "gasUsed": "0xca20",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "miner": "0x4200000000000000000000000000000000000011",
+ "mixHash": "0xfdc224cc3aa706a2963609ced4ce930a7a294c2afa53f35209687ee90fb74b3b",
+ "nonce": "0x0000000000000000",
+ "number": "0x38cd20",
+ "parentBeaconBlockRoot": "0xe1f8c779f42c2fc0c4c9544c296f87bd86d6e68324dff10bf78a03529a4471e3",
+ "parentHash": "0xbf9dc6b5d2fa0641408ee2853de4e2f8d26237a78e5e1fcf7cf80a26e109da20",
+ "receiptsRoot": "0xb451fae58174545e7ab534242ddf2f9f604ef466bd188296395881176824f159",
+ "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
+ "size": "0x380",
+ "stateRoot": "0x2ec0535d81a7a47029b7122e918651cc97863eae2c3e32cf4ed614a7d52e71b6",
+ "timestamp": "0x69884057",
+ "transactions": [
+ "0x486bc90ae9387758a0b994fec90fb8f34296ad222e8dedf46872c7a6172420e6"
+ ],
+ "transactionsRoot": "0x41c465ea7365b1caae2df48c81af835063d08e131ed8c6971e5dfd3d7da7ff93",
+ "uncles": [],
+ "withdrawals": [],
+ "withdrawalsRoot": "0x3c02fe0e41900e6f41b710696b27ed26ab3e8534e6682d69be464ecd962c6d3b"
+ });
+ deepStrictEqual(hash, '0x9e36e54280690bfab4a35e3b3daf1e25465fffeaa0f6a52d5cc64bdc2d0a6f55');
+ });
+});
<main>
<h1>Block Hash Calculator</h1>
<a href="https://github.com/ardislu/block-hash-calculator/">GitHub</a>
- <p>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.</p>
+ <p>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, Taiko Alethia, and Hemi.</p>
<form>
<label for="num">Block number (empty value will default to latest block)</label>
<input id="num" name="num" type="number" min="0" placeholder="12345678">