diff --git a/packages/protocol/package.json b/packages/protocol/package.json index d380064d187..75388cfd916 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -20,7 +20,7 @@ "test:integration": "TEST_TYPE=integration ./test/test_integration.sh", "test:tokenomics": "TEST_TYPE=tokenomics ./test/test_integration.sh", "test:all": "pnpm run test && pnpm run test:integration && pnpm run test:tokenomics && pnpm run test:genesis", - "deploy:hardhat": "./scripts/download_solc.sh && LOG_LEVEL=debug pnpm hardhat deploy_L1 --network hardhat --dao-vault 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --team-vault 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --l2-genesis-block-hash 0xee1950562d42f0da28bd4550d88886bc90894c77c9c9eaefef775d4c8223f259 --bridge-funder-private-key ddbf12f72c946bb1e6de5eaf580c51db51828ba198d9b0dba9c7d48ec748dc04 --bridge-fund 0xff --oracle-prover 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --confirmations 1", + "deploy:hardhat": "./scripts/download_solc.sh && LOG_LEVEL=debug pnpm hardhat deploy_L1 --network hardhat --dao-vault 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --team-vault 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --l2-genesis-block-hash 0xee1950562d42f0da28bd4550d88886bc90894c77c9c9eaefef775d4c8223f259 --bridge-funder-private-key ddbf12f72c946bb1e6de5eaf580c51db51828ba198d9b0dba9c7d48ec748dc04 --bridge-fund 0xff --oracle-prover 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --solo-proposer 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --confirmations 1", "lint-staged": "lint-staged --allow-empty", "sizer": "pnpm hardhat size-contracts" }, diff --git a/packages/protocol/tasks/deploy_L1.ts b/packages/protocol/tasks/deploy_L1.ts index e44d531eabf..82f97a2ca1c 100644 --- a/packages/protocol/tasks/deploy_L1.ts +++ b/packages/protocol/tasks/deploy_L1.ts @@ -37,6 +37,12 @@ task("deploy_L1") "", types.string ) + .addOptionalParam( + "soloProposer", + "Address of the solo proposer", + "", + types.string + ) .addOptionalParam( "confirmations", "Number of confirmations to wait for deploy transaction.", @@ -72,6 +78,7 @@ export async function deployContracts(hre: any) { const bridgeFunderPrivateKey = hre.args.bridgeFunderPrivateKey; const bridgeFund = hre.args.bridgeFund; const oracleProver = hre.args.oracleProver; + const soloProposer = hre.args.soloProposer; log.debug(`network: ${network}`); log.debug(`chainId: ${chainId}`); @@ -83,6 +90,7 @@ export async function deployContracts(hre: any) { log.debug(`bridgeFunderPrivateKey: ${bridgeFunderPrivateKey}`); log.debug(`bridgeFund: ${bridgeFund}`); log.debug(`oracleProver: ${oracleProver}`); + log.debug(`soloProposer: ${soloProposer}`); log.debug(`confirmations: ${hre.args.confirmations}`); log.debug(); @@ -239,8 +247,8 @@ export async function deployContracts(hre: any) { `${chainId}.${Buffer.from( ethers.utils.arrayify( ethers.utils.solidityPack( - ["string", "uint256", "string", "uint16"], - ["plonk_verifier_", 0, "_", i] + ["string", "uint16"], + ["plonk_verifier_", i] ) ) ).toString()}`, @@ -259,6 +267,16 @@ export async function deployContracts(hre: any) { ); } + if (ethers.utils.isAddress(soloProposer)) { + await utils.waitTx( + hre, + await AddressManager.setAddress( + `${chainId}.solo_proposer`, + soloProposer + ) + ); + } + // save deployments const deployments = { network,