diff --git a/contracts/src/v0.8/l2ep/dev/CrossDomainGovernor.sol b/contracts/src/v0.8/l2ep/dev/CrossDomainGovernor.sol index 7491b75d92d..72915093ab2 100644 --- a/contracts/src/v0.8/l2ep/dev/CrossDomainGovernor.sol +++ b/contracts/src/v0.8/l2ep/dev/CrossDomainGovernor.sol @@ -38,5 +38,12 @@ abstract contract CrossDomainGovernor is } /// @notice The call MUST come from either the L1 owner (via cross-chain message) or the L2 owner. Reverts otherwise. - modifier onlyLocalOrCrossDomainOwner() virtual; + modifier onlyLocalOrCrossDomainOwner() virtual { + // solhint-disable-next-line custom-errors + require( + msg.sender == this.crossDomainMessenger() || msg.sender == owner(), + "Sender is not the L2 messenger or owner" + ); + _; + } } diff --git a/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol index 79a8e9cafb3..da769a5c44f 100644 --- a/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol +++ b/contracts/src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol @@ -23,16 +23,6 @@ contract ArbitrumCrossDomainGovernor is CrossDomainGovernor { return AddressAliasHelper.applyL1ToL2Alias(l1Owner()); } - /// @notice The call MUST come from either the L1 owner (via cross-chain message) or the L2 owner. Reverts otherwise. - modifier onlyLocalOrCrossDomainOwner() override { - // solhint-disable-next-line custom-errors - require( - msg.sender == this.crossDomainMessenger() || msg.sender == owner(), - "Sender is not the L2 messenger or owner" - ); - _; - } - /// @notice The call MUST come from the L1 owner (via cross-chain message.) Reverts otherwise. modifier onlyL1Owner() override { // solhint-disable-next-line custom-errors