Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol): fix PlonkVerifier's name in AddressManager #13229

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
22 changes: 20 additions & 2 deletions packages/protocol/tasks/deploy_L1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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}`);
Expand All @@ -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();

Expand Down Expand Up @@ -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()}`,
Expand All @@ -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,
Expand Down