Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions l1-contracts/contracts/common/L1ContractErrors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ error EmptyBytes32();
error EmptyData();
// 0x95b66fe9
error EmptyDeposit();
error ExpirationTimestampMustBeZero();
// 0x84286507
error EmptyPrecommitData(uint256 batchNumber);
// 0x456f8f7a
Expand Down Expand Up @@ -348,6 +349,7 @@ error PriorityModeActivationTooEarly(uint256 earliestActivationTimestamp, uint25
error PriorityModeIsNotAllowed();
// 0x2b9d9c4c
error PriorityModeRequiresPermanentRollup();
error PermanentRollupCannotBeReverted();
// 0xd5a99014
error PriorityOperationsRollingHashMismatch();
// 0xbeda0935
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {IL1AssetRouter} from "../../../bridge/asset-router/IL1AssetRouter.sol";
import {IAssetRouterShared} from "../../../bridge/asset-router/IAssetRouterShared.sol";
import {
AddressNotZero,
ExpirationTimestampMustBeZero,
GasPerPubdataMismatch,
InvalidChainId,
MsgValueTooLow,
Expand Down Expand Up @@ -303,6 +304,7 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification, IMailbo
uint256 _baseTokenAmount,
bool _getBalanceChange
) public override onlyL1 returns (bytes32 canonicalTxHash) {
require(_expirationTimestamp == 0, ExpirationTimestampMustBeZero());
if (!IBridgehubBase(s.bridgehub).whitelistedSettlementLayers(s.chainId)) {
revert NotSettlementLayer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
VerifiedIsNotConsistentWithCommitted,
MigrationInProgress
} from "../../L1StateTransitionErrors.sol";
import {NotAZKChain, NotCompatibleWithPriorityMode} from "../../../common/L1ContractErrors.sol";
import {NotAZKChain, NotCompatibleWithPriorityMode, PermanentRollupCannotBeReverted} from "../../../common/L1ContractErrors.sol";
import {OnlyGateway} from "../../../core/bridgehub/L1BridgehubErrors.sol";
import {IL1AssetTracker} from "../../../bridge/asset-tracker/IL1AssetTracker.sol";
import {TxStatus} from "../../../common/Messaging.sol";
Expand Down Expand Up @@ -224,6 +224,9 @@ contract MigratorFacet is ZKChainBase, IMigrator {
s.totalBatchesCommitted = batchesCommitted;
s.totalBatchesVerified = batchesVerified;
s.totalBatchesExecuted = batchesExecuted;
if (s.isPermanentRollup) {
require(_commitment.isPermanentRollup, PermanentRollupCannotBeReverted());
}
s.isPermanentRollup = _commitment.isPermanentRollup;
s.precommitmentForTheLatestBatch = _commitment.precommitmentForTheLatestBatch;

Expand Down