From 9ec970dadde17b9ba2340add6c540737b7a7faf2 Mon Sep 17 00:00:00 2001 From: Laia Soler Date: Thu, 12 Sep 2024 18:05:31 +0200 Subject: [PATCH 1/3] fix build dockerv2:contracts --- deployment/v2/3_deployContracts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/v2/3_deployContracts.ts b/deployment/v2/3_deployContracts.ts index 16db693e0..cbd75ba2e 100644 --- a/deployment/v2/3_deployContracts.ts +++ b/deployment/v2/3_deployContracts.ts @@ -430,7 +430,7 @@ async function main() { 0, // unused parameter ], { - initializer: "initialize", + initializer: "initialize(address,uint64,uint64,address,address,address,address,address,uint64,uint64)", constructorArgs: [ polygonZkEVMGlobalExitRoot?.target, polTokenAddress, From 2796cffa9ab1ef3432448ee07004539cec132655 Mon Sep 17 00:00:00 2001 From: Laia Soler Date: Fri, 13 Sep 2024 10:36:58 +0200 Subject: [PATCH 2/3] update forkID=11 docker build --- docker/scripts/tools/check-docker-deploy.js | 36 +++++++++++++++++++ .../v2/create_rollup_parameters_docker.json | 10 +++--- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 docker/scripts/tools/check-docker-deploy.js diff --git a/docker/scripts/tools/check-docker-deploy.js b/docker/scripts/tools/check-docker-deploy.js new file mode 100644 index 000000000..adb26d4f4 --- /dev/null +++ b/docker/scripts/tools/check-docker-deploy.js @@ -0,0 +1,36 @@ +/* eslint-disable no-await-in-loop */ + +const ethers = require('ethers'); +require('dotenv').config(); + +const rollupManagerAbi = require("../../../artifacts/contracts/v2/PolygonRollupManager.sol/PolygonRollupManager.json").abi; + +async function main() { + const currentProvider = ethers.getDefaultProvider('http://localhost:8545'); + const signerNode = await currentProvider.getSigner(); + + const rollupManagerContract = new ethers.Contract("0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", rollupManagerAbi, signerNode); + const infoContract = await rollupManagerContract.rollupIDToRollupDataV2(1); + const info = { + "rollupContract": infoContract[0], + "chainID": infoContract[1], + "verifier": infoContract[2], + "forkID": infoContract[3], + "lastLocalExitRoot": infoContract[4], + "lastBatchSequenced": infoContract[5], + "lastVerifiedBatch": infoContract[6], + "lastVerifiedBatchBeforeUpgrade": infoContract[7], + "rollupTypeID": infoContract[8], + "rollupVerifierType": infoContract[9], + "lastPessimisticRoot": infoContract[10], + "programVKey": infoContract[11], + } + console.log(info) +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/docker/scripts/v2/create_rollup_parameters_docker.json b/docker/scripts/v2/create_rollup_parameters_docker.json index d66bbb04a..f952ca9ed 100644 --- a/docker/scripts/v2/create_rollup_parameters_docker.json +++ b/docker/scripts/v2/create_rollup_parameters_docker.json @@ -6,12 +6,12 @@ "trustedSequencer": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "chainID": 1001, "adminZkEVM": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "forkID": 8, + "forkID": 11, "consensusContract": "PolygonPessimisticConsensus", - "gasTokenAddress":"", + "gasTokenAddress": "", "deployerPvtKey": "", - "maxFeePerGas":"", - "maxPriorityFeePerGas":"", + "maxFeePerGas": "", + "maxPriorityFeePerGas": "", "multiplierGas": "", "programVKey": "0xac51a6a2e513d02e4f39ea51d4d133cec200b940805f1054eabbb6d6412c959f" -} +} \ No newline at end of file From 8a0a09aac763fb51b57776da9e022c046c93575e Mon Sep 17 00:00:00 2001 From: Laia Soler Date: Fri, 13 Sep 2024 15:48:50 +0200 Subject: [PATCH 3/3] fix lint --- docker/scripts/tools/check-docker-deploy.js | 34 ++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docker/scripts/tools/check-docker-deploy.js b/docker/scripts/tools/check-docker-deploy.js index adb26d4f4..95e5203b0 100644 --- a/docker/scripts/tools/check-docker-deploy.js +++ b/docker/scripts/tools/check-docker-deploy.js @@ -1,31 +1,31 @@ -/* eslint-disable no-await-in-loop */ +/* eslint-disable no-console */ const ethers = require('ethers'); require('dotenv').config(); -const rollupManagerAbi = require("../../../artifacts/contracts/v2/PolygonRollupManager.sol/PolygonRollupManager.json").abi; +const rollupManagerAbi = require('../../../artifacts/contracts/v2/PolygonRollupManager.sol/PolygonRollupManager.json').abi; async function main() { const currentProvider = ethers.getDefaultProvider('http://localhost:8545'); const signerNode = await currentProvider.getSigner(); - const rollupManagerContract = new ethers.Contract("0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", rollupManagerAbi, signerNode); + const rollupManagerContract = new ethers.Contract('0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e', rollupManagerAbi, signerNode); const infoContract = await rollupManagerContract.rollupIDToRollupDataV2(1); const info = { - "rollupContract": infoContract[0], - "chainID": infoContract[1], - "verifier": infoContract[2], - "forkID": infoContract[3], - "lastLocalExitRoot": infoContract[4], - "lastBatchSequenced": infoContract[5], - "lastVerifiedBatch": infoContract[6], - "lastVerifiedBatchBeforeUpgrade": infoContract[7], - "rollupTypeID": infoContract[8], - "rollupVerifierType": infoContract[9], - "lastPessimisticRoot": infoContract[10], - "programVKey": infoContract[11], - } - console.log(info) + rollupContract: infoContract[0], + chainID: infoContract[1], + verifier: infoContract[2], + forkID: infoContract[3], + lastLocalExitRoot: infoContract[4], + lastBatchSequenced: infoContract[5], + lastVerifiedBatch: infoContract[6], + lastVerifiedBatchBeforeUpgrade: infoContract[7], + rollupTypeID: infoContract[8], + rollupVerifierType: infoContract[9], + lastPessimisticRoot: infoContract[10], + programVKey: infoContract[11], + }; + console.log(info); } main()