});
});
-suite('Blast', { 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": "0xb47ebef1f65d4c8e9fb61ff915cde0e875f9384d54fb5ea75ec907600156f183",
- "timestamp": "0x65da5e57",
- "totalDifficulty": "0x0",
- "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
- "uncles": [],
- "withdrawals": [],
- "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
- });
- deepStrictEqual(hash, '0xb689b35ef29d0bec5816938e0e52683c7257d2e325420ea69b739a2be4754b89');
- });
-
- test('Block number 4766974', { concurrency: true }, () => {
- const { hash } = calculate({
- "baseFeePerGas": "0x67dcd84",
- "blobGasUsed": "0x0",
- "difficulty": "0x0",
- "excessBlobGas": "0x0",
- "extraData": "0x",
- "gasLimit": "0x1c9c380",
- "gasUsed": "0x613bf4",
- "logsBloom": "0x06200499441008000e9034408200000000188000002308400ca0d2000800002491a088860800008008c221100404000045329a0c21707000600a138030208002612625002404070800c800082045102000010004024822000200221e80814d0000800009262b0410200880c010408811000a015008940401040914584889004800220100aa086010080c00dc0005205090810803002122c800214240504020040680010000804020020081c0a01a0100a00020001000080800882060082c9181020c0c2208081001011048284c00820a08000004040450988a60520b624021240210c0004400800029001190400c200240e00161480918468008c08100089000",
- "miner": "0x4200000000000000000000000000000000000011",
- "mixHash": "0x2469371d5b6559a91eec9ffebaf00dbb9f49f61400172b9c57f5024923244e2e",
- "nonce": "0x0000000000000000",
- "number": "0x48bcfe",
- "parentBeaconBlockRoot": "0x8398bba6ef4d175173e892a6d91ad094ee383f060e8f7649448aff97c440963f",
- "parentHash": "0xbb682e8a0b6dca973bc44db2ea72590cd871bce3e783277b941806db641de462",
- "receiptsRoot": "0xe7226c4c090fccb021021eddcc3698b61b10f0ebaedda2c720e999ee119fa5f7",
- "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- "size": "0x3ba4",
- "stateRoot": "0x4aaa216afe16ebb21304bee9d8abe5d293a71054e71bc408c8b15b26366443c9",
- "timestamp": "0x666bd853",
- "totalDifficulty": "0x0",
- "transactionsRoot": "0xd1e3b2da095890fc335c8bd79e0e139d0ffa1b42e0ccabd51ae5bfd88680a0be",
- "uncles": [],
- "withdrawals": [],
- "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
- });
- deepStrictEqual(hash, '0xb3e21dd13672a3fee8c2d2d3ddefe698acb16ecb3338dab87931e44b7375f0d6');
- });
-});
-
suite('Mantle', { concurrency: true }, () => {
test('Block number 0', { concurrency: true }, () => {
const { hash } = calculate({
<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, Taiko Alethia, Hemi, and Tempo.</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, Mantle, Avalanche C-Chain, ZKsync Era, Ink Mainnet, Sonic Mainnet, Unichain, World Chain, Soneium, Zircuit Mainnet, Taiko Alethia, Hemi, and Tempo.</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">