diff --git a/docs/testnet/PolygonZkEVMTestnet.md b/docs/testnet/PolygonZkEVMTestnet.md index 73029150c..18b2857e1 100644 --- a/docs/testnet/PolygonZkEVMTestnet.md +++ b/docs/testnet/PolygonZkEVMTestnet.md @@ -1,5 +1,5 @@ Contract responsible for managing the state and the updates of the L2 network -This contract will NOT BE USED IN PRODUCTION, will be used only in testnet enviroment +This contract will NOT BE USED IN PRODUCTION, will be used only in testnet environment ## Functions @@ -72,7 +72,7 @@ Set new forcedBatchTimeout ) public ``` Set new forced batches allowed -Defined as a uint256 because it will be easy to updgrade afterwards +Defined as a uint256 because it will be easy to upgrade afterwards #### Parameters: diff --git a/docs/testnet/PolygonZkEVMTestnetClearStorage.md b/docs/testnet/PolygonZkEVMTestnetClearStorage.md index 4a004aff6..cf2ab9191 100644 --- a/docs/testnet/PolygonZkEVMTestnetClearStorage.md +++ b/docs/testnet/PolygonZkEVMTestnetClearStorage.md @@ -1,5 +1,5 @@ Contract responsible for managing the state and the updates of the L2 network -This contract will NOT BE USED IN PRODUCTION, will be used only in testnet enviroment +This contract will NOT BE USED IN PRODUCTION, will be used only in testnet environment ## Functions diff --git a/docs/testnet/PolygonZkEVMTestnetV2.md b/docs/testnet/PolygonZkEVMTestnetV2.md index a742f138d..c8dc41e76 100644 --- a/docs/testnet/PolygonZkEVMTestnetV2.md +++ b/docs/testnet/PolygonZkEVMTestnetV2.md @@ -1,5 +1,5 @@ Contract responsible for managing the state and the updates of the L2 network -This contract will NOT BE USED IN PRODUCTION, will be used only in testnet enviroment +This contract will NOT BE USED IN PRODUCTION, will be used only in testnet environment ## Functions diff --git a/src/permit-helper.js b/src/permit-helper.js index b745a6da6..5cdf245c1 100644 --- a/src/permit-helper.js +++ b/src/permit-helper.js @@ -9,7 +9,7 @@ const { expect } = require('chai'); * @param {String} value - Value of the permit * @param {String} nonce - Nonce of the permit * @param {String} deadline - Deadline of the permit - * @returns {Object} - Signature obejct, { v, r, s} + * @returns {Object} - Signature object, { v, r, s} */ async function createPermitSignature(tokenContractInstance, wallet, spenderAddress, value, nonce, deadline, chainId) { const name = await tokenContractInstance.name(); @@ -60,7 +60,7 @@ async function createPermitSignature(tokenContractInstance, wallet, spenderAddre * @param {String} nonce - Nonce of the permit * @param {String} expiry - expiry of the permit * @param {Number} chainId - expiry of the permit - * @returns {Object} - Signature obejct, { v, r, s} + * @returns {Object} - Signature object, { v, r, s} */ async function createPermitSignatureDaiType(tokenContractInstance, wallet, spenderAddress, nonce, expiry, chainId) { const name = await tokenContractInstance.name(); @@ -111,7 +111,7 @@ async function createPermitSignatureDaiType(tokenContractInstance, wallet, spend * @param {String} nonce - Nonce of the permit * @param {String} deadline - Deadline of the permit * @param {Number} chainId - expiry of the permit - * @returns {Object} - Signature obejct, { v, r, s} + * @returns {Object} - Signature object, { v, r, s} */ async function createPermitSignatureUniType(tokenContractInstance, wallet, spenderAddress, value, nonce, deadline, chainId) { const name = await tokenContractInstance.name(); diff --git a/test/contracts/bridge.test.js b/test/contracts/bridge.test.js index d88714fda..725dc1a2f 100644 --- a/test/contracts/bridge.test.js +++ b/test/contracts/bridge.test.js @@ -612,7 +612,7 @@ describe('PolygonZkEVMBridge Contract', () => { * const height = 32; */ const merkleTreeMainnet = new MerkleTreeBridge(height); - // Imporant calcualte leaf with origin token address no wrapped token address + // Important calculate leaf with origin token address no wrapped token address const originTokenAddress = tokenAddress; const metadataMainnet = '0x'; // since the token does not belong to this network const metadataHashMainnet = ethers.solidityPackedKeccak256(['bytes'], [metadataMainnet]); diff --git a/test/contracts/bridgeMock.test.js b/test/contracts/bridgeMock.test.js index 7c3c583c1..704e901f9 100644 --- a/test/contracts/bridgeMock.test.js +++ b/test/contracts/bridgeMock.test.js @@ -130,7 +130,7 @@ describe('PolygonZkEVMBridge Mock Contract', () => { expect(computedGlobalExitRoot).to.be.equal(await polygonZkEVMGlobalExitRoot.getLastGlobalExitRoot()); }); - it('shouldnt be able to PolygonZkEVMBridge more thna 0.25e ehters', async () => { + it('shouldnt be able to PolygonZkEVMBridge more than 0.25e ehters', async () => { // Add a claim leaf to rollup exit tree const tokenAddress = ethers.ZeroAddress; // ether const amount = ethers.parseEther('10'); diff --git a/test/contracts/polygonZkEVM.test.js b/test/contracts/polygonZkEVM.test.js index 4d3855225..295ee6ce8 100644 --- a/test/contracts/polygonZkEVM.test.js +++ b/test/contracts/polygonZkEVM.test.js @@ -510,7 +510,7 @@ describe('Polygon ZK-EVM', () => { const sequencedBatchData2 = await polygonZkEVMContract.sequencedBatches(2); const batchAccInputHash2 = sequencedBatchData2.accInputHash; - // Calcultate input Hahs for batch 1 + // Calculate input Hahs for batch 1 let batchAccInputHashJs = calculateAccInputHash( ethers.HashZero, calculateBatchHashData(sequence.transactions), @@ -519,7 +519,7 @@ describe('Polygon ZK-EVM', () => { trustedSequencer.address, ); - // Calcultate input Hahs for batch 2 + // Calculate input Hahs for batch 2 batchAccInputHashJs = calculateAccInputHash( batchAccInputHashJs, calculateBatchHashData(sequence2.transactions), @@ -656,7 +656,7 @@ describe('Polygon ZK-EVM', () => { /* * Check batch mapping - * Calcultate input Hahs for batch 1 + * Calculate input Hahs for batch 1 */ let batchAccInputHashJs = calculateAccInputHash( ethers.HashZero, @@ -666,7 +666,7 @@ describe('Polygon ZK-EVM', () => { trustedSequencer.address, ); - // Calcultate input Hahs for batch 2 + // Calculate input Hahs for batch 2 batchAccInputHashJs = calculateAccInputHash( batchAccInputHashJs, calculateBatchHashData(sequence2.transactions), @@ -712,7 +712,7 @@ describe('Polygon ZK-EVM', () => { let currentTimestamp = (await ethers.provider.getBlock()).timestamp; await ethers.provider.send('evm_increaseTime', [1]); // evm_setNextBlockTimestamp - sequence.timestamp = currentTimestamp + 2; // bigger than current block tiemstamp + sequence.timestamp = currentTimestamp + 2; // bigger than current block timestamp // revert because timestamp is more than the current one await expect(polygonZkEVMContract.connect(trustedSequencer).sequenceBatches([sequence], trustedSequencer.address)) @@ -1796,7 +1796,7 @@ describe('Polygon ZK-EVM', () => { await ethers.provider.send('evm_setNextBlockTimestamp', [sequencedTimestmap + haltTimeout]); - // Succesfully acitvate emergency state + // Successfully activate emergency state await expect(polygonZkEVMContract.connect(aggregator1).activateEmergencyState(1)) .to.emit(polygonZkEVMContract, 'EmergencyStateActivated'); }); diff --git a/test/contracts/snark_stark_input.test.js b/test/contracts/snark_stark_input.test.js index b46f0f2cf..0b7b4692e 100644 --- a/test/contracts/snark_stark_input.test.js +++ b/test/contracts/snark_stark_input.test.js @@ -51,7 +51,7 @@ describe('Polygon ZK-EVM snark stark input test', () => { await polygonZkEVMContract.deployed(); }); - it('Check Accumualte input Hash', async () => { + it('Check Accumulate input Hash', async () => { const oldAccInputHash = '0x0000000000000000000000000000000000000000000000000000000000000000'; const globalExitRoot = '0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9'; const timestamp = 1944498031; diff --git a/test/contracts/timelockUpgradeTest.js b/test/contracts/timelockUpgradeTest.js index 5fd9bf75c..61a2f9729 100644 --- a/test/contracts/timelockUpgradeTest.js +++ b/test/contracts/timelockUpgradeTest.js @@ -276,7 +276,7 @@ describe('Polygon ZK-EVM', () => { // Check that is the v0 contract await expect(polygonZkEVMBridgeContractV2.maxEtherBridge()).to.be.reverted; - // Transaction cna be executed, delay is reduced to 0, but fails bc this timelock is not owner + // Transaction can be executed, delay is reduced to 0, but fails bc this timelock is not owner await expect(timelockContract.execute( operation.target, operation.value, @@ -338,7 +338,7 @@ describe('Polygon ZK-EVM', () => { /* * Put zkevmcontract on emergency mode - * Does not affect thsi deployment + * Does not affect this deployment */ await polygonZkEVMContract.activateEmergencyState(0); @@ -367,7 +367,7 @@ describe('Polygon ZK-EVM', () => { // Check that is the v0 contract await expect(polygonZkEVMBridgeContractV2.maxEtherBridge()).to.be.reverted; - // Transaction cna be executed, delay is reduced to 0, but fails bc this timelock is not owner + // Transaction can be executed, delay is reduced to 0, but fails bc this timelock is not owner await expect(timelockContractL2.execute( operation.target, operation.value, diff --git a/verifyMainnetDeployment/verifyDeployment.md b/verifyMainnetDeployment/verifyDeployment.md index 25fdc9da3..83f3006f2 100644 --- a/verifyMainnetDeployment/verifyDeployment.md +++ b/verifyMainnetDeployment/verifyDeployment.md @@ -26,8 +26,8 @@ git checkout 7a8d0c1950cf267fb7b10be8a47506754399cd4a ## Verify deployment -In order to verify the deployment, we will compare the deployed bytecode with the compiled locally. Some of the contracts use [`immutables`](https://docs.soliditylang.org/en/v0.8.19/contracts.html#immutable), in that case it's not enough to just compile the code and compare withthe deployed bytecode. -The easiest way is to verify this contracts is to deploy them on a local enviroment and then compare the bytecodes of this contracts and the mainnet ones. +In order to verify the deployment, we will compare the deployed bytecode with the compiled locally. Some of the contracts use [`immutables`](https://docs.soliditylang.org/en/v0.8.19/contracts.html#immutable), in that case it's not enough to just compile the code and compare with the deployed bytecode. +The easiest way is to verify this contracts is to deploy them on a local environment and then compare the bytecodes of this contracts and the mainnet ones. In order to launch the script, you need a mainnet provider. In root of the project create a `.env` file you Infura api key information: @@ -53,9 +53,9 @@ This script verifies the deployed bytecode of the address provided in `deploymen ## Verify genesis root -At the end of the previous script we also verify that the genesis provided in the`deploymentMainnet.json` matches hte one in the `polygonZkEVM` +At the end of the previous script we also verify that the genesis provided in the`deploymentMainnet.json` matches the one in the `polygonZkEVM` -In order to verify the genesis, you can the script to generate it. The script in a very similar behaviour of the last script, deploy localy the contracts and then copy the deployed btyecode into the corresponding address. +In order to verify the genesis, you can the script to generate it. The script in a very similar behaviour of the last script, deploy locally the contracts and then copy the deployed btyecode into the corresponding address. ```bash= node deployment/1_createGenesis.js --input ../verifyMainnetDeployment/mainnetDeployParameters.json --out ../verifyMainnetDeployment/genesis.json diff --git a/verifyMainnetDeployment/verifyMainnetProofVerifier.md b/verifyMainnetDeployment/verifyMainnetProofVerifier.md index dc028a11b..aa76513a4 100644 --- a/verifyMainnetDeployment/verifyMainnetProofVerifier.md +++ b/verifyMainnetDeployment/verifyMainnetProofVerifier.md @@ -13,7 +13,7 @@ sudo apt update sudo apt install -y tmux git curl ```` -## Tweeking the OS to accept high amount of memory. +## Tweaking the OS to accept high amount of memory. ````bash echo "vm.max_map_count=655300" | sudo tee -a /etc/sysctl.conf