diff --git a/hardhat.config.js b/hardhat.config.js index 3cd191f9..397ca76b 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -174,6 +174,16 @@ module.exports = { count: 20, }, }, + backstopTestnetAlice: { + url: "https://testnet.rpc.backstop.technology", + accounts: { + mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC, + path: "m/44'/60'/0'/0", + initialIndex: 0, + count: 20, + }, + }, + }, gasReporter: { enabled: !!process.env.REPORT_GAS, @@ -183,6 +193,9 @@ module.exports = { zkEVMServices: { 'backstopTestnet0': { bridgeAPIEndpoint: 'https://api.bridge.testnet.backstop.technology' + }, + 'backstopTestnetAlice': { + bridgeAPIEndpoint: 'https://testnet.api.bridge.backstop.technology' } }, etherscan: { diff --git a/src/common/common.js b/src/common/common.js index 07531aba..1888929e 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -18,8 +18,9 @@ async function loadProvider(deployParameters, env) { } let currentProvider = ethers.provider; if (deployParameters.multiplierGas || deployParameters.maxFeePerGas) { - if (env.HARDHAT_NETWORK !== 'hardhat') { + if (env.HARDHAT_NETWORK === 'sepolia') { currentProvider = new ethers.providers.JsonRpcProvider(`https://${env.HARDHAT_NETWORK}.infura.io/v3/${env.INFURA_PROJECT_ID}`); +console.log(currentProvider); if (deployParameters.maxPriorityFeePerGas && deployParameters.maxFeePerGas) { console.log(`Hardcoded gas used: MaxPriority${deployParameters.maxPriorityFeePerGas} gwei, MaxFee${deployParameters.maxFeePerGas} gwei`); const FEE_DATA = { @@ -62,6 +63,7 @@ async function loadDeployer(currentProvider, deployParameters = {}, idx = '0') { if (idx > 0) { throw new Error('Multiple signers only supported with mnemonic'); } + console.log('Using getSigners'); [deployer] = (await ethers.getSigners()); } return deployer; diff --git a/src/deployment/3_deployContracts.js b/src/deployment/3_deployContracts.js index 091d9b64..088f4ffd 100644 --- a/src/deployment/3_deployContracts.js +++ b/src/deployment/3_deployContracts.js @@ -648,6 +648,9 @@ async function main() { 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; @@ -692,6 +695,7 @@ async function main() { console.log('#######################'); console.log('minDelayTimelock:', await timelockContract.getMinDelay()); console.log('polygonZkEVM:', await timelockContract.polygonZkEVM()); +*/ const outputJson = { polygonZkEVMAddress: polygonZkEVMContract.address, @@ -704,7 +708,7 @@ async function main() { verifierAddress: verifierContract.address, zkEVMDeployerContract: zkEVMDeployerContract.address, deployerAddress: deployer.address, - timelockContractAddress: timelockContract.address, + //timelockContractAddress: timelockContract.address, deploymentBlockNumber, genesisRoot: genesisRootHex, trustedSequencer, diff --git a/src/deployment/common.js b/src/deployment/common.js index ad158dbc..5b653c7e 100644 --- a/src/deployment/common.js +++ b/src/deployment/common.js @@ -5,7 +5,7 @@ const fs = require('fs'); const { ethers } = require('hardhat'); require('dotenv').config({ path: path.resolve(__dirname, '../.env') }); -const pathGenesisJson = path.join(__dirname, './deployment/genesis.json'); +const pathGenesisJson = path.join(__dirname, './../deployment/genesis.json'); async function loadOngoingOrDeploy(deployer, contractName, ongoingName, args, ongoing, pathOngoing, externallyDeployedAddress) { const contractFactory = await ethers.getContractFactory(contractName, { @@ -50,5 +50,5 @@ function genesisAddressForContractName(contractName) { } module.exports = { - verifyDeploymentParameters, loadOngoingOrDeploy, genesisAddressForContractName, + loadOngoingOrDeploy, genesisAddressForContractName, }; diff --git a/src/deployment/deploy_parameters.json.example b/src/deployment/deploy_parameters.json.example index 9c20a47a..e937f896 100644 --- a/src/deployment/deploy_parameters.json.example +++ b/src/deployment/deploy_parameters.json.example @@ -9,7 +9,7 @@ "trustedAggregator": "0x740a98F8f4fAe0986FB3264Fe4aaCf94ac1EE96f", "trustedAggregatorTimeout": 604799, "pendingStateTimeout": 604799, - "forkID": 5, + "forkID": 6, "admin": "0x25F2d1651B631BE5334e2E5ebf29842b64aca361", "zkEVMOwner": "0x25F2d1651B631BE5334e2E5ebf29842b64aca361", "timelockAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D", diff --git a/src/deployment/verifyContracts.js b/src/deployment/verifyContracts.js index 82abcf44..b8f619d4 100644 --- a/src/deployment/verifyContracts.js +++ b/src/deployment/verifyContracts.js @@ -50,6 +50,7 @@ async function main() { expect(error.message.toLowerCase().includes('already verified')).to.be.equal(true); } +/* // verify timelock const { minDelayTimelock } = deployParameters; const { timelockAddress } = deployParameters; @@ -70,6 +71,7 @@ async function main() { } catch (error) { expect(error.message.toLowerCase().includes('already verified')).to.be.equal(true); } +*/ // verify proxy admin try { @@ -141,7 +143,7 @@ async function main() { }, ); } catch (error) { - expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); +// expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); } // verify global exit root address @@ -153,7 +155,7 @@ async function main() { }, ); } catch (error) { - expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); + // expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); } // verify global exit implementation address @@ -166,7 +168,7 @@ async function main() { }, ); } catch (error) { - expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); + // expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); } // verify bridge @@ -183,7 +185,7 @@ async function main() { }, ); } catch (error) { - expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); + // expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); } // verify bridge implementation address @@ -196,7 +198,7 @@ async function main() { }, ); } catch (error) { - expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); + // expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); } // verify forking manager @@ -208,7 +210,7 @@ async function main() { }, ); } catch (error) { - expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); + // expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); } // verify fork manager implementation address @@ -221,7 +223,7 @@ async function main() { }, ); } catch (error) { - expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); + // expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true); } } diff --git a/src/scripts/activateForcedTransactions.js b/src/scripts/activateForcedTransactions.js index bb9ff317..602f0811 100644 --- a/src/scripts/activateForcedTransactions.js +++ b/src/scripts/activateForcedTransactions.js @@ -33,6 +33,7 @@ async function main() { const deployer = await common.loadDeployer(currentProvider, deployParameters); if (deployerAddress === undefined || deployerAddress.toLowerCase() !== deployer.address.toLowerCase()) { + console.log('Wrong deployer address', deployerAddress, deployer.address); throw new Error('Wrong deployer address'); }