Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
krlosMata committed Aug 30, 2024
1 parent 949b0b9 commit a6d3998
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/v2/consensus/validium/PolygonValidiumEtrog.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contracts/v2/interfaces/IPolygonZkEVMVEtrogErrors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contracts/v2/lib/PolygonRollupBaseEtrog.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/contractsv2/PolygonZkEVMEtrog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a6d3998

Please sign in to comment.