From: Ardis Lu Date: Wed, 18 Sep 2024 04:15:56 +0000 (-0700) Subject: Update capitalization of "ZKsync" to match official docs X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=4c709c2f8d2f30c3b7ca5686a95043268d17d110;p=block-hash-calculator Update capitalization of "ZKsync" to match official docs --- diff --git a/calculate.js b/calculate.js index df20fd7..6b5ee47 100644 --- a/calculate.js +++ b/calculate.js @@ -86,7 +86,7 @@ function calculate(block) { }; } -// zkSync Era ABI-encodes its block header parameters instead of RLP-encoding +// ZKsync Era ABI-encodes its block header parameters instead of RLP-encoding // https://docs.zksync.io/zk-stack/concepts/blocks#l2-blockhash-calculation-and-storage function calculateZkSync(block) { // Block number 13234791 was not documented in the upgrade spec but retrieved from manual testing diff --git a/calculate.test.js b/calculate.test.js index 81ca57e..8aefa9b 100644 --- a/calculate.test.js +++ b/calculate.test.js @@ -746,7 +746,7 @@ suite('Polygon zkEVM', { concurrency: true }, () => { }); }); -suite('zkSync Era', { concurrency: true }, () => { +suite('ZKsync Era', { concurrency: true }, () => { test('Block number 0', { concurrency: true }, () => { const { hash } = calculateZkSync({ "baseFeePerGas": "0x0", diff --git a/index.html b/index.html index 5a7119f..fe5e331 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, and Avalanche C-Chain.

+

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, and ZKsync Era.

@@ -80,7 +80,7 @@ if (block !== undefined) { const { header, encoded, hash } = calculate(block); - if (hash !== block.hash) { // TODO: use a better heuristic to determine if it's zkSync + if (hash !== block.hash) { // TODO: use a better heuristic to determine if it's ZKsync Era const { header, encoded, hash } = calculateZkSync(block); document.querySelector('#out-header').textContent = `[\n ${header.join(',\n ')}\n]`; document.querySelector('#out-encoded').textContent = encoded;