diff --git a/src/L2/predeploys/L1GasPriceOracle.sol b/src/L2/predeploys/L1GasPriceOracle.sol index b41f59a..36f0da5 100644 --- a/src/L2/predeploys/L1GasPriceOracle.sol +++ b/src/L2/predeploys/L1GasPriceOracle.sol @@ -117,6 +117,9 @@ contract L1GasPriceOracle is OwnableBase, IL1GasPriceOracle { /// @notice Indicates whether the network has gone through the Feynman upgrade. bool public isFeynman; + /// @dev Gap added to ensure that `isGalileo` is in the next storage slot. + uint248 private __gap; + /// @notice Indicates whether the network has gone through the Galileo upgrade. bool public isGalileo; diff --git a/src/test/L1GasPriceOracle.t.sol b/src/test/L1GasPriceOracle.t.sol index 8c092fa..ceaf29d 100644 --- a/src/test/L1GasPriceOracle.t.sol +++ b/src/test/L1GasPriceOracle.t.sol @@ -312,4 +312,19 @@ contract L1GasPriceOracleTest is DSTestPlus { assertEq(oracle.getL1Fee(_data), (_baseTerm + _penaltyTerm) / PRECISION); } + + function testSetStorageDuringUpgrade() external { + assertFalse(oracle.isFeynman()); + assertFalse(oracle.isGalileo()); + + // Feynman upgrade + hevm.store(address(oracle), bytes32(uint256(11)), bytes32(uint256(1))); + assertTrue(oracle.isFeynman()); + assertFalse(oracle.isGalileo()); + + // GalileoV2 upgrade + hevm.store(address(oracle), bytes32(uint256(12)), bytes32(uint256(1))); + assertTrue(oracle.isFeynman()); + assertTrue(oracle.isGalileo()); + } }