From 6b3389b716d9da1a31f37a417b3ddff857dee023 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Fri, 16 May 2025 23:20:15 -0700 Subject: [PATCH] Add tests for Zircuit Mainnet --- calculate.test.js | 59 +++++++++++++++++++++++++++++++++++++++++++++++ index.html | 2 +- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/calculate.test.js b/calculate.test.js index 9c4e939..7ad753f 100644 --- a/calculate.test.js +++ b/calculate.test.js @@ -1305,4 +1305,63 @@ suite('Soneium', { concurrency: true }, () => { }); deepStrictEqual(hash, '0xd98e41f78d38a334568365a9107422b59f82ff78e015b4edfa1449360e3bbaab'); }); +}); + +suite('Zircuit Mainnet', { concurrency: true }, () => { + test('Block number 0', { concurrency: true }, () => { + const { hash } = calculate({ + "baseFeePerGas": "0x3b9aca00", + "difficulty": "0x0", + "extraData": "0x424544524f434b", + "gasLimit": "0x1c9c380", + "gasUsed": "0x0", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x4200000000000000000000000000000000000011", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x22b", + "stateRoot": "0x66b9e8d5edb95f71fea938a5b280857f075e7c7af114e5099c130bcb95122125", + "timestamp": "0x668424d7", + "totalDifficulty": "0x0", + "transactions": [], + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncles": [], + "withdrawals": [], + "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" + }); + deepStrictEqual(hash, '0x8500cf54183cec3749819985286df1ecfbd06999fe78ad19d3c3fbdbc34f07bd'); + }); + + test('Block number 13763216', { concurrency: true }, () => { + const { hash } = calculate({ + "baseFeePerGas": "0xf9", + "blobGasUsed": "0x0", + "difficulty": "0x0", + "excessBlobGas": "0x0", + "extraData": "0x", + "gasLimit": "0x989680", + "gasUsed": "0xd2cb", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x4200000000000000000000000000000000000011", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0xd20290", + "parentHash": "0x3d608d3572e60f95207a3a1349a419a26e4c85591a121150c78ef6c1e0a625fa", + "receiptsRoot": "0xac95221f25b69f8c0078c8e62ac0a9b28078ba0b7b31027c3f654b8decd3db40", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x334", + "stateRoot": "0x0d49de372a9ab5465542cbec5283be732d3470801da2e4a500e06ede616046fe", + "timestamp": "0x682829f7", + "totalDifficulty": "0x0", + "transactionsRoot": "0xe8e698a2dc198246b48f299bdba519c4d088a544430e7e75807a9e4914f3fa81", + "uncles": [], + "withdrawals": [], + "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" + }); + deepStrictEqual(hash, '0xd29b721809d90861ece2cbee6499ddb8b9e97a5ee1348724dfcc9588caee8a8a'); + }); }); \ No newline at end of file diff --git a/index.html b/index.html index 6f8b86d..f92b8f1 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@

Block Hash Calculator

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, and Soneium.

+

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, and Zircuit Mainnet.

-- 2.47.3