From a6d3998422a10c7024751a42c2dbc27417e04e6c Mon Sep 17 00:00:00 2001 From: krlosMata Date: Fri, 30 Aug 2024 13:53:31 +0200 Subject: [PATCH] fix error message --- contracts/v2/consensus/validium/PolygonValidiumEtrog.sol | 2 +- contracts/v2/interfaces/IPolygonZkEVMVEtrogErrors.sol | 4 ++-- contracts/v2/lib/PolygonRollupBaseEtrog.sol | 2 +- test/contractsv2/PolygonZkEVMEtrog.test.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol b/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol index 0d86a692b..223b1adfe 100644 --- a/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol +++ b/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol @@ -121,7 +121,7 @@ contract PolygonValidiumEtrog is PolygonRollupBaseEtrog, IPolygonValidium { ); if (l1InfoRoot == bytes32(0)) { - revert L1InfoRootIndexInvalid(); + revert L1InfoTreeLeafCountInvalid(); } // Store storage variables in memory, to save gas, because will be overrided multiple times diff --git a/contracts/v2/interfaces/IPolygonZkEVMVEtrogErrors.sol b/contracts/v2/interfaces/IPolygonZkEVMVEtrogErrors.sol index 94d42cb3a..1d38fd371 100644 --- a/contracts/v2/interfaces/IPolygonZkEVMVEtrogErrors.sol +++ b/contracts/v2/interfaces/IPolygonZkEVMVEtrogErrors.sol @@ -55,9 +55,9 @@ interface IPolygonZkEVMVEtrogErrors is IPolygonZkEVMErrors { error MaxTimestampSequenceInvalid(); /** - * @dev Thrown when l1 info root does not exist + * @dev Thrown when l1 info tree leafCount does not exist */ - error L1InfoRootIndexInvalid(); + error L1InfoTreeLeafCountInvalid(); /** * @dev Thrown when the acc input hash does not match the predicted by the sequencer diff --git a/contracts/v2/lib/PolygonRollupBaseEtrog.sol b/contracts/v2/lib/PolygonRollupBaseEtrog.sol index 49b1777e0..e806105ed 100644 --- a/contracts/v2/lib/PolygonRollupBaseEtrog.sol +++ b/contracts/v2/lib/PolygonRollupBaseEtrog.sol @@ -442,7 +442,7 @@ abstract contract PolygonRollupBaseEtrog is ); if (l1InfoRoot == bytes32(0)) { - revert L1InfoRootIndexInvalid(); + revert L1InfoTreeLeafCountInvalid(); } // Store storage variables in memory, to save gas, because will be overrided multiple times diff --git a/test/contractsv2/PolygonZkEVMEtrog.test.ts b/test/contractsv2/PolygonZkEVMEtrog.test.ts index a08adace0..cc81d901c 100644 --- a/test/contractsv2/PolygonZkEVMEtrog.test.ts +++ b/test/contractsv2/PolygonZkEVMEtrog.test.ts @@ -490,7 +490,7 @@ describe("PolygonZkEVMEtrog", () => { expectedAccInputHash, trustedSequencer.address ) - ).to.be.revertedWithCustomError(PolygonZKEVMV2Contract, "L1InfoRootIndexInvalid"); + ).to.be.revertedWithCustomError(PolygonZKEVMV2Contract, "L1InfoTreeLeafCountInvalid"); await expect( PolygonZKEVMV2Contract.connect(trustedSequencer).sequenceBatches(