From ac968ab9f4332f775a6fdceb29ae88250acc5110 Mon Sep 17 00:00:00 2001 From: invocamanman Date: Tue, 11 Jun 2024 19:41:05 +0200 Subject: [PATCH] mini test --- test/contractsv2/PolygonRollupManager.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/contractsv2/PolygonRollupManager.test.ts b/test/contractsv2/PolygonRollupManager.test.ts index cfd3b8eee..5db8f9de3 100644 --- a/test/contractsv2/PolygonRollupManager.test.ts +++ b/test/contractsv2/PolygonRollupManager.test.ts @@ -925,6 +925,7 @@ describe("Polygon Rollup Manager", () => { expect(await newZkEVMContract.lastAccInputHash()).to.be.equal(expectedAccInputHash3); await snapshot3.restore(); + // sequence force batches const timestampForceBatch = (await ethers.provider.getBlock("latest"))?.timestamp as any; @@ -1010,11 +1011,16 @@ describe("Polygon Rollup Manager", () => { rollupManagerContract.connect(admin).rollbackBatches(newZkEVMContract.target, 3) ).to.be.revertedWithCustomError(rollupManagerContract, "RollbackBatchIsNotValid"); - // last sequenced batch + // compare accINputHash + expect(await newZkEVMContract.lastAccInputHash()).not.to.be.equal(expectedAccInputHash2); + await expect(rollupManagerContract.connect(admin).rollbackBatches(newZkEVMContract.target, 2)) .to.emit(rollupManagerContract, "RollbackBatches") .withArgs(newCreatedRollupID, 2, expectedAccInputHash2); + // compare accINputHash + expect(await newZkEVMContract.lastAccInputHash()).to.be.equal(expectedAccInputHash2); + await expect(newZkEVMContract.connect(deployer).acceptAdminRole()) .to.emit(newZkEVMContract, "AcceptAdminRole") .withArgs(deployer.address);