Skip to content

Commit

Permalink
Merge branch 'library-fix-review' into vb-l-01-library-fix-review
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbochok authored Oct 27, 2024
2 parents 8487b79 + e6205d7 commit ef81db6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions l1-contracts/contracts/upgrades/GatewayUpgrade.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ contract GatewayUpgrade is BaseZkSyncUpgrade {

/// @notice The main function that will be called by the upgrade proxy.
/// @param _proposedUpgrade The upgrade to be executed.
/// @dev Doesn't require any access-control restrictions as the contract is used in the delegate call.
function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) {
(bytes memory l2TxDataStart, bytes memory l2TxDataFinish) = abi.decode(
_proposedUpgrade.postUpgradeCalldata,
Expand All @@ -56,9 +57,8 @@ contract GatewayUpgrade is BaseZkSyncUpgrade {
}

/// @notice The function that will be called from this same contract, we need an external call to be able to modify _proposedUpgrade (memory/calldata).
/// @dev Doesn't require any access-control restrictions as the contract is used in the delegate call.
function upgradeExternal(ProposedUpgrade calldata _proposedUpgrade) external {
// solhint-disable-next-line gas-custom-errors
require(msg.sender == address(this), "GatewayUpgrade: upgradeExternal");
super.upgrade(_proposedUpgrade);
}
}

0 comments on commit ef81db6

Please sign in to comment.