diff --git a/src/deployment/3_deployContracts.js b/src/deployment/3_deployContracts.js index 088f4ff..2b2c3cf 100644 --- a/src/deployment/3_deployContracts.js +++ b/src/deployment/3_deployContracts.js @@ -82,8 +82,10 @@ async function main() { pendingStateTimeout, forkID, zkEVMOwner, - timelockAddress, - minDelayTimelock, + /* + * timelockAddress, + * minDelayTimelock, + */ salt, zkEVMDeployerAddress, maticTokenAddress, @@ -101,7 +103,8 @@ async function main() { } else { if (deployParameters.multiplierGas || deployParameters.maxFeePerGas) { if (process.env.HARDHAT_NETWORK !== 'hardhat') { - currentProvider = new ethers.providers.JsonRpcProvider(`https://${process.env.HARDHAT_NETWORK}.infura.io/v3/${process.env.INFURA_PROJECT_ID}`); + // currentProvider = new ethers.providers.JsonRpcProvider(`https://${process.env.HARDHAT_NETWORK}.infura.io/v3/${process.env.INFURA_PROJECT_ID}`); + currentProvider = new ethers.providers.JsonRpcProvider('http://sepolia.backstop.technology'); if (deployParameters.maxPriorityFeePerGas && deployParameters.maxFeePerGas) { console.log(`Hardcoded gas used: MaxPriority${deployParameters.maxPriorityFeePerGas} gwei, MaxFee${deployParameters.maxFeePerGas} gwei`); const FEE_DATA = { @@ -608,7 +611,7 @@ async function main() { parentContract, minter, 'Forkonomic Token', - 'FORK', + 'ZBS', ); } } catch (e) { @@ -645,57 +648,58 @@ async function main() { * expect(await upgrades.erc1967.getAdminAddress(forkingManagerContract.address)).to.be.equal(proxyAdminAddress); */ - const proxyAdminFactory = await ethers.getContractFactory('ProxyAdmin', deployer); - const proxyAdminInstance = proxyAdminFactory.attach(proxyAdminAddress); - const proxyAdminOwner = await proxyAdminInstance.owner(); - - -/* - const timelockContractFactory = await ethers.getContractFactory('PolygonZkEVMTimelock', deployer); - - let timelockContract; - if (proxyAdminOwner !== deployer.address) { - // Check if there's a timelock deployed there that match the current deployment - timelockContract = timelockContractFactory.attach(proxyAdminOwner); - expect(precalculateZkevmAddress).to.be.equal(await timelockContract.polygonZkEVM()); - - console.log('#######################\n'); - console.log( - 'Polygon timelockContract already deployed to:', - timelockContract.address, - ); - } else { - // deploy timelock - console.log('\n#######################'); - console.log('##### Deployment TimelockContract #####'); - console.log('#######################'); - console.log('minDelayTimelock:', minDelayTimelock); - console.log('timelockAddress:', timelockAddress); - console.log('zkEVMAddress:', polygonZkEVMContract.address); - timelockContract = await timelockContractFactory.deploy( - minDelayTimelock, - [timelockAddress], - [timelockAddress], - timelockAddress, - polygonZkEVMContract.address, - ); - await timelockContract.deployed(); - console.log('#######################\n'); - console.log( - 'Polygon timelockContract deployed to:', - timelockContract.address, - ); - - // Transfer ownership of the proxyAdmin to timelock - await upgrades.admin.transferProxyAdminOwnership(timelockContract.address); - } + /* + * const proxyAdminFactory = await ethers.getContractFactory('ProxyAdmin', deployer); + * const proxyAdminInstance = proxyAdminFactory.attach(proxyAdminAddress); + * const proxyAdminOwner = await proxyAdminInstance.owner(); + */ - console.log('\n#######################'); - console.log('##### Checks TimelockContract #####'); - console.log('#######################'); - console.log('minDelayTimelock:', await timelockContract.getMinDelay()); - console.log('polygonZkEVM:', await timelockContract.polygonZkEVM()); -*/ + /* + *const timelockContractFactory = await ethers.getContractFactory('PolygonZkEVMTimelock', deployer); + * + *let timelockContract; + *if (proxyAdminOwner !== deployer.address) { + * // Check if there's a timelock deployed there that match the current deployment + * timelockContract = timelockContractFactory.attach(proxyAdminOwner); + * expect(precalculateZkevmAddress).to.be.equal(await timelockContract.polygonZkEVM()); + * + * console.log('#######################\n'); + * console.log( + * 'Polygon timelockContract already deployed to:', + * timelockContract.address, + * ); + *} else { + * // deploy timelock + * console.log('\n#######################'); + * console.log('##### Deployment TimelockContract #####'); + * console.log('#######################'); + * console.log('minDelayTimelock:', minDelayTimelock); + * console.log('timelockAddress:', timelockAddress); + * console.log('zkEVMAddress:', polygonZkEVMContract.address); + * timelockContract = await timelockContractFactory.deploy( + * minDelayTimelock, + * [timelockAddress], + * [timelockAddress], + * timelockAddress, + * polygonZkEVMContract.address, + * ); + * await timelockContract.deployed(); + * console.log('#######################\n'); + * console.log( + * 'Polygon timelockContract deployed to:', + * timelockContract.address, + * ); + * + * // Transfer ownership of the proxyAdmin to timelock + * await upgrades.admin.transferProxyAdminOwnership(timelockContract.address); + *} + * + *console.log('\n#######################'); + *console.log('##### Checks TimelockContract #####'); + *console.log('#######################'); + *console.log('minDelayTimelock:', await timelockContract.getMinDelay()); + *console.log('polygonZkEVM:', await timelockContract.polygonZkEVM()); + */ const outputJson = { polygonZkEVMAddress: polygonZkEVMContract.address, @@ -708,7 +712,7 @@ async function main() { verifierAddress: verifierContract.address, zkEVMDeployerContract: zkEVMDeployerContract.address, deployerAddress: deployer.address, - //timelockContractAddress: timelockContract.address, + // timelockContractAddress: timelockContract.address, deploymentBlockNumber, genesisRoot: genesisRootHex, trustedSequencer,