Skip to content

Commit

Permalink
mini test
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Jun 11, 2024
1 parent c4eda49 commit ac968ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/contractsv2/PolygonRollupManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ac968ab

Please sign in to comment.