Skip to content

Commit

Permalink
fix verifier upgrade task (#708)
Browse files Browse the repository at this point in the history
Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>
  • Loading branch information
chengwenxi and chengwenxi authored Jan 9, 2025
1 parent 1617518 commit 39b8dfd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contracts/tasks/verifier_upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import "@nomiclabs/hardhat-waffle";
import { task } from "hardhat/config";
import { ContractFactoryName } from "../src/types";

// yarn hardhat upgradeVerifier --rollupVersion 0 --startBatchIndex 0 --multipleVersionRollupVerifier 0x0165878a594ca255338adfa4d48449f69242eb8f --network l1
// yarn hardhat upgradeVerifier --rollupversion 0 --startbatchindex 0 --multipleversionrollupverifier 0x0165878a594ca255338adfa4d48449f69242eb8f --network l1
task("upgradeVerifier")
.addParam("rollupVersion")
.addParam("startBatchIndex")
.addParam("multipleVersionRollupVerifier")
.addParam("rollupversion")
.addParam("startbatchindex")
.addParam("multipleversionrollupverifier")
.setAction(async (taskArgs, hre) => {
const config = hre.deployConfig

Expand All @@ -25,9 +25,9 @@ task("upgradeVerifier")
// add verifier to MultipleVersionRollupVerifier
const MultipleVersionRollupVerifierFactoryName = ContractFactoryName.MultipleVersionRollupVerifier
const MultipleVersionRollupVerifierFactory = await hre.ethers.getContractFactory(MultipleVersionRollupVerifierFactoryName)
const MultipleVersionRollupVerifier = MultipleVersionRollupVerifierFactory.attach(taskArgs.multipleVersionRollupVerifier)
const MultipleVersionRollupVerifier = MultipleVersionRollupVerifierFactory.attach(taskArgs.multipleversionrollupverifier)

const res = await MultipleVersionRollupVerifier.updateVerifier(taskArgs.rollupVersion, taskArgs.startBatchIndex, contract.address.toLocaleLowerCase())
const res = await MultipleVersionRollupVerifier.updateVerifier(taskArgs.rollupversion, taskArgs.startbatchindex, contract.address.toLocaleLowerCase())

const receipt = await res.wait()
console.log(`receipt status : ${receipt.status}`)
Expand Down

0 comments on commit 39b8dfd

Please sign in to comment.