Skip to content

Commit

Permalink
Merge pull request #130 from criadoperez/fix/criadoperez
Browse files Browse the repository at this point in the history
fix: multiple typos
  • Loading branch information
invocamanman committed Jan 30, 2024
2 parents 1359a76 + 077b22f commit 7cb1c9c
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions docs/testnet/PolygonZkEVMTestnet.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/testnet/PolygonZkEVMTestnetClearStorage.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/testnet/PolygonZkEVMTestnetV2.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/permit-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/contracts/bridge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion test/contracts/bridgeMock.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
12 changes: 6 additions & 6 deletions test/contracts/polygonZkEVM.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down Expand Up @@ -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,
Expand All @@ -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),
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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');
});
Expand Down
2 changes: 1 addition & 1 deletion test/contracts/snark_stark_input.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions test/contracts/timelockUpgradeTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions verifyMainnetDeployment/verifyDeployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion verifyMainnetDeployment/verifyMainnetProofVerifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7cb1c9c

Please sign in to comment.