Commit bd907f6c authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4520 from ethereum-optimism/feat/p2p-sequencer-addr

feat: p2p sequencer addr
parents 48f3f508 2273c323
...@@ -30,8 +30,8 @@ var ( ...@@ -30,8 +30,8 @@ var (
// SystemConfigMetaData contains all meta data concerning the SystemConfig contract. // SystemConfigMetaData contains all meta data concerning the SystemConfig contract.
var SystemConfigMetaData = &bind.MetaData{ var SystemConfigMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_batcherHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"enumSystemConfig.UpdateType\",\"name\":\"updateType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConfigUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MINIMUM_GAS_LIMIT\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batcherHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasLimit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_batcherHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"overhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"scalar\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batcherHash\",\"type\":\"bytes32\"}],\"name\":\"setBatcherHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"}],\"name\":\"setGasConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"}],\"name\":\"setGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_batcherHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_unsafeBlockSigner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"enumSystemConfig.UpdateType\",\"name\":\"updateType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConfigUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MINIMUM_GAS_LIMIT\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batcherHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasLimit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_batcherHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_unsafeBlockSigner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"overhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"scalar\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batcherHash\",\"type\":\"bytes32\"}],\"name\":\"setBatcherHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"}],\"name\":\"setGasConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_gasLimit\",\"type\":\"uint64\"}],\"name\":\"setGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_unsafeBlockSigner\",\"type\":\"address\"}],\"name\":\"setUnsafeBlockSigner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unsafeBlockSigner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x60e06040523480156200001157600080fd5b506040516200139238038062001392833981016040819052620000349162000432565b6001608052600060a081905260c0526200005285858585856200005d565b5050505050620004a5565b600054610100900460ff16158080156200007e5750600054600160ff909116105b80620000ae57506200009b306200022760201b620007a91760201c565b158015620000ae575060005460ff166001145b620001175760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200013b576000805461ff0019166101001790555b627a12006001600160401b0383161015620001995760405162461bcd60e51b815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f770060448201526064016200010e565b620001a362000236565b620001ae866200029e565b606585905560668490556067839055606880546001600160401b0319166001600160401b03841617905580156200021f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6001600160a01b03163b151590565b600054610100900460ff16620002925760405162461bcd60e51b815260206004820152602b60248201526000805160206200137283398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200010e565b6200029c6200031d565b565b620002a862000384565b6001600160a01b0381166200030f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200010e565b6200031a81620003e0565b50565b600054610100900460ff16620003795760405162461bcd60e51b815260206004820152602b60248201526000805160206200137283398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200010e565b6200029c33620003e0565b6033546001600160a01b031633146200029c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200010e565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600080600060a086880312156200044b57600080fd5b85516001600160a01b03811681146200046357600080fd5b60208701516040880151606089015160808a0151939850919650945092506001600160401b03811681146200049757600080fd5b809150509295509295909350565b60805160a05160c051610e9d620004d5600039600061025b01526000610232015260006102090152610e9d6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b40a817c1161008c578063f2fde38b11610066578063f2fde38b146101ca578063f45e65d8146101dd578063f68016b7146101e6578063ffa1ad74146101fa57600080fd5b8063b40a817c1461019b578063c9b26f61146101ae578063e81b2c6d146101c157600080fd5b806370bde19c116100c857806370bde19c14610143578063715018a6146101585780638da5cb5b14610160578063935f029e1461018857600080fd5b80630c18c162146100ef57806329477e861461010b57806354fd4d501461012e575b600080fd5b6100f860655481565b6040519081526020015b60405180910390f35b610115627a120081565b60405167ffffffffffffffff9091168152602001610102565b610136610202565b6040516101029190610bb3565b610156610151366004610c0e565b6102a5565b005b610156610504565b60335460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610102565b610156610196366004610c5e565b610518565b6101566101a9366004610c80565b6105b1565b6101566101bc366004610c9b565b6106c2565b6100f860675481565b6101566101d8366004610cb4565b6106f2565b6100f860665481565b6068546101159067ffffffffffffffff1681565b6100f8600081565b606061022d7f00000000000000000000000000000000000000000000000000000000000000006107c5565b6102567f00000000000000000000000000000000000000000000000000000000000000006107c5565b61027f7f00000000000000000000000000000000000000000000000000000000000000006107c5565b60405160200161029193929190610ccf565b604051602081830303815290604052905090565b600054610100900460ff16158080156102c55750600054600160ff909116105b806102df5750303b1580156102df575060005460ff166001145b610370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156103ce57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b627a120067ffffffffffffffff83161015610445576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610367565b61044d610902565b610456866106f2565b606585905560668490556067839055606880547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff841617905580156104fc57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b61050c6109a1565b6105166000610a22565b565b6105206109a1565b606582905560668190556040805160208101849052908101829052600090606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190529050600160007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516105a49190610bb3565b60405180910390a3505050565b6105b96109a1565b627a120067ffffffffffffffff82161015610630576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610367565b606880547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff831690811790915560408051602080820193909352815180820390930183528101905260025b60007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516106b69190610bb3565b60405180910390a35050565b6106ca6109a1565b6067819055604080516020808201849052825180830390910181529082019091526000610685565b6106fa6109a1565b73ffffffffffffffffffffffffffffffffffffffff811661079d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610367565b6107a681610a22565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60608160000361080857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610832578061081c81610d74565b915061082b9050600a83610ddb565b915061080c565b60008167ffffffffffffffff81111561084d5761084d610def565b6040519080825280601f01601f191660200182016040528015610877576020820181803683370190505b5090505b84156108fa5761088c600183610e1e565b9150610899600a86610e35565b6108a4906030610e49565b60f81b8183815181106108b9576108b9610e61565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506108f3600a86610ddb565b945061087b565b949350505050565b600054610100900460ff16610999576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610367565b610516610a99565b60335473ffffffffffffffffffffffffffffffffffffffff163314610516576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610367565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610367565b61051633610a22565b60005b83811015610b54578181015183820152602001610b3c565b83811115610b63576000848401525b50505050565b60008151808452610b81816020860160208601610b39565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610bc66020830184610b69565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610bf157600080fd5b919050565b803567ffffffffffffffff81168114610bf157600080fd5b600080600080600060a08688031215610c2657600080fd5b610c2f86610bcd565b9450602086013593506040860135925060608601359150610c5260808701610bf6565b90509295509295909350565b60008060408385031215610c7157600080fd5b50508035926020909101359150565b600060208284031215610c9257600080fd5b610bc682610bf6565b600060208284031215610cad57600080fd5b5035919050565b600060208284031215610cc657600080fd5b610bc682610bcd565b60008451610ce1818460208901610b39565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610d1d816001850160208a01610b39565b60019201918201528351610d38816002840160208801610b39565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610da557610da5610d45565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610dea57610dea610dac565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015610e3057610e30610d45565b500390565b600082610e4457610e44610dac565b500690565b60008219821115610e5c57610e5c610d45565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", Bin: "0x60e06040523480156200001157600080fd5b50604051620014eb380380620014eb83398101604081905262000034916200046d565b6001608052600060a081905260c052620000538686868686866200005f565b505050505050620004e2565b600054610100900460ff1615808015620000805750600054600160ff909116105b80620000b057506200009d306200024560201b620008bb1760201c565b158015620000b0575060005460ff166001145b620001195760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200013d576000805461ff0019166101001790555b627a12006001600160401b03841610156200019b5760405162461bcd60e51b815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f7700604482015260640162000110565b620001a562000254565b620001b087620002bc565b606586905560668590556068849055606980546001600160401b0319166001600160401b038516179055606780546001600160a01b0319166001600160a01b03841617905580156200023c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6001600160a01b03163b151590565b600054610100900460ff16620002b05760405162461bcd60e51b815260206004820152602b6024820152600080516020620014cb83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000110565b620002ba6200033b565b565b620002c6620003a2565b6001600160a01b0381166200032d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000110565b6200033881620003fe565b50565b600054610100900460ff16620003975760405162461bcd60e51b815260206004820152602b6024820152600080516020620014cb83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000110565b620002ba33620003fe565b6033546001600160a01b03163314620002ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000110565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200046857600080fd5b919050565b60008060008060008060c087890312156200048757600080fd5b620004928762000450565b6020880151604089015160608a015160808b0151939950919750955093506001600160401b0381168114620004c657600080fd5b9150620004d660a0880162000450565b90509295509295509295565b60805160a05160c051610fb96200051260003960006103650152600061033c015260006103130152610fb96000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063935f029e11610097578063f2fde38b11610066578063f2fde38b1461022e578063f45e65d814610241578063f68016b71461024a578063ffa1ad741461025e57600080fd5b8063935f029e146101ec578063b40a817c146101ff578063c9b26f6114610212578063e81b2c6d1461022557600080fd5b806354fd4d50116100d357806354fd4d501461019e578063715018a6146101b35780638da5cb5b146101bb5780638f974d7f146101d957600080fd5b80630c18c1621461010557806318d13918146101215780631fd19ee11461013657806329477e861461017b575b600080fd5b61010e60655481565b6040519081526020015b60405180910390f35b61013461012f366004610c6f565b610266565b005b6067546101569073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b610185627a120081565b60405167ffffffffffffffff9091168152602001610118565b6101a661030c565b6040516101189190610d0b565b6101346103af565b60335473ffffffffffffffffffffffffffffffffffffffff16610156565b6101346101e7366004610d36565b6103c3565b6101346101fa366004610d95565b610663565b61013461020d366004610db7565b6106fc565b610134610220366004610dd2565b6107d4565b61010e60685481565b61013461023c366004610c6f565b610804565b61010e60665481565b6069546101859067ffffffffffffffff1681565b61010e600081565b61026e6108d7565b606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915560408051602080820193909352815180820390930183528101905260035b60007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516103009190610d0b565b60405180910390a35050565b60606103377f0000000000000000000000000000000000000000000000000000000000000000610958565b6103607f0000000000000000000000000000000000000000000000000000000000000000610958565b6103897f0000000000000000000000000000000000000000000000000000000000000000610958565b60405160200161039b93929190610deb565b604051602081830303815290604052905090565b6103b76108d7565b6103c16000610a95565b565b600054610100900460ff16158080156103e35750600054600160ff909116105b806103fd5750303b1580156103fd575060005460ff166001145b61048e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156104ec57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b627a120067ffffffffffffffff84161015610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610485565b61056b610b0c565b61057487610804565b606586905560668590556068849055606980547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8516179055606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416179055801561065a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b61066b6108d7565b606582905560668190556040805160208101849052908101829052600090606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190529050600160007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516106ef9190610d0b565b60405180910390a3505050565b6107046108d7565b627a120067ffffffffffffffff8216101561077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610485565b606980547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff831690811790915560408051602080820193909352815180820390930183528101905260026102cf565b6107dc6108d7565b60688190556040805160208082018490528251808303909101815290820190915260006102cf565b61080c6108d7565b73ffffffffffffffffffffffffffffffffffffffff81166108af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610485565b6108b881610a95565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60335473ffffffffffffffffffffffffffffffffffffffff1633146103c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610485565b60608160000361099b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156109c557806109af81610e90565b91506109be9050600a83610ef7565b915061099f565b60008167ffffffffffffffff8111156109e0576109e0610f0b565b6040519080825280601f01601f191660200182016040528015610a0a576020820181803683370190505b5090505b8415610a8d57610a1f600183610f3a565b9150610a2c600a86610f51565b610a37906030610f65565b60f81b818381518110610a4c57610a4c610f7d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610a86600a86610ef7565b9450610a0e565b949350505050565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ba3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610485565b6103c1600054610100900460ff16610c3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610485565b6103c133610a95565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c6a57600080fd5b919050565b600060208284031215610c8157600080fd5b610c8a82610c46565b9392505050565b60005b83811015610cac578181015183820152602001610c94565b83811115610cbb576000848401525b50505050565b60008151808452610cd9816020860160208601610c91565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c8a6020830184610cc1565b803567ffffffffffffffff81168114610c6a57600080fd5b60008060008060008060c08789031215610d4f57600080fd5b610d5887610c46565b9550602087013594506040870135935060608701359250610d7b60808801610d1e565b9150610d8960a08801610c46565b90509295509295509295565b60008060408385031215610da857600080fd5b50508035926020909101359150565b600060208284031215610dc957600080fd5b610c8a82610d1e565b600060208284031215610de457600080fd5b5035919050565b60008451610dfd818460208901610c91565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610e39816001850160208a01610c91565b60019201918201528351610e54816002840160208801610c91565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ec157610ec1610e61565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610f0657610f06610ec8565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015610f4c57610f4c610e61565b500390565b600082610f6057610f60610ec8565b500690565b60008219821115610f7857610f78610e61565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069",
} }
// SystemConfigABI is the input ABI used to generate the binding from. // SystemConfigABI is the input ABI used to generate the binding from.
...@@ -43,7 +43,7 @@ var SystemConfigABI = SystemConfigMetaData.ABI ...@@ -43,7 +43,7 @@ var SystemConfigABI = SystemConfigMetaData.ABI
var SystemConfigBin = SystemConfigMetaData.Bin var SystemConfigBin = SystemConfigMetaData.Bin
// DeploySystemConfig deploys a new Ethereum contract, binding an instance of SystemConfig to it. // DeploySystemConfig deploys a new Ethereum contract, binding an instance of SystemConfig to it.
func DeploySystemConfig(auth *bind.TransactOpts, backend bind.ContractBackend, _owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64) (common.Address, *types.Transaction, *SystemConfig, error) { func DeploySystemConfig(auth *bind.TransactOpts, backend bind.ContractBackend, _owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address) (common.Address, *types.Transaction, *SystemConfig, error) {
parsed, err := SystemConfigMetaData.GetAbi() parsed, err := SystemConfigMetaData.GetAbi()
if err != nil { if err != nil {
return common.Address{}, nil, nil, err return common.Address{}, nil, nil, err
...@@ -52,7 +52,7 @@ func DeploySystemConfig(auth *bind.TransactOpts, backend bind.ContractBackend, _ ...@@ -52,7 +52,7 @@ func DeploySystemConfig(auth *bind.TransactOpts, backend bind.ContractBackend, _
return common.Address{}, nil, nil, errors.New("GetABI returned nil") return common.Address{}, nil, nil, errors.New("GetABI returned nil")
} }
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SystemConfigBin), backend, _owner, _overhead, _scalar, _batcherHash, _gasLimit) address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SystemConfigBin), backend, _owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner)
if err != nil { if err != nil {
return common.Address{}, nil, nil, err return common.Address{}, nil, nil, err
} }
...@@ -418,6 +418,37 @@ func (_SystemConfig *SystemConfigCallerSession) Scalar() (*big.Int, error) { ...@@ -418,6 +418,37 @@ func (_SystemConfig *SystemConfigCallerSession) Scalar() (*big.Int, error) {
return _SystemConfig.Contract.Scalar(&_SystemConfig.CallOpts) return _SystemConfig.Contract.Scalar(&_SystemConfig.CallOpts)
} }
// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1.
//
// Solidity: function unsafeBlockSigner() view returns(address)
func (_SystemConfig *SystemConfigCaller) UnsafeBlockSigner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _SystemConfig.contract.Call(opts, &out, "unsafeBlockSigner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1.
//
// Solidity: function unsafeBlockSigner() view returns(address)
func (_SystemConfig *SystemConfigSession) UnsafeBlockSigner() (common.Address, error) {
return _SystemConfig.Contract.UnsafeBlockSigner(&_SystemConfig.CallOpts)
}
// UnsafeBlockSigner is a free data retrieval call binding the contract method 0x1fd19ee1.
//
// Solidity: function unsafeBlockSigner() view returns(address)
func (_SystemConfig *SystemConfigCallerSession) UnsafeBlockSigner() (common.Address, error) {
return _SystemConfig.Contract.UnsafeBlockSigner(&_SystemConfig.CallOpts)
}
// Version is a free data retrieval call binding the contract method 0x54fd4d50. // Version is a free data retrieval call binding the contract method 0x54fd4d50.
// //
// Solidity: function version() view returns(string) // Solidity: function version() view returns(string)
...@@ -449,25 +480,25 @@ func (_SystemConfig *SystemConfigCallerSession) Version() (string, error) { ...@@ -449,25 +480,25 @@ func (_SystemConfig *SystemConfigCallerSession) Version() (string, error) {
return _SystemConfig.Contract.Version(&_SystemConfig.CallOpts) return _SystemConfig.Contract.Version(&_SystemConfig.CallOpts)
} }
// Initialize is a paid mutator transaction binding the contract method 0x70bde19c. // Initialize is a paid mutator transaction binding the contract method 0x8f974d7f.
// //
// Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit) returns() // Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner) returns()
func (_SystemConfig *SystemConfigTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64) (*types.Transaction, error) { func (_SystemConfig *SystemConfigTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address) (*types.Transaction, error) {
return _SystemConfig.contract.Transact(opts, "initialize", _owner, _overhead, _scalar, _batcherHash, _gasLimit) return _SystemConfig.contract.Transact(opts, "initialize", _owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner)
} }
// Initialize is a paid mutator transaction binding the contract method 0x70bde19c. // Initialize is a paid mutator transaction binding the contract method 0x8f974d7f.
// //
// Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit) returns() // Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner) returns()
func (_SystemConfig *SystemConfigSession) Initialize(_owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64) (*types.Transaction, error) { func (_SystemConfig *SystemConfigSession) Initialize(_owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address) (*types.Transaction, error) {
return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _overhead, _scalar, _batcherHash, _gasLimit) return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner)
} }
// Initialize is a paid mutator transaction binding the contract method 0x70bde19c. // Initialize is a paid mutator transaction binding the contract method 0x8f974d7f.
// //
// Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit) returns() // Solidity: function initialize(address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner) returns()
func (_SystemConfig *SystemConfigTransactorSession) Initialize(_owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64) (*types.Transaction, error) { func (_SystemConfig *SystemConfigTransactorSession) Initialize(_owner common.Address, _overhead *big.Int, _scalar *big.Int, _batcherHash [32]byte, _gasLimit uint64, _unsafeBlockSigner common.Address) (*types.Transaction, error) {
return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _overhead, _scalar, _batcherHash, _gasLimit) return _SystemConfig.Contract.Initialize(&_SystemConfig.TransactOpts, _owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner)
} }
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
...@@ -554,6 +585,27 @@ func (_SystemConfig *SystemConfigTransactorSession) SetGasLimit(_gasLimit uint64 ...@@ -554,6 +585,27 @@ func (_SystemConfig *SystemConfigTransactorSession) SetGasLimit(_gasLimit uint64
return _SystemConfig.Contract.SetGasLimit(&_SystemConfig.TransactOpts, _gasLimit) return _SystemConfig.Contract.SetGasLimit(&_SystemConfig.TransactOpts, _gasLimit)
} }
// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918.
//
// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns()
func (_SystemConfig *SystemConfigTransactor) SetUnsafeBlockSigner(opts *bind.TransactOpts, _unsafeBlockSigner common.Address) (*types.Transaction, error) {
return _SystemConfig.contract.Transact(opts, "setUnsafeBlockSigner", _unsafeBlockSigner)
}
// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918.
//
// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns()
func (_SystemConfig *SystemConfigSession) SetUnsafeBlockSigner(_unsafeBlockSigner common.Address) (*types.Transaction, error) {
return _SystemConfig.Contract.SetUnsafeBlockSigner(&_SystemConfig.TransactOpts, _unsafeBlockSigner)
}
// SetUnsafeBlockSigner is a paid mutator transaction binding the contract method 0x18d13918.
//
// Solidity: function setUnsafeBlockSigner(address _unsafeBlockSigner) returns()
func (_SystemConfig *SystemConfigTransactorSession) SetUnsafeBlockSigner(_unsafeBlockSigner common.Address) (*types.Transaction, error) {
return _SystemConfig.Contract.SetUnsafeBlockSigner(&_SystemConfig.TransactOpts, _unsafeBlockSigner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
// //
// Solidity: function transferOwnership(address newOwner) returns() // Solidity: function transferOwnership(address newOwner) returns()
......
...@@ -9,11 +9,11 @@ import ( ...@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const SystemConfigStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1010_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1009_storage\"},{\"astId\":1005,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_uint256\"},{\"astId\":1007,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"batcherHash\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_bytes32\"},{\"astId\":1008,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"gasLimit\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_uint64\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)1009_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1010_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" const SystemConfigStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1011_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1010_storage\"},{\"astId\":1005,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_uint256\"},{\"astId\":1007,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"unsafeBlockSigner\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_address\"},{\"astId\":1008,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"batcherHash\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_bytes32\"},{\"astId\":1009,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"gasLimit\",\"offset\":0,\"slot\":\"105\",\"type\":\"t_uint64\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)1010_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1011_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var SystemConfigStorageLayout = new(solc.StorageLayout) var SystemConfigStorageLayout = new(solc.StorageLayout)
var SystemConfigDeployedBin = "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b40a817c1161008c578063f2fde38b11610066578063f2fde38b146101ca578063f45e65d8146101dd578063f68016b7146101e6578063ffa1ad74146101fa57600080fd5b8063b40a817c1461019b578063c9b26f61146101ae578063e81b2c6d146101c157600080fd5b806370bde19c116100c857806370bde19c14610143578063715018a6146101585780638da5cb5b14610160578063935f029e1461018857600080fd5b80630c18c162146100ef57806329477e861461010b57806354fd4d501461012e575b600080fd5b6100f860655481565b6040519081526020015b60405180910390f35b610115627a120081565b60405167ffffffffffffffff9091168152602001610102565b610136610202565b6040516101029190610bb3565b610156610151366004610c0e565b6102a5565b005b610156610504565b60335460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610102565b610156610196366004610c5e565b610518565b6101566101a9366004610c80565b6105b1565b6101566101bc366004610c9b565b6106c2565b6100f860675481565b6101566101d8366004610cb4565b6106f2565b6100f860665481565b6068546101159067ffffffffffffffff1681565b6100f8600081565b606061022d7f00000000000000000000000000000000000000000000000000000000000000006107c5565b6102567f00000000000000000000000000000000000000000000000000000000000000006107c5565b61027f7f00000000000000000000000000000000000000000000000000000000000000006107c5565b60405160200161029193929190610ccf565b604051602081830303815290604052905090565b600054610100900460ff16158080156102c55750600054600160ff909116105b806102df5750303b1580156102df575060005460ff166001145b610370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156103ce57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b627a120067ffffffffffffffff83161015610445576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610367565b61044d610902565b610456866106f2565b606585905560668490556067839055606880547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff841617905580156104fc57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b61050c6109a1565b6105166000610a22565b565b6105206109a1565b606582905560668190556040805160208101849052908101829052600090606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190529050600160007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516105a49190610bb3565b60405180910390a3505050565b6105b96109a1565b627a120067ffffffffffffffff82161015610630576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610367565b606880547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff831690811790915560408051602080820193909352815180820390930183528101905260025b60007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516106b69190610bb3565b60405180910390a35050565b6106ca6109a1565b6067819055604080516020808201849052825180830390910181529082019091526000610685565b6106fa6109a1565b73ffffffffffffffffffffffffffffffffffffffff811661079d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610367565b6107a681610a22565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60608160000361080857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610832578061081c81610d74565b915061082b9050600a83610ddb565b915061080c565b60008167ffffffffffffffff81111561084d5761084d610def565b6040519080825280601f01601f191660200182016040528015610877576020820181803683370190505b5090505b84156108fa5761088c600183610e1e565b9150610899600a86610e35565b6108a4906030610e49565b60f81b8183815181106108b9576108b9610e61565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506108f3600a86610ddb565b945061087b565b949350505050565b600054610100900460ff16610999576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610367565b610516610a99565b60335473ffffffffffffffffffffffffffffffffffffffff163314610516576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610367565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610367565b61051633610a22565b60005b83811015610b54578181015183820152602001610b3c565b83811115610b63576000848401525b50505050565b60008151808452610b81816020860160208601610b39565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610bc66020830184610b69565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610bf157600080fd5b919050565b803567ffffffffffffffff81168114610bf157600080fd5b600080600080600060a08688031215610c2657600080fd5b610c2f86610bcd565b9450602086013593506040860135925060608601359150610c5260808701610bf6565b90509295509295909350565b60008060408385031215610c7157600080fd5b50508035926020909101359150565b600060208284031215610c9257600080fd5b610bc682610bf6565b600060208284031215610cad57600080fd5b5035919050565b600060208284031215610cc657600080fd5b610bc682610bcd565b60008451610ce1818460208901610b39565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610d1d816001850160208a01610b39565b60019201918201528351610d38816002840160208801610b39565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610da557610da5610d45565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610dea57610dea610dac565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015610e3057610e30610d45565b500390565b600082610e4457610e44610dac565b500690565b60008219821115610e5c57610e5c610d45565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a" var SystemConfigDeployedBin = "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063935f029e11610097578063f2fde38b11610066578063f2fde38b1461022e578063f45e65d814610241578063f68016b71461024a578063ffa1ad741461025e57600080fd5b8063935f029e146101ec578063b40a817c146101ff578063c9b26f6114610212578063e81b2c6d1461022557600080fd5b806354fd4d50116100d357806354fd4d501461019e578063715018a6146101b35780638da5cb5b146101bb5780638f974d7f146101d957600080fd5b80630c18c1621461010557806318d13918146101215780631fd19ee11461013657806329477e861461017b575b600080fd5b61010e60655481565b6040519081526020015b60405180910390f35b61013461012f366004610c6f565b610266565b005b6067546101569073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b610185627a120081565b60405167ffffffffffffffff9091168152602001610118565b6101a661030c565b6040516101189190610d0b565b6101346103af565b60335473ffffffffffffffffffffffffffffffffffffffff16610156565b6101346101e7366004610d36565b6103c3565b6101346101fa366004610d95565b610663565b61013461020d366004610db7565b6106fc565b610134610220366004610dd2565b6107d4565b61010e60685481565b61013461023c366004610c6f565b610804565b61010e60665481565b6069546101859067ffffffffffffffff1681565b61010e600081565b61026e6108d7565b606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915560408051602080820193909352815180820390930183528101905260035b60007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516103009190610d0b565b60405180910390a35050565b60606103377f0000000000000000000000000000000000000000000000000000000000000000610958565b6103607f0000000000000000000000000000000000000000000000000000000000000000610958565b6103897f0000000000000000000000000000000000000000000000000000000000000000610958565b60405160200161039b93929190610deb565b604051602081830303815290604052905090565b6103b76108d7565b6103c16000610a95565b565b600054610100900460ff16158080156103e35750600054600160ff909116105b806103fd5750303b1580156103fd575060005460ff166001145b61048e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156104ec57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b627a120067ffffffffffffffff84161015610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610485565b61056b610b0c565b61057487610804565b606586905560668590556068849055606980547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8516179055606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416179055801561065a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b61066b6108d7565b606582905560668190556040805160208101849052908101829052600090606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190529050600160007f1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be836040516106ef9190610d0b565b60405180910390a3505050565b6107046108d7565b627a120067ffffffffffffffff8216101561077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53797374656d436f6e6669673a20676173206c696d697420746f6f206c6f77006044820152606401610485565b606980547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff831690811790915560408051602080820193909352815180820390930183528101905260026102cf565b6107dc6108d7565b60688190556040805160208082018490528251808303909101815290820190915260006102cf565b61080c6108d7565b73ffffffffffffffffffffffffffffffffffffffff81166108af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610485565b6108b881610a95565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60335473ffffffffffffffffffffffffffffffffffffffff1633146103c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610485565b60608160000361099b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156109c557806109af81610e90565b91506109be9050600a83610ef7565b915061099f565b60008167ffffffffffffffff8111156109e0576109e0610f0b565b6040519080825280601f01601f191660200182016040528015610a0a576020820181803683370190505b5090505b8415610a8d57610a1f600183610f3a565b9150610a2c600a86610f51565b610a37906030610f65565b60f81b818381518110610a4c57610a4c610f7d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610a86600a86610ef7565b9450610a0e565b949350505050565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ba3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610485565b6103c1600054610100900460ff16610c3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610485565b6103c133610a95565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c6a57600080fd5b919050565b600060208284031215610c8157600080fd5b610c8a82610c46565b9392505050565b60005b83811015610cac578181015183820152602001610c94565b83811115610cbb576000848401525b50505050565b60008151808452610cd9816020860160208601610c91565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c8a6020830184610cc1565b803567ffffffffffffffff81168114610c6a57600080fd5b60008060008060008060c08789031215610d4f57600080fd5b610d5887610c46565b9550602087013594506040870135935060608701359250610d7b60808801610d1e565b9150610d8960a08801610c46565b90509295509295509295565b60008060408385031215610da857600080fd5b50508035926020909101359150565b600060208284031215610dc957600080fd5b610c8a82610d1e565b600060208284031215610de457600080fd5b5035919050565b60008451610dfd818460208901610c91565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610e39816001850160208a01610c91565b60019201918201528351610e54816002840160208801610c91565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ec157610ec1610e61565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610f0657610f06610ec8565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015610f4c57610f4c610e61565b500390565b600082610f6057610f60610ec8565b500690565b60008219821115610f7857610f78610e61565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a"
func init() { func init() {
if err := json.Unmarshal([]byte(SystemConfigStorageLayoutJSON), SystemConfigStorageLayout); err != nil { if err := json.Unmarshal([]byte(SystemConfigStorageLayoutJSON), SystemConfigStorageLayout); err != nil {
......
...@@ -82,9 +82,10 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { ...@@ -82,9 +82,10 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
uint642Big(config.GasPriceOracleScalar), uint642Big(config.GasPriceOracleScalar),
config.BatchSenderAddress.Hash(), config.BatchSenderAddress.Hash(),
gasLimit, gasLimit,
config.P2PSequencerAddress,
) )
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("cannot abi encode initialize for SystemConfig: %w", err)
} }
if _, err := upgradeProxy( if _, err := upgradeProxy(
backend, backend,
...@@ -106,7 +107,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { ...@@ -106,7 +107,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
uint642Big(uint64(config.L1GenesisBlockTimestamp)), uint642Big(uint64(config.L1GenesisBlockTimestamp)),
) )
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("cannot abi encode initialize for L2OutputOracle: %w", err)
} }
if _, err := upgradeProxy( if _, err := upgradeProxy(
backend, backend,
...@@ -124,7 +125,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { ...@@ -124,7 +125,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
} }
data, err = portalABI.Pack("initialize") data, err = portalABI.Pack("initialize")
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("cannot abi encode initialize for OptimismPortal: %w", err)
} }
if _, err := upgradeProxy( if _, err := upgradeProxy(
backend, backend,
...@@ -144,7 +145,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { ...@@ -144,7 +145,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
config.FinalSystemOwner, config.FinalSystemOwner,
) )
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("cannot abi encode initialize for L1CrossDomainMessenger: %w", err)
} }
if _, err := upgradeProxy( if _, err := upgradeProxy(
backend, backend,
...@@ -268,6 +269,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend) ...@@ -268,6 +269,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend)
uint642Big(config.GasPriceOracleScalar), uint642Big(config.GasPriceOracleScalar),
config.BatchSenderAddress.Hash(), // left-padded 32 bytes value, version is zero anyway config.BatchSenderAddress.Hash(), // left-padded 32 bytes value, version is zero anyway
gasLimit, gasLimit,
config.P2PSequencerAddress,
}, },
}, },
{ {
...@@ -329,6 +331,7 @@ func l1Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep ...@@ -329,6 +331,7 @@ func l1Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep
deployment.Args[2].(*big.Int), deployment.Args[2].(*big.Int),
deployment.Args[3].(common.Hash), deployment.Args[3].(common.Hash),
deployment.Args[4].(uint64), deployment.Args[4].(uint64),
deployment.Args[5].(common.Address),
) )
case "L2OutputOracle": case "L2OutputOracle":
_, tx, _, err = bindings.DeployL2OutputOracle( _, tx, _, err = bindings.DeployL2OutputOracle(
...@@ -397,6 +400,10 @@ func l1Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep ...@@ -397,6 +400,10 @@ func l1Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep
} }
} }
if err != nil {
err = fmt.Errorf("cannot deploy %s: %w", deployment.Name, err)
}
return tx, err return tx, err
} }
......
...@@ -379,7 +379,8 @@ SequencerFeeVault_Test:test_minWithdrawalAmount_succeeds() (gas: 5420) ...@@ -379,7 +379,8 @@ SequencerFeeVault_Test:test_minWithdrawalAmount_succeeds() (gas: 5420)
SequencerFeeVault_Test:test_receive_succeeds() (gas: 17336) SequencerFeeVault_Test:test_receive_succeeds() (gas: 17336)
SequencerFeeVault_Test:test_withdraw_notEnough_reverts() (gas: 9309) SequencerFeeVault_Test:test_withdraw_notEnough_reverts() (gas: 9309)
SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 159816) SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 159816)
SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 61707) SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 61952)
SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10501) SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10523)
SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10576) SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10510)
SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10592) SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10614)
SystemConfig_Setters_TestFail:test_setUnsafeBlockSigner_notOwner_reverts() (gas: 10638)
...@@ -104,27 +104,29 @@ ...@@ -104,27 +104,29 @@
➡ contracts/L1/SystemConfig.sol:SystemConfig ➡ contracts/L1/SystemConfig.sol:SystemConfig
======================= =======================
+---------------+-------------+------+--------+-------+--------------------------------------------+ +-------------------+-------------+------+--------+-------+--------------------------------------------+
| Name | Type | Slot | Offset | Bytes | Contract | | Name | Type | Slot | Offset | Bytes | Contract |
+==================================================================================================+ +======================================================================================================+
| _initialized | uint8 | 0 | 0 | 1 | contracts/L1/SystemConfig.sol:SystemConfig | | _initialized | uint8 | 0 | 0 | 1 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| _initializing | bool | 0 | 1 | 1 | contracts/L1/SystemConfig.sol:SystemConfig | | _initializing | bool | 0 | 1 | 1 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/SystemConfig.sol:SystemConfig | | __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| _owner | address | 51 | 0 | 20 | contracts/L1/SystemConfig.sol:SystemConfig | | _owner | address | 51 | 0 | 20 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | contracts/L1/SystemConfig.sol:SystemConfig | | __gap | uint256[49] | 52 | 0 | 1568 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| overhead | uint256 | 101 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig | | overhead | uint256 | 101 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| scalar | uint256 | 102 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig | | scalar | uint256 | 102 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| batcherHash | bytes32 | 103 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig | | unsafeBlockSigner | address | 103 | 0 | 20 | contracts/L1/SystemConfig.sol:SystemConfig |
|---------------+-------------+------+--------+-------+--------------------------------------------| |-------------------+-------------+------+--------+-------+--------------------------------------------|
| gasLimit | uint64 | 104 | 0 | 8 | contracts/L1/SystemConfig.sol:SystemConfig | | batcherHash | bytes32 | 104 | 0 | 32 | contracts/L1/SystemConfig.sol:SystemConfig |
+---------------+-------------+------+--------+-------+--------------------------------------------+ |-------------------+-------------+------+--------+-------+--------------------------------------------|
| gasLimit | uint64 | 105 | 0 | 8 | contracts/L1/SystemConfig.sol:SystemConfig |
+-------------------+-------------+------+--------+-------+--------------------------------------------+
======================= =======================
➡ contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist ➡ contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist
......
...@@ -16,14 +16,17 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -16,14 +16,17 @@ contract SystemConfig is OwnableUpgradeable, Semver {
/** /**
* @notice Enum representing different types of updates. * @notice Enum representing different types of updates.
* *
* @custom:value BATCHER Represents an update to the batcher hash. * @custom:value BATCHER Represents an update to the batcher hash.
* @custom:value GAS_CONFIG Represents an update to txn fee config on L2. * @custom:value GAS_CONFIG Represents an update to txn fee config on L2.
* @custom:value GAS_LIMIT Represents an update to gas limit on L2. * @custom:value GAS_LIMIT Represents an update to gas limit on L2.
* @custom:value UNSAFE_BLOCK_SIGNER Represents an update to the signer key for unsafe
* block distrubution.
*/ */
enum UpdateType { enum UpdateType {
BATCHER, BATCHER,
GAS_CONFIG, GAS_CONFIG,
GAS_LIMIT GAS_LIMIT,
UNSAFE_BLOCK_SIGNER
} }
/** /**
...@@ -48,6 +51,13 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -48,6 +51,13 @@ contract SystemConfig is OwnableUpgradeable, Semver {
*/ */
uint256 public scalar; uint256 public scalar;
/**
* @notice Address corresponding to the key that can propagate unsafe blocks
* across the p2p network. This value should not be tightly packed
* into a storage slot with another value to make state proofs more simple.
*/
address public unsafeBlockSigner;
/** /**
* @notice Identifier for the batcher. For version 1 of this configuration, this is represented * @notice Identifier for the batcher. For version 1 of this configuration, this is represented
* as an address left-padded with zeros to 32 bytes. * as an address left-padded with zeros to 32 bytes.
...@@ -82,9 +92,10 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -82,9 +92,10 @@ contract SystemConfig is OwnableUpgradeable, Semver {
uint256 _overhead, uint256 _overhead,
uint256 _scalar, uint256 _scalar,
bytes32 _batcherHash, bytes32 _batcherHash,
uint64 _gasLimit uint64 _gasLimit,
address _unsafeBlockSigner
) Semver(1, 0, 0) { ) Semver(1, 0, 0) {
initialize(_owner, _overhead, _scalar, _batcherHash, _gasLimit); initialize(_owner, _overhead, _scalar, _batcherHash, _gasLimit, _unsafeBlockSigner);
} }
/** /**
...@@ -101,7 +112,8 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -101,7 +112,8 @@ contract SystemConfig is OwnableUpgradeable, Semver {
uint256 _overhead, uint256 _overhead,
uint256 _scalar, uint256 _scalar,
bytes32 _batcherHash, bytes32 _batcherHash,
uint64 _gasLimit uint64 _gasLimit,
address _unsafeBlockSigner
) public initializer { ) public initializer {
require(_gasLimit >= MINIMUM_GAS_LIMIT, "SystemConfig: gas limit too low"); require(_gasLimit >= MINIMUM_GAS_LIMIT, "SystemConfig: gas limit too low");
__Ownable_init(); __Ownable_init();
...@@ -110,6 +122,7 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -110,6 +122,7 @@ contract SystemConfig is OwnableUpgradeable, Semver {
scalar = _scalar; scalar = _scalar;
batcherHash = _batcherHash; batcherHash = _batcherHash;
gasLimit = _gasLimit; gasLimit = _gasLimit;
unsafeBlockSigner = _unsafeBlockSigner;
} }
/** /**
...@@ -139,6 +152,13 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -139,6 +152,13 @@ contract SystemConfig is OwnableUpgradeable, Semver {
emit ConfigUpdate(VERSION, UpdateType.GAS_CONFIG, data); emit ConfigUpdate(VERSION, UpdateType.GAS_CONFIG, data);
} }
function setUnsafeBlockSigner(address _unsafeBlockSigner) external onlyOwner {
unsafeBlockSigner = _unsafeBlockSigner;
bytes memory data = abi.encode(_unsafeBlockSigner);
emit ConfigUpdate(VERSION, UpdateType.UNSAFE_BLOCK_SIGNER, data);
}
/** /**
* @notice Updates the L2 gas limit. * @notice Updates the L2 gas limit.
* *
......
...@@ -78,6 +78,7 @@ contract SystemDictator is OwnableUpgradeable { ...@@ -78,6 +78,7 @@ contract SystemDictator is OwnableUpgradeable {
uint256 scalar; uint256 scalar;
bytes32 batcherHash; bytes32 batcherHash;
uint64 gasLimit; uint64 gasLimit;
address unsafeBlockSigner;
} }
/** /**
...@@ -353,7 +354,8 @@ contract SystemDictator is OwnableUpgradeable { ...@@ -353,7 +354,8 @@ contract SystemDictator is OwnableUpgradeable {
config.systemConfigConfig.overhead, config.systemConfigConfig.overhead,
config.systemConfigConfig.scalar, config.systemConfigConfig.scalar,
config.systemConfigConfig.batcherHash, config.systemConfigConfig.batcherHash,
config.systemConfigConfig.gasLimit config.systemConfigConfig.gasLimit,
config.systemConfigConfig.unsafeBlockSigner
) )
) )
); );
......
...@@ -13,7 +13,8 @@ contract SystemConfig_Init is CommonTest { ...@@ -13,7 +13,8 @@ contract SystemConfig_Init is CommonTest {
_overhead: 2100, _overhead: 2100,
_scalar: 1000000, _scalar: 1000000,
_batcherHash: bytes32(hex"abcd"), _batcherHash: bytes32(hex"abcd"),
_gasLimit: 9_000_000 _gasLimit: 9_000_000,
_unsafeBlockSigner: address(1)
}); });
} }
} }
...@@ -29,7 +30,8 @@ contract SystemConfig_Initialize_TestFail is CommonTest { ...@@ -29,7 +30,8 @@ contract SystemConfig_Initialize_TestFail is CommonTest {
_overhead: 0, _overhead: 0,
_scalar: 0, _scalar: 0,
_batcherHash: bytes32(hex""), _batcherHash: bytes32(hex""),
_gasLimit: MINIMUM_GAS_LIMIT - 1 _gasLimit: MINIMUM_GAS_LIMIT - 1,
_unsafeBlockSigner: address(1)
}); });
} }
} }
...@@ -49,6 +51,11 @@ contract SystemConfig_Setters_TestFail is SystemConfig_Init { ...@@ -49,6 +51,11 @@ contract SystemConfig_Setters_TestFail is SystemConfig_Init {
vm.expectRevert("Ownable: caller is not the owner"); vm.expectRevert("Ownable: caller is not the owner");
sysConf.setGasLimit(0); sysConf.setGasLimit(0);
} }
function test_setUnsafeBlockSigner_notOwner_reverts() external {
vm.expectRevert("Ownable: caller is not the owner");
sysConf.setUnsafeBlockSigner(address(0x20));
}
} }
contract SystemConfig_Setters_Test is SystemConfig_Init { contract SystemConfig_Setters_Test is SystemConfig_Init {
...@@ -94,4 +101,17 @@ contract SystemConfig_Setters_Test is SystemConfig_Init { ...@@ -94,4 +101,17 @@ contract SystemConfig_Setters_Test is SystemConfig_Init {
sysConf.setGasLimit(newGasLimit); sysConf.setGasLimit(newGasLimit);
assertEq(sysConf.gasLimit(), newGasLimit); assertEq(sysConf.gasLimit(), newGasLimit);
} }
function testFuzz_setUnsafeBlockSigner_succeeds(address newUnsafeSigner) external {
vm.expectEmit(true, true, true, true);
emit ConfigUpdate(
0,
SystemConfig.UpdateType.UNSAFE_BLOCK_SIGNER,
abi.encode(newUnsafeSigner)
);
vm.prank(sysConf.owner());
sysConf.setUnsafeBlockSigner(newUnsafeSigner);
assertEq(sysConf.unsafeBlockSigner(), newUnsafeSigner);
}
} }
...@@ -17,6 +17,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -17,6 +17,7 @@ const deployFn: DeployFunction = async (hre) => {
hre.deployConfig.gasPriceOracleScalar, hre.deployConfig.gasPriceOracleScalar,
batcherHash, batcherHash,
hre.deployConfig.l2GenesisBlockGasLimit, hre.deployConfig.l2GenesisBlockGasLimit,
hre.deployConfig.p2pSequencerAddress,
], ],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
...@@ -35,6 +36,11 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -35,6 +36,11 @@ const deployFn: DeployFunction = async (hre) => {
hre.deployConfig.gasPriceOracleScalar hre.deployConfig.gasPriceOracleScalar
) )
await assertContractVariable(contract, 'batcherHash', batcherHash) await assertContractVariable(contract, 'batcherHash', batcherHash)
await assertContractVariable(
contract,
'unsafeBlockSigner',
hre.deployConfig.p2pSequencerAddress
)
}, },
}) })
} }
......
...@@ -99,6 +99,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -99,6 +99,7 @@ const deployFn: DeployFunction = async (hre) => {
32 32
), ),
gasLimit: hre.deployConfig.l2GenesisBlockGasLimit, gasLimit: hre.deployConfig.l2GenesisBlockGasLimit,
unsafeBlockSigner: hre.deployConfig.p2pSequencerAddress,
}, },
} }
......
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