Commit b94c4492 authored by smartcontracts's avatar smartcontracts Committed by GitHub

style(ctb): tweaks to L2 contracts (#2886)

Minor style tweaks to a few L2 contracts.
parent f8a4084e
...@@ -6,347 +6,347 @@ ...@@ -6,347 +6,347 @@
➡ L1CrossDomainMessenger ➡ L1CrossDomainMessenger
======================= =======================
+---------------------------+--------------------------+------+--------+-------+ +---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+==============================================================================+ +===============================================================================================================================================+
| _initialized | uint8 | 0 | 0 | 1 | | _initialized | uint8 | 0 | 0 | 1 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _initializing | bool | 0 | 1 | 1 | | _initializing | bool | 0 | 1 | 1 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | | __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _owner | address | 51 | 0 | 20 | | _owner | address | 51 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | | __gap | uint256[49] | 52 | 0 | 1568 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _paused | bool | 101 | 0 | 1 | | _paused | bool | 101 | 0 | 1 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[49] | 102 | 0 | 1568 | | __gap | uint256[49] | 102 | 0 | 1568 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _status | uint256 | 151 | 0 | 32 | | _status | uint256 | 151 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[49] | 152 | 0 | 1568 | | __gap | uint256[49] | 152 | 0 | 1568 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| REMOVED_VARIABLE_SPACER_1 | bytes32 | 201 | 0 | 32 | | REMOVED_VARIABLE_SPACER_1 | bytes32 | 201 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| REMOVED_VARIABLE_SPACER_2 | bytes32 | 202 | 0 | 32 | | REMOVED_VARIABLE_SPACER_2 | bytes32 | 202 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| successfulMessages | mapping(bytes32 => bool) | 203 | 0 | 32 | | successfulMessages | mapping(bytes32 => bool) | 203 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| xDomainMsgSender | address | 204 | 0 | 20 | | xDomainMsgSender | address | 204 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| msgNonce | uint256 | 205 | 0 | 32 | | msgNonce | uint256 | 205 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| otherMessenger | address | 206 | 0 | 20 | | otherMessenger | address | 206 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| receivedMessages | mapping(bytes32 => bool) | 207 | 0 | 32 | | receivedMessages | mapping(bytes32 => bool) | 207 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| blockedSystemAddresses | mapping(address => bool) | 208 | 0 | 32 | | blockedSystemAddresses | mapping(address => bool) | 208 | 0 | 32 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| portal | contract OptimismPortal | 209 | 0 | 20 | | portal | contract OptimismPortal | 209 | 0 | 20 | contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger |
+---------------------------+--------------------------+------+--------+-------+ +---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+
======================= =======================
➡ L1StandardBridge ➡ L1StandardBridge
======================= =======================
+-------------+-------------------------------------------------+------+--------+-------+ +-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=======================================================================================+ +============================================================================================================================================+
| messenger | contract CrossDomainMessenger | 0 | 0 | 20 | | messenger | contract CrossDomainMessenger | 0 | 0 | 20 | contracts/L1/L1StandardBridge.sol:L1StandardBridge |
|-------------+-------------------------------------------------+------+--------+-------| |-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------|
| otherBridge | contract StandardBridge | 1 | 0 | 20 | | otherBridge | contract StandardBridge | 1 | 0 | 20 | contracts/L1/L1StandardBridge.sol:L1StandardBridge |
|-------------+-------------------------------------------------+------+--------+-------| |-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------|
| deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | | deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | contracts/L1/L1StandardBridge.sol:L1StandardBridge |
+-------------+-------------------------------------------------+------+--------+-------+ +-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+
======================= =======================
➡ L2OutputOracle ➡ L2OutputOracle
======================= =======================
+-------------------+----------------------------------------------------------+------+--------+-------+ +-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+======================================================================================================+ +=======================================================================================================================================================+
| _initialized | uint8 | 0 | 0 | 1 | | _initialized | uint8 | 0 | 0 | 1 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|-------------------+----------------------------------------------------------+------+--------+-------| |-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------|
| _initializing | bool | 0 | 1 | 1 | | _initializing | bool | 0 | 1 | 1 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|-------------------+----------------------------------------------------------+------+--------+-------| |-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | | __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|-------------------+----------------------------------------------------------+------+--------+-------| |-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------|
| _owner | address | 51 | 0 | 20 | | _owner | address | 51 | 0 | 20 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|-------------------+----------------------------------------------------------+------+--------+-------| |-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | | __gap | uint256[49] | 52 | 0 | 1568 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|-------------------+----------------------------------------------------------+------+--------+-------| |-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------|
| sequencer | address | 101 | 0 | 20 | | sequencer | address | 101 | 0 | 20 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|-------------------+----------------------------------------------------------+------+--------+-------| |-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------|
| latestBlockNumber | uint256 | 102 | 0 | 32 | | latestBlockNumber | uint256 | 102 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|-------------------+----------------------------------------------------------+------+--------+-------| |-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------|
| l2Outputs | mapping(uint256 => struct L2OutputOracle.OutputProposal) | 103 | 0 | 32 | | l2Outputs | mapping(uint256 => struct L2OutputOracle.OutputProposal) | 103 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
+-------------------+----------------------------------------------------------+------+--------+-------+ +-------------------+----------------------------------------------------------+------+--------+-------+------------------------------------------------+
======================= =======================
➡ OptimismPortal ➡ OptimismPortal
======================= =======================
+----------------------+----------------------------------------+------+--------+-------+ +----------------------+----------------------------------------+------+--------+-------+------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=======================================================================================+ +========================================================================================================================================+
| _initialized | uint8 | 0 | 0 | 1 | | _initialized | uint8 | 0 | 0 | 1 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| _initializing | bool | 0 | 1 | 1 | | _initializing | bool | 0 | 1 | 1 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| params | struct ResourceMetering.ResourceParams | 1 | 0 | 32 | | params | struct ResourceMetering.ResourceParams | 1 | 0 | 32 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| __gap | uint256[49] | 2 | 0 | 1568 | | __gap | uint256[49] | 2 | 0 | 1568 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| l2Sender | address | 51 | 0 | 20 | | l2Sender | address | 51 | 0 | 20 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| finalizedWithdrawals | mapping(bytes32 => bool) | 52 | 0 | 32 | | finalizedWithdrawals | mapping(bytes32 => bool) | 52 | 0 | 32 | contracts/L1/OptimismPortal.sol:OptimismPortal |
|----------------------+----------------------------------------+------+--------+-------| |----------------------+----------------------------------------+------+--------+-------+------------------------------------------------|
| __gap | uint256[48] | 53 | 0 | 1536 | | __gap | uint256[48] | 53 | 0 | 1536 | contracts/L1/OptimismPortal.sol:OptimismPortal |
+----------------------+----------------------------------------+------+--------+-------+ +----------------------+----------------------------------------+------+--------+-------+------------------------------------------------+
======================= =======================
➡ DeployerWhitelist ➡ DeployerWhitelist
======================= =======================
+-----------+--------------------------+------+--------+-------+ +-----------+--------------------------+------+--------+-------+------------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+==============================================================+ +=====================================================================================================================+
| owner | address | 0 | 0 | 20 | | owner | address | 0 | 0 | 20 | contracts/L2/DeployerWhitelist.sol:DeployerWhitelist |
|-----------+--------------------------+------+--------+-------| |-----------+--------------------------+------+--------+-------+------------------------------------------------------|
| whitelist | mapping(address => bool) | 1 | 0 | 32 | | whitelist | mapping(address => bool) | 1 | 0 | 32 | contracts/L2/DeployerWhitelist.sol:DeployerWhitelist |
+-----------+--------------------------+------+--------+-------+ +-----------+--------------------------+------+--------+-------+------------------------------------------------------+
======================= =======================
➡ GasPriceOracle ➡ GasPriceOracle
======================= =======================
+----------+---------+------+--------+-------+ +----------+---------+------+--------+-------+------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+============================================+ +=============================================================================================+
| _owner | address | 0 | 0 | 20 | | _owner | address | 0 | 0 | 20 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|----------+---------+------+--------+-------| |----------+---------+------+--------+-------+------------------------------------------------|
| spacer0 | uint256 | 1 | 0 | 32 | | spacer0 | uint256 | 1 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|----------+---------+------+--------+-------| |----------+---------+------+--------+-------+------------------------------------------------|
| spacer1 | uint256 | 2 | 0 | 32 | | spacer1 | uint256 | 2 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|----------+---------+------+--------+-------| |----------+---------+------+--------+-------+------------------------------------------------|
| overhead | uint256 | 3 | 0 | 32 | | overhead | uint256 | 3 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|----------+---------+------+--------+-------| |----------+---------+------+--------+-------+------------------------------------------------|
| scalar | uint256 | 4 | 0 | 32 | | scalar | uint256 | 4 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|----------+---------+------+--------+-------| |----------+---------+------+--------+-------+------------------------------------------------|
| decimals | uint256 | 5 | 0 | 32 | | decimals | uint256 | 5 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
+----------+---------+------+--------+-------+ +----------+---------+------+--------+-------+------------------------------------------------+
======================= =======================
➡ L1Block ➡ L1Block
======================= =======================
+----------------+---------+------+--------+-------+ +----------------+---------+------+--------+-------+----------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+==================================================+ +=====================================================================================+
| number | uint64 | 0 | 0 | 8 | | number | uint64 | 0 | 0 | 8 | contracts/L2/L1Block.sol:L1Block |
|----------------+---------+------+--------+-------| |----------------+---------+------+--------+-------+----------------------------------|
| timestamp | uint64 | 0 | 8 | 8 | | timestamp | uint64 | 0 | 8 | 8 | contracts/L2/L1Block.sol:L1Block |
|----------------+---------+------+--------+-------| |----------------+---------+------+--------+-------+----------------------------------|
| basefee | uint256 | 1 | 0 | 32 | | basefee | uint256 | 1 | 0 | 32 | contracts/L2/L1Block.sol:L1Block |
|----------------+---------+------+--------+-------| |----------------+---------+------+--------+-------+----------------------------------|
| hash | bytes32 | 2 | 0 | 32 | | hash | bytes32 | 2 | 0 | 32 | contracts/L2/L1Block.sol:L1Block |
|----------------+---------+------+--------+-------| |----------------+---------+------+--------+-------+----------------------------------|
| sequenceNumber | uint64 | 3 | 0 | 8 | | sequenceNumber | uint64 | 3 | 0 | 8 | contracts/L2/L1Block.sol:L1Block |
+----------------+---------+------+--------+-------+ +----------------+---------+------+--------+-------+----------------------------------+
======================= =======================
➡ L1BlockNumber ➡ L1BlockNumber
======================= =======================
+------+------+------+--------+-------+ +------+------+------+--------+-------+----------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=====================================+ +================================================+
+------+------+------+--------+-------+ +------+------+------+--------+-------+----------+
======================= =======================
➡ L2CrossDomainMessenger ➡ L2CrossDomainMessenger
======================= =======================
+---------------------------+--------------------------+------+--------+-------+ +---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+==============================================================================+ +===============================================================================================================================================+
| _initialized | uint8 | 0 | 0 | 1 | | _initialized | uint8 | 0 | 0 | 1 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _initializing | bool | 0 | 1 | 1 | | _initializing | bool | 0 | 1 | 1 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | | __gap | uint256[50] | 1 | 0 | 1600 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _owner | address | 51 | 0 | 20 | | _owner | address | 51 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | | __gap | uint256[49] | 52 | 0 | 1568 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _paused | bool | 101 | 0 | 1 | | _paused | bool | 101 | 0 | 1 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[49] | 102 | 0 | 1568 | | __gap | uint256[49] | 102 | 0 | 1568 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| _status | uint256 | 151 | 0 | 32 | | _status | uint256 | 151 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| __gap | uint256[49] | 152 | 0 | 1568 | | __gap | uint256[49] | 152 | 0 | 1568 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| REMOVED_VARIABLE_SPACER_1 | bytes32 | 201 | 0 | 32 | | REMOVED_VARIABLE_SPACER_1 | bytes32 | 201 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| REMOVED_VARIABLE_SPACER_2 | bytes32 | 202 | 0 | 32 | | REMOVED_VARIABLE_SPACER_2 | bytes32 | 202 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| successfulMessages | mapping(bytes32 => bool) | 203 | 0 | 32 | | successfulMessages | mapping(bytes32 => bool) | 203 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| xDomainMsgSender | address | 204 | 0 | 20 | | xDomainMsgSender | address | 204 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| msgNonce | uint256 | 205 | 0 | 32 | | msgNonce | uint256 | 205 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| otherMessenger | address | 206 | 0 | 20 | | otherMessenger | address | 206 | 0 | 20 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| receivedMessages | mapping(bytes32 => bool) | 207 | 0 | 32 | | receivedMessages | mapping(bytes32 => bool) | 207 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
|---------------------------+--------------------------+------+--------+-------| |---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------|
| blockedSystemAddresses | mapping(address => bool) | 208 | 0 | 32 | | blockedSystemAddresses | mapping(address => bool) | 208 | 0 | 32 | contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger |
+---------------------------+--------------------------+------+--------+-------+ +---------------------------+--------------------------+------+--------+-------+----------------------------------------------------------------+
======================= =======================
➡ L2StandardBridge ➡ L2StandardBridge
======================= =======================
+-------------+-------------------------------------------------+------+--------+-------+ +-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=======================================================================================+ +============================================================================================================================================+
| messenger | contract CrossDomainMessenger | 0 | 0 | 20 | | messenger | contract CrossDomainMessenger | 0 | 0 | 20 | contracts/L2/L2StandardBridge.sol:L2StandardBridge |
|-------------+-------------------------------------------------+------+--------+-------| |-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------|
| otherBridge | contract StandardBridge | 1 | 0 | 20 | | otherBridge | contract StandardBridge | 1 | 0 | 20 | contracts/L2/L2StandardBridge.sol:L2StandardBridge |
|-------------+-------------------------------------------------+------+--------+-------| |-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------|
| deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | | deposits | mapping(address => mapping(address => uint256)) | 2 | 0 | 32 | contracts/L2/L2StandardBridge.sol:L2StandardBridge |
+-------------+-------------------------------------------------+------+--------+-------+ +-------------+-------------------------------------------------+------+--------+-------+----------------------------------------------------+
======================= =======================
➡ L2ToL1MessagePasser ➡ L2ToL1MessagePasser
======================= =======================
+--------------+--------------------------+------+--------+-------+ +--------------+--------------------------+------+--------+-------+----------------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=================================================================+ +============================================================================================================================+
| sentMessages | mapping(bytes32 => bool) | 0 | 0 | 32 | | sentMessages | mapping(bytes32 => bool) | 0 | 0 | 32 | contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser |
|--------------+--------------------------+------+--------+-------| |--------------+--------------------------+------+--------+-------+----------------------------------------------------------|
| nonce | uint256 | 1 | 0 | 32 | | nonce | uint256 | 1 | 0 | 32 | contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser |
+--------------+--------------------------+------+--------+-------+ +--------------+--------------------------+------+--------+-------+----------------------------------------------------------+
======================= =======================
➡ OVM_ETH ➡ OVM_ETH
======================= =======================
+--------------+-------------------------------------------------+------+--------+-------+ +--------------+-------------------------------------------------+------+--------+-------+----------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+========================================================================================+ +===========================================================================================================================+
| _balances | mapping(address => uint256) | 0 | 0 | 32 | | _balances | mapping(address => uint256) | 0 | 0 | 32 | contracts/L2/OVM_ETH.sol:OVM_ETH |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+----------------------------------|
| _allowances | mapping(address => mapping(address => uint256)) | 1 | 0 | 32 | | _allowances | mapping(address => mapping(address => uint256)) | 1 | 0 | 32 | contracts/L2/OVM_ETH.sol:OVM_ETH |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+----------------------------------|
| _totalSupply | uint256 | 2 | 0 | 32 | | _totalSupply | uint256 | 2 | 0 | 32 | contracts/L2/OVM_ETH.sol:OVM_ETH |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+----------------------------------|
| _name | string | 3 | 0 | 32 | | _name | string | 3 | 0 | 32 | contracts/L2/OVM_ETH.sol:OVM_ETH |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+----------------------------------|
| _symbol | string | 4 | 0 | 32 | | _symbol | string | 4 | 0 | 32 | contracts/L2/OVM_ETH.sol:OVM_ETH |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+----------------------------------|
| remoteToken | address | 5 | 0 | 20 | | remoteToken | address | 5 | 0 | 20 | contracts/L2/OVM_ETH.sol:OVM_ETH |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+----------------------------------|
| bridge | address | 6 | 0 | 20 | | bridge | address | 6 | 0 | 20 | contracts/L2/OVM_ETH.sol:OVM_ETH |
+--------------+-------------------------------------------------+------+--------+-------+ +--------------+-------------------------------------------------+------+--------+-------+----------------------------------+
======================= =======================
➡ SequencerFeeVault ➡ SequencerFeeVault
======================= =======================
+-------------+---------+------+--------+-------+ +-------------+---------+------+--------+-------+------------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+===============================================+ +======================================================================================================+
| l1FeeWallet | address | 0 | 0 | 20 | | l1FeeWallet | address | 0 | 0 | 20 | contracts/L2/SequencerFeeVault.sol:SequencerFeeVault |
+-------------+---------+------+--------+-------+ +-------------+---------+------+--------+-------+------------------------------------------------------+
======================= =======================
➡ WETH9 ➡ WETH9
======================= =======================
+-----------+-------------------------------------------------+------+--------+-------+ +-----------+-------------------------------------------------+------+--------+-------+------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=====================================================================================+ +====================================================================================================================+
| name | string | 0 | 0 | 32 | | name | string | 0 | 0 | 32 | contracts/L2/WETH9.sol:WETH9 |
|-----------+-------------------------------------------------+------+--------+-------| |-----------+-------------------------------------------------+------+--------+-------+------------------------------|
| symbol | string | 1 | 0 | 32 | | symbol | string | 1 | 0 | 32 | contracts/L2/WETH9.sol:WETH9 |
|-----------+-------------------------------------------------+------+--------+-------| |-----------+-------------------------------------------------+------+--------+-------+------------------------------|
| decimals | uint8 | 2 | 0 | 1 | | decimals | uint8 | 2 | 0 | 1 | contracts/L2/WETH9.sol:WETH9 |
|-----------+-------------------------------------------------+------+--------+-------| |-----------+-------------------------------------------------+------+--------+-------+------------------------------|
| balanceOf | mapping(address => uint256) | 3 | 0 | 32 | | balanceOf | mapping(address => uint256) | 3 | 0 | 32 | contracts/L2/WETH9.sol:WETH9 |
|-----------+-------------------------------------------------+------+--------+-------| |-----------+-------------------------------------------------+------+--------+-------+------------------------------|
| allowance | mapping(address => mapping(address => uint256)) | 4 | 0 | 32 | | allowance | mapping(address => mapping(address => uint256)) | 4 | 0 | 32 | contracts/L2/WETH9.sol:WETH9 |
+-----------+-------------------------------------------------+------+--------+-------+ +-----------+-------------------------------------------------+------+--------+-------+------------------------------+
======================= =======================
➡ ProxyAdmin ➡ ProxyAdmin
======================= =======================
+--------------------+-----------------------------------------------+------+--------+-------+ +--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+============================================================================================+ +============================================================================================================================================+
| owner | address | 0 | 0 | 20 | | owner | address | 0 | 0 | 20 | contracts/universal/ProxyAdmin.sol:ProxyAdmin |
|--------------------+-----------------------------------------------+------+--------+-------| |--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------|
| proxyType | mapping(address => enum ProxyAdmin.ProxyType) | 1 | 0 | 32 | | proxyType | mapping(address => enum ProxyAdmin.ProxyType) | 1 | 0 | 32 | contracts/universal/ProxyAdmin.sol:ProxyAdmin |
|--------------------+-----------------------------------------------+------+--------+-------| |--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------|
| implementationName | mapping(address => string) | 2 | 0 | 32 | | implementationName | mapping(address => string) | 2 | 0 | 32 | contracts/universal/ProxyAdmin.sol:ProxyAdmin |
|--------------------+-----------------------------------------------+------+--------+-------| |--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------|
| addressManager | contract Lib_AddressManager | 3 | 0 | 20 | | addressManager | contract Lib_AddressManager | 3 | 0 | 20 | contracts/universal/ProxyAdmin.sol:ProxyAdmin |
|--------------------+-----------------------------------------------+------+--------+-------| |--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------|
| upgrading | bool | 3 | 20 | 1 | | upgrading | bool | 3 | 20 | 1 | contracts/universal/ProxyAdmin.sol:ProxyAdmin |
+--------------------+-----------------------------------------------+------+--------+-------+ +--------------------+-----------------------------------------------+------+--------+-------+-----------------------------------------------+
======================= =======================
➡ Proxy ➡ Proxy
======================= =======================
+------+------+------+--------+-------+ +------+------+------+--------+-------+----------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=====================================+ +================================================+
+------+------+------+--------+-------+ +------+------+------+--------+-------+----------+
======================= =======================
➡ L1ChugSplashProxy ➡ L1ChugSplashProxy
======================= =======================
+------+------+------+--------+-------+ +------+------+------+--------+-------+----------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+=====================================+ +================================================+
+------+------+------+--------+-------+ +------+------+------+--------+-------+----------+
======================= =======================
➡ OptimismMintableERC20 ➡ OptimismMintableERC20
======================= =======================
+--------------+-------------------------------------------------+------+--------+-------+ +--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+========================================================================================+ +==============================================================================================================================================================+
| _balances | mapping(address => uint256) | 0 | 0 | 32 | | _balances | mapping(address => uint256) | 0 | 0 | 32 | contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------|
| _allowances | mapping(address => mapping(address => uint256)) | 1 | 0 | 32 | | _allowances | mapping(address => mapping(address => uint256)) | 1 | 0 | 32 | contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------|
| _totalSupply | uint256 | 2 | 0 | 32 | | _totalSupply | uint256 | 2 | 0 | 32 | contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------|
| _name | string | 3 | 0 | 32 | | _name | string | 3 | 0 | 32 | contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------|
| _symbol | string | 4 | 0 | 32 | | _symbol | string | 4 | 0 | 32 | contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------|
| remoteToken | address | 5 | 0 | 20 | | remoteToken | address | 5 | 0 | 20 | contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 |
|--------------+-------------------------------------------------+------+--------+-------| |--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------|
| bridge | address | 6 | 0 | 20 | | bridge | address | 6 | 0 | 20 | contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 |
+--------------+-------------------------------------------------+------+--------+-------+ +--------------+-------------------------------------------------+------+--------+-------+---------------------------------------------------------------------+
======================= =======================
➡ OptimismMintableTokenFactory ➡ OptimismMintableTokenFactory
======================= =======================
+--------+---------+------+--------+-------+ +--------+---------+------+--------+-------+-----------------------------------------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | | Name | Type | Slot | Offset | Bytes | Contract |
+==========================================+ +==============================================================================================================================+
| bridge | address | 0 | 0 | 20 | | bridge | address | 0 | 0 | 20 | contracts/universal/OptimismMintableTokenFactory.sol:OptimismMintableTokenFactory |
+--------+---------+------+--------+-------+ +--------+---------+------+--------+-------+-----------------------------------------------------------------------------------+
...@@ -2,48 +2,66 @@ ...@@ -2,48 +2,66 @@
pragma solidity ^0.8.9; pragma solidity ^0.8.9;
/** /**
* @title OVM_DeployerWhitelist * @custom:legacy
* @dev The Deployer Whitelist is a temporary predeploy used to provide additional safety during the * @custom:proxied
* initial phases of our mainnet roll out. It is owned by the Optimism team, and defines accounts * @custom:predeployed 0x4200000000000000000000000000000000000002
* which are allowed to deploy contracts on Layer2. The Execution Manager will only allow an * @title DeployerWhitelist
* ovmCREATE or ovmCREATE2 operation to proceed if the deployer's address whitelisted. * @notice DeployerWhitelist is a legacy contract that was originally used to act as a whitelist of
* addresses allowed to the Optimism network. The DeployerWhitelist has since been
* disabled, but the code is kept in state for the sake of full backwards compatibility.
* As of the Bedrock upgrade, the DeployerWhitelist is completely unused by the Optimism
* system and could, in theory, be removed entirely.
*/ */
contract DeployerWhitelist { contract DeployerWhitelist {
/********** /**
* Events * * @notice Emitted when the owner of this contract changes.
**********/ *
* @param oldOwner Address of the previous owner.
* @param newOwner Address of the new owner.
*/
event OwnerChanged(address oldOwner, address newOwner); event OwnerChanged(address oldOwner, address newOwner);
/**
* @notice Emitted when the whitelist status of a deployer changes.
*
* @param deployer Address of the deployer.
* @param whitelisted Boolean indicating whether the deployer is whitelisted.
*/
event WhitelistStatusChanged(address deployer, bool whitelisted); event WhitelistStatusChanged(address deployer, bool whitelisted);
event WhitelistDisabled(address oldOwner);
/********************** /**
* Contract Constants * * @notice Emitted when the whitelist is disabled.
**********************/ *
* @param oldOwner Address of the final owner of the whitelist.
*/
event WhitelistDisabled(address oldOwner);
// WARNING: When owner is set to address(0), the whitelist is disabled. /**
* @notice Address of the owner of this contract. Note that when this address is set to
* address(0), the whitelist is disabled.
*/
address public owner; address public owner;
mapping(address => bool) public whitelist;
/********************** /**
* Function Modifiers * * @notice Mapping of deployer addresses to boolean whitelist status.
**********************/ */
mapping(address => bool) public whitelist;
/** /**
* Blocks functions to anyone except the contract owner. * @notice Blocks functions to anyone except the contract owner.
*/ */
modifier onlyOwner() { modifier onlyOwner() {
require(msg.sender == owner, "Function can only be called by the owner of this contract."); require(
msg.sender == owner,
"DeployerWhitelist: function can only be called by the owner of this contract"
);
_; _;
} }
/********************
* Public Functions *
********************/
/** /**
* Adds or removes an address from the deployment whitelist. * @notice Adds or removes an address from the deployment whitelist.
* @param _deployer Address to update permissions for. *
* @param _deployer Address to update permissions for.
* @param _isWhitelisted Whether or not the address is whitelisted. * @param _isWhitelisted Whether or not the address is whitelisted.
*/ */
function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) external onlyOwner { function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) external onlyOwner {
...@@ -52,17 +70,17 @@ contract DeployerWhitelist { ...@@ -52,17 +70,17 @@ contract DeployerWhitelist {
} }
/** /**
* Updates the owner of this contract. * @notice Updates the owner of this contract.
*
* @param _owner Address of the new owner. * @param _owner Address of the new owner.
*/ */
// slither-disable-next-line external-function function setOwner(address _owner) external onlyOwner {
function setOwner(address _owner) public onlyOwner {
// Prevent users from setting the whitelist owner to address(0) except via // Prevent users from setting the whitelist owner to address(0) except via
// enableArbitraryContractDeployment. If you want to burn the whitelist owner, send it to // enableArbitraryContractDeployment. If you want to burn the whitelist owner, send it to
// any other address that doesn't have a corresponding knowable private key. // any other address that doesn't have a corresponding knowable private key.
require( require(
_owner != address(0), _owner != address(0),
"OVM_DeployerWhitelist: can only be disabled via enableArbitraryContractDeployment" "DeployerWhitelist: can only be disabled via enableArbitraryContractDeployment"
); );
emit OwnerChanged(owner, _owner); emit OwnerChanged(owner, _owner);
...@@ -70,7 +88,7 @@ contract DeployerWhitelist { ...@@ -70,7 +88,7 @@ contract DeployerWhitelist {
} }
/** /**
* Permanently enables arbitrary contract deployment and deletes the owner. * @notice Permanently enables arbitrary contract deployment and deletes the owner.
*/ */
function enableArbitraryContractDeployment() external onlyOwner { function enableArbitraryContractDeployment() external onlyOwner {
emit WhitelistDisabled(owner); emit WhitelistDisabled(owner);
...@@ -78,9 +96,11 @@ contract DeployerWhitelist { ...@@ -78,9 +96,11 @@ contract DeployerWhitelist {
} }
/** /**
* Checks whether an address is allowed to deploy contracts. * @notice Checks whether an address is allowed to deploy contracts.
*
* @param _deployer Address to check. * @param _deployer Address to check.
* @return _allowed Whether or not the address can deploy contracts. *
* @return Whether or not the address can deploy contracts.
*/ */
function isDeployerAllowed(address _deployer) external view returns (bool) { function isDeployerAllowed(address _deployer) external view returns (bool) {
return (owner == address(0) || whitelist[_deployer]); return (owner == address(0) || whitelist[_deployer]);
......
...@@ -39,19 +39,11 @@ contract L2ToL1MessagePasser { ...@@ -39,19 +39,11 @@ contract L2ToL1MessagePasser {
*/ */
event WithdrawerBalanceBurnt(uint256 indexed amount); event WithdrawerBalanceBurnt(uint256 indexed amount);
/*************
* Constants *
*************/
/** /**
* @notice The L1 gas limit set when eth is withdrawn using the receive() function. * @notice The L1 gas limit set when eth is withdrawn using the receive() function.
*/ */
uint256 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000; uint256 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;
/*************
* Variables *
*************/
/** /**
* @notice Includes the message hashes for all withdrawals * @notice Includes the message hashes for all withdrawals
*/ */
......
...@@ -8,10 +8,14 @@ import { Lib_PredeployAddresses } from "../libraries/Lib_PredeployAddresses.sol" ...@@ -8,10 +8,14 @@ import { Lib_PredeployAddresses } from "../libraries/Lib_PredeployAddresses.sol"
import { OptimismMintableERC20 } from "../universal/OptimismMintableERC20.sol"; import { OptimismMintableERC20 } from "../universal/OptimismMintableERC20.sol";
/** /**
* @custom:legacy
* @custom:proxied * @custom:proxied
* @custom:predeploy 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000 * @custom:predeploy 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000
* @title OVM_ETH * @title OVM_ETH
* @notice Legacy contract which used to hold ETH balances on L2. * @notice OVM_ETH is a legacy contract that held ETH balances before the Bedrock upgrade. All
* ETH balances held within this contract were migrated to the state trie as part of the
* Bedrock upgrade. Functions within this contract that mutate state were already disabled
* as part of the EVM equivalence upgrade.
*/ */
contract OVM_ETH is OptimismMintableERC20 { contract OVM_ETH is OptimismMintableERC20 {
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment