Skip to content

Commit 4da3987

Browse files
authored
chore: removal of unused system config inputs (#13773)
1 parent dcc3d7f commit 4da3987

15 files changed

+41
-124
lines changed

packages/contracts-bedrock/interfaces/L1/IL1CrossDomainMessenger.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ pragma solidity ^0.8.0;
44
import { ICrossDomainMessenger } from "interfaces/universal/ICrossDomainMessenger.sol";
55
import { ISuperchainConfig } from "interfaces/L1/ISuperchainConfig.sol";
66
import { IOptimismPortal2 as IOptimismPortal } from "interfaces/L1/IOptimismPortal2.sol";
7-
import { ISystemConfig } from "interfaces/L1/ISystemConfig.sol";
87

98
interface IL1CrossDomainMessenger is ICrossDomainMessenger {
109
function PORTAL() external view returns (IOptimismPortal);
1110
function initialize(
1211
ISuperchainConfig _superchainConfig,
13-
IOptimismPortal _portal,
14-
ISystemConfig _systemConfig
12+
IOptimismPortal _portal
1513
)
1614
external;
1715
function portal() external view returns (IOptimismPortal);
1816
function superchainConfig() external view returns (ISuperchainConfig);
19-
function systemConfig() external view returns (ISystemConfig);
2017
function version() external view returns (string memory);
2118

2219
function __constructor__() external;

packages/contracts-bedrock/interfaces/L1/IL1StandardBridge.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pragma solidity ^0.8.0;
44
import { IStandardBridge } from "interfaces/universal/IStandardBridge.sol";
55
import { ICrossDomainMessenger } from "interfaces/universal/ICrossDomainMessenger.sol";
66
import { ISuperchainConfig } from "interfaces/L1/ISuperchainConfig.sol";
7-
import { ISystemConfig } from "interfaces/L1/ISystemConfig.sol";
87

98
interface IL1StandardBridge is IStandardBridge {
109
event ERC20DepositInitiated(
@@ -64,13 +63,11 @@ interface IL1StandardBridge is IStandardBridge {
6463
payable;
6564
function initialize(
6665
ICrossDomainMessenger _messenger,
67-
ISuperchainConfig _superchainConfig,
68-
ISystemConfig _systemConfig
66+
ISuperchainConfig _superchainConfig
6967
)
7068
external;
7169
function l2TokenBridge() external view returns (address);
7270
function superchainConfig() external view returns (ISuperchainConfig);
73-
function systemConfig() external view returns (ISystemConfig);
7471
function version() external view returns (string memory);
7572

7673
function __constructor__() external;

packages/contracts-bedrock/snapshots/.gas-snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ GasBenchMark_L1Block_SetValuesEcotone:test_setL1BlockValuesEcotone_benchmark() (
66
GasBenchMark_L1Block_SetValuesEcotone_Warm:test_setL1BlockValuesEcotone_benchmark() (gas: 7597)
77
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 356487)
88
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2954716)
9-
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 551636)
10-
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 4063829)
11-
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 450322)
12-
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 3496221)
9+
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 551591)
10+
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 4063784)
11+
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 450277)
12+
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 3496176)
1313
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 59849)

packages/contracts-bedrock/snapshots/abi/L1CrossDomainMessenger.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@
188188
"internalType": "contract IOptimismPortal2",
189189
"name": "_portal",
190190
"type": "address"
191-
},
192-
{
193-
"internalType": "contract ISystemConfig",
194-
"name": "_systemConfig",
195-
"type": "address"
196191
}
197192
],
198193
"name": "initialize",
@@ -345,19 +340,6 @@
345340
"stateMutability": "view",
346341
"type": "function"
347342
},
348-
{
349-
"inputs": [],
350-
"name": "systemConfig",
351-
"outputs": [
352-
{
353-
"internalType": "contract ISystemConfig",
354-
"name": "",
355-
"type": "address"
356-
}
357-
],
358-
"stateMutability": "view",
359-
"type": "function"
360-
},
361343
{
362344
"inputs": [],
363345
"name": "version",

packages/contracts-bedrock/snapshots/abi/L1StandardBridge.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,6 @@
425425
"internalType": "contract ISuperchainConfig",
426426
"name": "_superchainConfig",
427427
"type": "address"
428-
},
429-
{
430-
"internalType": "contract ISystemConfig",
431-
"name": "_systemConfig",
432-
"type": "address"
433428
}
434429
],
435430
"name": "initialize",
@@ -502,19 +497,6 @@
502497
"stateMutability": "view",
503498
"type": "function"
504499
},
505-
{
506-
"inputs": [],
507-
"name": "systemConfig",
508-
"outputs": [
509-
{
510-
"internalType": "contract ISystemConfig",
511-
"name": "",
512-
"type": "address"
513-
}
514-
],
515-
"stateMutability": "view",
516-
"type": "function"
517-
},
518500
{
519501
"inputs": [],
520502
"name": "version",

packages/contracts-bedrock/snapshots/semver-lock.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
"sourceCodeHash": "0xae49c741c8cd546981ab59b85b88e9fc1055c4fae085e7078d601b42464f86e6"
55
},
66
"src/L1/L1CrossDomainMessenger.sol": {
7-
"initCodeHash": "0x4b045c9e0fcfa37838edf154e6e75be4a60406204eccf0d606dfd55da80d266d",
8-
"sourceCodeHash": "0xc92887952f5108a770c3fee8a61c70f740a0a55c2e9ed0aebe266a7c53c71dc3"
7+
"initCodeHash": "0xcff231ee7465984e853572c5050e761f746575d78f709eba65c982178de3e718",
8+
"sourceCodeHash": "0x9726b6f646269f4288ff8dc1b8228dedbdf960e90df1d11793bc534297328e96"
99
},
1010
"src/L1/L1ERC721Bridge.sol": {
1111
"initCodeHash": "0x280488bce8b4fb364740c59de14c423851902088f384e077bccc79b9df48528a",
1212
"sourceCodeHash": "0xe12b9e6c4e4ac2e2c9a03f07c7689f6bf2231922536072812cf1f37a5a276e73"
1313
},
1414
"src/L1/L1StandardBridge.sol": {
15-
"initCodeHash": "0xe5f5ab77cc5586ecd94cc687b98f25d8fd7f9bb146a942653a2ec9be7e68f070",
16-
"sourceCodeHash": "0x51f0876ab8410ce32838483f8f59ad6d1c5b4a368e47415b30e44baf291a394b"
15+
"initCodeHash": "0xe69e972e18930d3feaaad20b8e0e15625df9a71ad8304ee7d89c17d32644e152",
16+
"sourceCodeHash": "0xc6613d35d1ad95cbef26a503a10b5dd8663ceb80426f8c528835d39f79e4b4cf"
1717
},
1818
"src/L1/OPContractsManager.sol": {
19-
"initCodeHash": "0x88a6d99e668340e3af5c728c29e94e7229d89da0762b4bbf93bc10e596795c9f",
20-
"sourceCodeHash": "0x2d21506cc51ebe0b60bcf89883aff5e9b1269567ce44ee779de3d3940e23fb65"
19+
"initCodeHash": "0x1acc2f3d7cf2b0dd380fbf3230648a8beb77e8d3eca05fb5da46efdb91c08530",
20+
"sourceCodeHash": "0xdfd5c91e5ddbbf2ad82b867cbf7403437decd6ca70b87891eec935665f17ffd5"
2121
},
2222
"src/L1/OptimismPortal2.sol": {
2323
"initCodeHash": "0x2121a97875875150106a54a71c6c4c03afe90b3364e416be047f55fdeab57204",

packages/contracts-bedrock/snapshots/storageLayout/L1CrossDomainMessenger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@
141141
},
142142
{
143143
"bytes": "20",
144-
"label": "systemConfig",
144+
"label": "spacer_253_0_20",
145145
"offset": 0,
146146
"slot": "253",
147-
"type": "contract ISystemConfig"
147+
"type": "address"
148148
}
149149
]

packages/contracts-bedrock/snapshots/storageLayout/L1StandardBridge.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
},
6565
{
6666
"bytes": "20",
67-
"label": "systemConfig",
67+
"label": "spacer_51_0_20",
6868
"offset": 0,
6969
"slot": "51",
70-
"type": "contract ISystemConfig"
70+
"type": "address"
7171
}
7272
]

packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { Constants } from "src/libraries/Constants.sol";
1111
// Interfaces
1212
import { ISemver } from "interfaces/universal/ISemver.sol";
1313
import { ISuperchainConfig } from "interfaces/L1/ISuperchainConfig.sol";
14-
import { ISystemConfig } from "interfaces/L1/ISystemConfig.sol";
1514
import { IOptimismPortal2 as IOptimismPortal } from "interfaces/L1/IOptimismPortal2.sol";
1615

1716
/// @custom:proxied true
@@ -27,12 +26,14 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, ISemver {
2726
/// @custom:network-specific
2827
IOptimismPortal public portal;
2928

30-
/// @notice Address of the SystemConfig contract.
31-
ISystemConfig public systemConfig;
29+
/// @custom:legacy
30+
/// @custom:spacer systemConfig
31+
/// @notice Spacer taking up the legacy `systemConfig` slot.
32+
address private spacer_253_0_20;
3233

3334
/// @notice Semantic version.
34-
/// @custom:semver 2.4.1-beta.6
35-
string public constant version = "2.4.1-beta.6";
35+
/// @custom:semver 2.4.1-beta.7
36+
string public constant version = "2.4.1-beta.7";
3637

3738
/// @notice Constructs the L1CrossDomainMessenger contract.
3839
constructor() {
@@ -42,18 +43,9 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, ISemver {
4243
/// @notice Initializes the contract.
4344
/// @param _superchainConfig Contract of the SuperchainConfig contract on this network.
4445
/// @param _portal Contract of the OptimismPortal contract on this network.
45-
/// @param _systemConfig Contract of the SystemConfig contract on this network.
46-
function initialize(
47-
ISuperchainConfig _superchainConfig,
48-
IOptimismPortal _portal,
49-
ISystemConfig _systemConfig
50-
)
51-
external
52-
initializer
53-
{
46+
function initialize(ISuperchainConfig _superchainConfig, IOptimismPortal _portal) external initializer {
5447
superchainConfig = _superchainConfig;
5548
portal = _portal;
56-
systemConfig = _systemConfig;
5749
__CrossDomainMessenger_init({ _otherMessenger: CrossDomainMessenger(Predeploys.L2_CROSS_DOMAIN_MESSENGER) });
5850
}
5951

packages/contracts-bedrock/src/L1/L1StandardBridge.sol

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { Constants } from "src/libraries/Constants.sol";
1212
import { ISemver } from "interfaces/universal/ISemver.sol";
1313
import { ICrossDomainMessenger } from "interfaces/universal/ICrossDomainMessenger.sol";
1414
import { ISuperchainConfig } from "interfaces/L1/ISuperchainConfig.sol";
15-
import { ISystemConfig } from "interfaces/L1/ISystemConfig.sol";
1615

1716
/// @custom:proxied true
1817
/// @title L1StandardBridge
@@ -76,14 +75,16 @@ contract L1StandardBridge is StandardBridge, ISemver {
7675
);
7776

7877
/// @notice Semantic version.
79-
/// @custom:semver 2.2.1-beta.6
80-
string public constant version = "2.2.1-beta.6";
78+
/// @custom:semver 2.2.1-beta.7
79+
string public constant version = "2.2.1-beta.7";
8180

8281
/// @notice Address of the SuperchainConfig contract.
8382
ISuperchainConfig public superchainConfig;
8483

85-
/// @notice Address of the SystemConfig contract.
86-
ISystemConfig public systemConfig;
84+
/// @custom:legacy
85+
/// @custom:spacer systemConfig
86+
/// @notice Spacer taking up the legacy `systemConfig` slot.
87+
address private spacer_51_0_20;
8788

8889
/// @notice Constructs the L1StandardBridge contract.
8990
constructor() StandardBridge() {
@@ -93,16 +94,8 @@ contract L1StandardBridge is StandardBridge, ISemver {
9394
/// @notice Initializer.
9495
/// @param _messenger Contract for the CrossDomainMessenger on this network.
9596
/// @param _superchainConfig Contract for the SuperchainConfig on this network.
96-
function initialize(
97-
ICrossDomainMessenger _messenger,
98-
ISuperchainConfig _superchainConfig,
99-
ISystemConfig _systemConfig
100-
)
101-
external
102-
initializer
103-
{
97+
function initialize(ICrossDomainMessenger _messenger, ISuperchainConfig _superchainConfig) external initializer {
10498
superchainConfig = _superchainConfig;
105-
systemConfig = _systemConfig;
10699
__StandardBridge_init({
107100
_messenger: _messenger,
108101
_otherBridge: StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE))

0 commit comments

Comments
 (0)