Commit 404267b7 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: remove storage spacers gpo

Removes the storage spacers for the `GasPriceOracle`
since the migration will be wiping the storage layout.

Must be merged with https://github.com/ethereum-optimism/optimism/pull/4605

The fee values were stored in the `GasPriceOracle` predeploy
before the bedrock upgrade. Afterwards they are in the `L1Block`
contract. This simplifies the `GasPriceOracle`.
parent 0f347ab0
...@@ -125,7 +125,7 @@ more: ...@@ -125,7 +125,7 @@ more:
go run ./gen/main.go \ go run ./gen/main.go \
-artifacts ../packages/contracts-bedrock/artifacts \ -artifacts ../packages/contracts-bedrock/artifacts \
-out ./bindings \ -out ./bindings \
-contracts SystemConfig,OptimismMintableERC20Factory,L2StandardBridge,L1BlockNumber,LegacyMessagePasser,DeployerWhitelist,Proxy,OptimismPortal,L2ToL1MessagePasser,L2CrossDomainMessenger,GasPriceOracle,SequencerFeeVault,L1Block,LegacyERC20ETH,WETH9,GovernanceToken,L1CrossDomainMessenger,L2ERC721Bridge,OptimismMintableERC721Factory,ProxyAdmin \ -contracts SystemConfig,OptimismMintableERC20Factory,L2StandardBridge,L1BlockNumber,LegacyMessagePasser,DeployerWhitelist,Proxy,OptimismPortal,L2ToL1MessagePasser,L2CrossDomainMessenger,SequencerFeeVault,L1Block,LegacyERC20ETH,WETH9,GovernanceToken,L1CrossDomainMessenger,L2ERC721Bridge,OptimismMintableERC721Factory,ProxyAdmin \
-package bindings -package bindings
mkdir: mkdir:
......
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"encoding/json"
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_0_0_20\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_1_0_32\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1002,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_2_0_32\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1003,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_3_0_32\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1004,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_4_0_32\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1005,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer_5_0_32\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var GasPriceOracleStorageLayout = new(solc.StorageLayout)
var GasPriceOracleDeployedBin = "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c806354fd4d5011610076578063de26c4a11161005b578063de26c4a114610123578063f45e65d814610136578063fe173b971461011d57600080fd5b806354fd4d50146101085780636ef25c3a1461011d57600080fd5b8063313ce567116100a7578063313ce567146100e657806349948e0e146100ed578063519b4bd31461010057600080fd5b80630c18c162146100c35780632e0f2625146100de575b600080fd5b6100cb61013e565b6040519081526020015b60405180910390f35b6100cb600681565b60066100cb565b6100cb6100fb3660046105a9565b6101c8565b6100cb610229565b61011061028a565b6040516100d591906106a8565b486100cb565b6100cb6101313660046105a9565b61032d565b6100cb6103dc565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c391906106f9565b905090565b6000806101d48361032d565b905060006101e0610229565b6101ea9083610741565b905060006101fa6006600a6108a0565b905060006102066103dc565b6102109084610741565b9050600061021e83836108e2565b979650505050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019f573d6000803e3d6000fd5b60606102b57f000000000000000000000000000000000000000000000000000000000000000061043d565b6102de7f000000000000000000000000000000000000000000000000000000000000000061043d565b6103077f000000000000000000000000000000000000000000000000000000000000000061043d565b604051602001610319939291906108f6565b604051602081830303815290604052905090565b80516000908190815b818110156103b0578481815181106103505761035061096c565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036103905761038960048461099b565b925061039e565b61039b60108461099b565b92505b806103a8816109b3565b915050610336565b5060006103bb61013e565b6103c5908461099b565b90506103d38161044061099b565b95945050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561019f573d6000803e3d6000fd5b60608160000361048057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156104aa5780610494816109b3565b91506104a39050600a836108e2565b9150610484565b60008167ffffffffffffffff8111156104c5576104c561057a565b6040519080825280601f01601f1916602001820160405280156104ef576020820181803683370190505b5090505b8415610572576105046001836109eb565b9150610511600a86610a02565b61051c90603061099b565b60f81b8183815181106105315761053161096c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061056b600a866108e2565b94506104f3565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156105bb57600080fd5b813567ffffffffffffffff808211156105d357600080fd5b818401915084601f8301126105e757600080fd5b8135818111156105f9576105f961057a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561063f5761063f61057a565b8160405282815287602084870101111561065857600080fd5b826020860160208301376000928101602001929092525095945050505050565b60005b8381101561069357818101518382015260200161067b565b838111156106a2576000848401525b50505050565b60208152600082518060208401526106c7816040850160208701610678565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561070b57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561077957610779610712565b500290565b600181815b808511156107d757817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156107bd576107bd610712565b808516156107ca57918102915b93841c9390800290610783565b509250929050565b6000826107ee5750600161089a565b816107fb5750600061089a565b8160018114610811576002811461081b57610837565b600191505061089a565b60ff84111561082c5761082c610712565b50506001821b61089a565b5060208310610133831016604e8410600b841016171561085a575081810a61089a565b610864838361077e565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561089657610896610712565b0290505b92915050565b60006108ac83836107df565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826108f1576108f16108b3565b500490565b60008451610908818460208901610678565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610944816001850160208a01610678565b6001920191820152835161095f816002840160208801610678565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156109ae576109ae610712565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036109e4576109e4610712565b5060010190565b6000828210156109fd576109fd610712565b500390565b600082610a1157610a116108b3565b50069056fea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(GasPriceOracleStorageLayoutJSON), GasPriceOracleStorageLayout); err != nil {
panic(err)
}
layouts["GasPriceOracle"] = GasPriceOracleStorageLayout
deployedBytecodes["GasPriceOracle"] = GasPriceOracleDeployedBin
}
...@@ -138,26 +138,6 @@ ...@@ -138,26 +138,6 @@
| whitelist | mapping(address => bool) | 1 | 0 | 32 | contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist | | whitelist | mapping(address => bool) | 1 | 0 | 32 | contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist |
+-----------+--------------------------+------+--------+-------+----------------------------------------------------------+ +-----------+--------------------------+------+--------+-------+----------------------------------------------------------+
=======================
➡ contracts/L2/GasPriceOracle.sol:GasPriceOracle
=======================
+---------------+---------+------+--------+-------+------------------------------------------------+
| Name | Type | Slot | Offset | Bytes | Contract |
+==================================================================================================+
| spacer_0_0_20 | address | 0 | 0 | 20 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|---------------+---------+------+--------+-------+------------------------------------------------|
| spacer_1_0_32 | uint256 | 1 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|---------------+---------+------+--------+-------+------------------------------------------------|
| spacer_2_0_32 | uint256 | 2 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|---------------+---------+------+--------+-------+------------------------------------------------|
| spacer_3_0_32 | uint256 | 3 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|---------------+---------+------+--------+-------+------------------------------------------------|
| spacer_4_0_32 | uint256 | 4 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
|---------------+---------+------+--------+-------+------------------------------------------------|
| spacer_5_0_32 | uint256 | 5 | 0 | 32 | contracts/L2/GasPriceOracle.sol:GasPriceOracle |
+---------------+---------+------+--------+-------+------------------------------------------------+
======================= =======================
➡ contracts/L2/L1Block.sol:L1Block ➡ contracts/L2/L1Block.sol:L1Block
======================= =======================
......
...@@ -22,48 +22,6 @@ import { L1Block } from "../L2/L1Block.sol"; ...@@ -22,48 +22,6 @@ import { L1Block } from "../L2/L1Block.sol";
* - event DecimalsUpdated(uint256 decimals); * - event DecimalsUpdated(uint256 decimals);
*/ */
contract GasPriceOracle is Semver { contract GasPriceOracle is Semver {
/**
* @custom:legacy
* @custom:spacer _owner
* @notice Spacer for backwards compatibility.
*/
address private spacer_0_0_20;
/**
* @custom:legacy
* @custom:spacer gasPrice
* @notice Spacer for backwards compatibility.
*/
uint256 private spacer_1_0_32;
/**
* @custom:legacy
* @custom:spacer l1BaseFee
* @notice Spacer for backwards compatibility.
*/
uint256 private spacer_2_0_32;
/**
* @custom:legacy
* @custom:spacer overhead
* @notice Spacer for backwards compatibility.
*/
uint256 private spacer_3_0_32;
/**
* @custom:legacy
* @custom:spacer scalar
* @notice Spacer for backwards compatibility.
*/
uint256 private spacer_4_0_32;
/**
* @custom:legacy
* @custom:spacer decimals
* @notice Spacer for backwards compatibility.
*/
uint256 private spacer_5_0_32;
/** /**
* @notice Number of decimals used in the scalar. * @notice Number of decimals used in the scalar.
*/ */
......
{ {
"GasPriceOracle": {
"spacer_0_0_20": {
"slot": 0,
"offset": 0,
"length": 20
},
"spacer_1_0_32": {
"slot": 1,
"offset": 0,
"length": 32
},
"spacer_2_0_32": {
"slot": 2,
"offset": 0,
"length": 32
}
},
"L1CrossDomainMessenger": { "L1CrossDomainMessenger": {
"spacer_0_0_20": { "spacer_0_0_20": {
"slot": 0, "slot": 0,
......
...@@ -16,7 +16,6 @@ contracts=( ...@@ -16,7 +16,6 @@ contracts=(
contracts/L1/OptimismPortal.sol:OptimismPortal contracts/L1/OptimismPortal.sol:OptimismPortal
contracts/L1/SystemConfig.sol:SystemConfig contracts/L1/SystemConfig.sol:SystemConfig
contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist
contracts/L2/GasPriceOracle.sol:GasPriceOracle
contracts/L2/L1Block.sol:L1Block contracts/L2/L1Block.sol:L1Block
contracts/legacy/L1BlockNumber.sol:L1BlockNumber contracts/legacy/L1BlockNumber.sol:L1BlockNumber
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
......
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