]> git.ardis.lu - block-hash-calculator/commitdiff
Update capitalization of "ZKsync" to match official docs
authorArdis Lu <ardisglu@gmail.com>
Wed, 18 Sep 2024 04:15:56 +0000 (21:15 -0700)
committerArdis Lu <ardisglu@gmail.com>
Wed, 18 Sep 2024 04:15:56 +0000 (21:15 -0700)
calculate.js
calculate.test.js
index.html

index df20fd737b484b2dbd6b7e311f9ca504e17ec455..6b5ee47f61a20cc3b35d26f49d834541bd77ce8e 100644 (file)
@@ -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
index 81ca57ef1562afc22096ee2267e992607df61b96..8aefa9b3682dd4830925f354d766d74488bdf1c9 100644 (file)
@@ -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",
index 5a7119f57539703bcd46a169fc072751bb464ba3..fe5e331c182c182ef62a48936b3ce53bbc9d0294 100644 (file)
@@ -25,7 +25,7 @@
   <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, and Avalanche C-Chain.</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, and ZKsync Era.</p>
     <form>
       <label for="num">Block number</label>
       <input id="num" name="num" type="number" min="0" placeholder="12345678" required>
@@ -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;
This page took 0.03832 seconds and 4 git commands to generate.