Skip to content

Commit

Permalink
Add post upgrade init to deprecate active outbox
Browse files Browse the repository at this point in the history
  • Loading branch information
gvladika committed Oct 15, 2024
1 parent cf05177 commit b5a1ee3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/bridge/AbsBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
NotSequencerInbox,
NotOutbox,
InvalidOutboxSet,
BadSequencerMessageNumber
BadSequencerMessageNumber,
BadPostUpgradeInit
} from "../libraries/Error.sol";
import "./IBridge.sol";
import "./Messages.sol";
Expand Down Expand Up @@ -69,6 +70,12 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge {
_;
}

function postUpgradeInit() external onlyDelegated onlyProxyOwner {
// prevent postUpgradeInit within a withdrawal
if (__activeOutbox != address(type(uint160).max)) revert BadPostUpgradeInit();
__activeOutbox = address(0);
}

/// @notice Allows the rollup owner to set another rollup address
function updateRollupAddress(IOwnable _rollup) external onlyRollupOrOwner {
rollup = _rollup;
Expand Down

0 comments on commit b5a1ee3

Please sign in to comment.