Commit f74c70cb authored by Kelvin Fichter's avatar Kelvin Fichter

feat(ctb): remove genesis output

Removes the startingL2Output from the L2OutputOracle. There's no reason
for this parameter to exist, there's nothing special about the
startingL2Output. It only complicates the initialization process.
Instead, the first output can be published by a proposer just like any
other output.
parent a6db381a
......@@ -36,8 +36,8 @@ type TypesOutputProposal struct {
// L2OutputOracleMetaData contains all meta data concerning the L2OutputOracle contract.
var L2OutputOracleMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_submissionInterval\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockTime\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_startingL2Output\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l1Timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputsDeleted\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousProposer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProposer\",\"type\":\"address\"}],\"name\":\"ProposerChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"L2_BLOCK_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SUBMISSION_INTERVAL\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"}],\"name\":\"changeProposer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"computeL2Timestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"deleteL2Outputs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"getL2Output\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.OutputProposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_startingL2Output\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_l1Blockhash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l1BlockNumber\",\"type\":\"uint256\"}],\"name\":\"proposeL2Output\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startingBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startingTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\"}]",
Bin: "0x6101206040523480156200001257600080fd5b5060405162001daf38038062001daf833981016040819052620000359162000509565b6000608081905260a052600160c05260e08790526101008690526200005e85858585856200006b565b5050505050505062000571565b600054610100900460ff16158080156200008c5750600054600160ff909116105b80620000bc5750620000a9306200027c60201b620010c11760201c565b158015620000bc575060005460ff166001145b620001255760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000149576000805461ff0019166101001790555b42841115620001cf5760405162461bcd60e51b8152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201526374696d6560e01b608482015260a4016200011c565b6065859055606885905560668490556040805180820182528781524260208083019182526000898152606990915292909220905181559051600190910155620002176200028b565b6200022283620002f3565b6200022d82620003d7565b801562000274576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6001600160a01b03163b151590565b600054610100900460ff16620002e75760405162461bcd60e51b815260206004820152602b602482015260008051602062001d8f83398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200011c565b620002f162000429565b565b620002fd62000490565b6001600160a01b0381166200037b5760405162461bcd60e51b815260206004820152603760248201527f4c324f75747075744f7261636c653a206e65772070726f706f7365722063616e60448201527f6e6f7420626520746865207a65726f206164647265737300000000000000000060648201526084016200011c565b6067546040516001600160a01b038084169216907f3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd90600090a3606780546001600160a01b0319166001600160a01b0392909216919091179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620004855760405162461bcd60e51b815260206004820152602b602482015260008051602062001d8f83398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200011c565b620002f133620003d7565b6033546001600160a01b03163314620002f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200011c565b80516001600160a01b03811681146200050457600080fd5b919050565b600080600080600080600060e0888a0312156200052557600080fd5b87519650602088015195506040880151945060608801519350608088015192506200055360a08901620004ec565b91506200056360c08901620004ec565b905092959891949750929550565b60805160a05160c05160e051610100516117b6620005d9600039600081816101240152610ced015260008181610181015281816106d901528181610ba901528181610bf00152610d3b015260006103dd015260006103b40152600061038b01526117b66000f3fe60806040526004361061010d5760003560e01c806389c44cbb116100a5578063a8e4fb9011610074578063dcec334811610059578063dcec33481461032f578063e605d26514610344578063f2fde38b1461036457600080fd5b8063a8e4fb90146102e2578063d1de856c1461030f57600080fd5b806389c44cbb146102285780638da5cb5b146102485780639aaab64814610294578063a25ae557146102a757600080fd5b806370872aa5116100e157806370872aa5146101c5578063715018a6146101db57806372d5fe21146101f2578063887862721461021257600080fd5b80622134cc146101125780634599c78814610159578063529933df1461016f57806354fd4d50146101a3575b600080fd5b34801561011e57600080fd5b506101467f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561016557600080fd5b5061014660685481565b34801561017b57600080fd5b506101467f000000000000000000000000000000000000000000000000000000000000000081565b3480156101af57600080fd5b506101b8610384565b6040516101509190611474565b3480156101d157600080fd5b5061014660655481565b3480156101e757600080fd5b506101f0610427565b005b3480156101fe57600080fd5b506101f061020d3660046114ee565b61043b565b34801561021e57600080fd5b5061014660665481565b34801561023457600080fd5b506101f0610243366004611510565b610579565b34801561025457600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610150565b6101f06102a2366004611529565b61072f565b3480156102b357600080fd5b506102c76102c2366004611510565b610ad9565b60408051825181526020928301519281019290925201610150565b3480156102ee57600080fd5b5060675461026f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561031b57600080fd5b5061014661032a366004611510565b610ce9565b34801561033b57600080fd5b50610146610d37565b34801561035057600080fd5b506101f061035f36600461155b565b610d6c565b34801561037057600080fd5b506101f061037f3660046114ee565b61100a565b60606103af7f00000000000000000000000000000000000000000000000000000000000000006110dd565b6103d87f00000000000000000000000000000000000000000000000000000000000000006110dd565b6104017f00000000000000000000000000000000000000000000000000000000000000006110dd565b604051602001610413939291906115ab565b604051602081830303815290604052905090565b61042f611212565b6104396000611293565b565b610443611212565b73ffffffffffffffffffffffffffffffffffffffff81166104eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a206e65772070726f706f7365722063616e60448201527f6e6f7420626520746865207a65726f206164647265737300000000000000000060648201526084015b60405180910390fd5b60675460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd90600090a3606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610581611212565b60008181526069602052604090205461061c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c65746520612060448201527f6e6f6e2d6578697374656e74206f75747075740000000000000000000000000060648201526084016104e2565b6068548111156106d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f747075747320616674657220746865206c617465737420626c6f636b206e756d60648201527f6265720000000000000000000000000000000000000000000000000000000000608482015260a4016104e2565b6106fe7f000000000000000000000000000000000000000000000000000000000000000082611650565b60685560405181907f21cbfd8ae20a7662b0a8aa9162fc9428f52c94b2e0ac268312628ea47f3f17eb90600090a250565b60675473ffffffffffffffffffffffffffffffffffffffff1633146107d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792070726f706f73657200000000000000000060648201526084016104e2565b6107de610d37565b8314610892576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f7420626520657175616c20746f206e65787420657870656374656420626c6f6360648201527f6b206e756d626572000000000000000000000000000000000000000000000000608482015260a4016104e2565b4261089c84610ce9565b10610929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527f32206f757470757420696e20746865206675747572650000000000000000000060648201526084016104e2565b836109b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f206861736800000000000060648201526084016104e2565b8115610a725781814014610a72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b6861736820646f6573206e60448201527f6f74206d6174636820746865206861736820617420746865206578706563746560648201527f6420686569676874000000000000000000000000000000000000000000000000608482015260a4016104e2565b8242857fc120f5e881491e6e212befa39e36b8f57d5eca31915f2e5d60a420f418caa6df60405160405180910390a4505060408051808201825292835242602080850191825260008481526069909152919091209251835551600190920191909155606855565b6040805180820190915260008082526020820152606854821115610ba5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604b60248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d6265722063616e60448201527f6e6f742062652067726561746572207468616e20746865206c6174657374206260648201527f6c6f636b206e756d626572000000000000000000000000000000000000000000608482015260a4016104e2565b60007f000000000000000000000000000000000000000000000000000000000000000060655484610bd69190611650565b610be09190611696565b905060008115610c2357610c14827f0000000000000000000000000000000000000000000000000000000000000000611650565b610c1e90856116aa565b610c25565b835b600081815260696020908152604091829020825180840190935280548084526001909101549183019190915291925090610ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4c324f75747075744f7261636c653a206e6f206f757470757420666f756e642060448201527f666f722074686520676976656e20626c6f636b206e756d62657200000000000060648201526084016104e2565b949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000060655483610d1a9190611650565b610d2491906116c2565b606654610d3191906116aa565b92915050565b60007f0000000000000000000000000000000000000000000000000000000000000000606854610d6791906116aa565b905090565b600054610100900460ff1615808015610d8c5750600054600160ff909116105b80610da65750303b158015610da6575060005460ff166001145b610e32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104e2565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610e9057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b42841115610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201527f74696d6500000000000000000000000000000000000000000000000000000000608482015260a4016104e2565b6065859055606885905560668490556040805180820182528781524260208083019182526000898152606990915292909220905181559051600190910155610f8d61130a565b610f968361043b565b610f9f82611293565b801561100257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b611012611212565b73ffffffffffffffffffffffffffffffffffffffff81166110b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104e2565b6110be81611293565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60608160000361112057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561114a5780611134816116ff565b91506111439050600a83611737565b9150611124565b60008167ffffffffffffffff8111156111655761116561174b565b6040519080825280601f01601f19166020018201604052801561118f576020820181803683370190505b5090505b8415610ce1576111a4600183611650565b91506111b1600a86611696565b6111bc9060306116aa565b60f81b8183815181106111d1576111d161177a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061120b600a86611737565b9450611193565b60335473ffffffffffffffffffffffffffffffffffffffff163314610439576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166113a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104e2565b610439600054610100900460ff1661143b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016104e2565b61043933611293565b60005b8381101561145f578181015183820152602001611447565b8381111561146e576000848401525b50505050565b6020815260008251806020840152611493816040850160208701611444565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146114e957600080fd5b919050565b60006020828403121561150057600080fd5b611509826114c5565b9392505050565b60006020828403121561152257600080fd5b5035919050565b6000806000806080858703121561153f57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600080600060a0868803121561157357600080fd5b853594506020860135935060408601359250611591606087016114c5565b915061159f608087016114c5565b90509295509295909350565b600084516115bd818460208901611444565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516115f9816001850160208a01611444565b60019201918201528351611614816002840160208801611444565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561166257611662611621565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826116a5576116a5611667565b500690565b600082198211156116bd576116bd611621565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156116fa576116fa611621565b500290565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361173057611730611621565b5060010190565b60008261174657611746611667565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069",
ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_submissionInterval\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l1Timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"OutputsDeleted\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousProposer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProposer\",\"type\":\"address\"}],\"name\":\"ProposerChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"L2_BLOCK_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SUBMISSION_INTERVAL\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"}],\"name\":\"changeProposer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"computeL2Timestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"deleteL2Outputs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"}],\"name\":\"getL2Output\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"structTypes.OutputProposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_startingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_outputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l2BlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_l1Blockhash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_l1BlockNumber\",\"type\":\"uint256\"}],\"name\":\"proposeL2Output\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startingBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startingTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\"}]",
Bin: "0x6101206040523480156200001257600080fd5b5060405162001d3d38038062001d3d8339810160408190526200003591620004d7565b6000608081905260a052600160c05260e08690526101008590526200005d8484848462000069565b50505050505062000534565b600054610100900460ff16158080156200008a5750600054600160ff909116105b80620000ba5750620000a7306200024a60201b620010911760201c565b158015620000ba575060005460ff166001145b620001235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000147576000805461ff0019166101001790555b42841115620001cd5760405162461bcd60e51b8152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201526374696d6560e01b608482015260a4016200011a565b606684905560658590556068859055620001e662000259565b620001f183620002c1565b620001fc82620003a5565b801562000243576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b03163b151590565b600054610100900460ff16620002b55760405162461bcd60e51b815260206004820152602b602482015260008051602062001d1d83398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200011a565b620002bf620003f7565b565b620002cb6200045e565b6001600160a01b038116620003495760405162461bcd60e51b815260206004820152603760248201527f4c324f75747075744f7261636c653a206e65772070726f706f7365722063616e60448201527f6e6f7420626520746865207a65726f206164647265737300000000000000000060648201526084016200011a565b6067546040516001600160a01b038084169216907f3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd90600090a3606780546001600160a01b0319166001600160a01b0392909216919091179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620004535760405162461bcd60e51b815260206004820152602b602482015260008051602062001d1d83398151915260448201526a6e697469616c697a696e6760a81b60648201526084016200011a565b620002bf33620003a5565b6033546001600160a01b03163314620002bf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200011a565b80516001600160a01b0381168114620004d257600080fd5b919050565b60008060008060008060c08789031215620004f157600080fd5b865195506020870151945060408701519350606087015192506200051860808801620004ba565b91506200052860a08801620004ba565b90509295509295509295565b60805160a05160c05160e051610100516117816200059c600039600081816101240152610f5b0152600081816101a30152818161094701528181610e1701528181610e5e0152610fa90152600061065001526000610627015260006105fe01526117816000f3fe60806040526004361061010d5760003560e01c806388786272116100a5578063a25ae55711610074578063d1de856c11610059578063d1de856c1461032f578063dcec33481461034f578063f2fde38b1461036457600080fd5b8063a25ae557146102c7578063a8e4fb901461030257600080fd5b8063887862721461023257806389c44cbb146102485780638da5cb5b146102685780639aaab648146102b457600080fd5b806354fd4d50116100e157806354fd4d50146101c557806370872aa5146101e7578063715018a6146101fd57806372d5fe211461021257600080fd5b80622134cc14610112578063019e2729146101595780634599c7881461017b578063529933df14610191575b600080fd5b34801561011e57600080fd5b506101467f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561016557600080fd5b50610179610174366004611442565b610384565b005b34801561018757600080fd5b5061014660685481565b34801561019d57600080fd5b506101467f000000000000000000000000000000000000000000000000000000000000000081565b3480156101d157600080fd5b506101da6105f7565b60405161015091906114b8565b3480156101f357600080fd5b5061014660655481565b34801561020957600080fd5b5061017961069a565b34801561021e57600080fd5b5061017961022d366004611509565b6106ae565b34801561023e57600080fd5b5061014660665481565b34801561025457600080fd5b5061017961026336600461152b565b6107e7565b34801561027457600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610150565b6101796102c2366004611544565b61099d565b3480156102d357600080fd5b506102e76102e236600461152b565b610d47565b60408051825181526020928301519281019290925201610150565b34801561030e57600080fd5b5060675461028f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561033b57600080fd5b5061014661034a36600461152b565b610f57565b34801561035b57600080fd5b50610146610fa5565b34801561037057600080fd5b5061017961037f366004611509565b610fda565b600054610100900460ff16158080156103a45750600054600160ff909116105b806103be5750303b1580156103be575060005460ff166001145b61044f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156104ad57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b42841115610564576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201527f74696d6500000000000000000000000000000000000000000000000000000000608482015260a401610446565b60668490556065859055606885905561057b6110ad565b610584836106ae565b61058d8261114c565b80156105f057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60606106227f00000000000000000000000000000000000000000000000000000000000000006111c3565b61064b7f00000000000000000000000000000000000000000000000000000000000000006111c3565b6106747f00000000000000000000000000000000000000000000000000000000000000006111c3565b60405160200161068693929190611576565b604051602081830303815290604052905090565b6106a26112f8565b6106ac600061114c565b565b6106b66112f8565b73ffffffffffffffffffffffffffffffffffffffff8116610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a206e65772070726f706f7365722063616e60448201527f6e6f7420626520746865207a65726f20616464726573730000000000000000006064820152608401610446565b60675460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f3d7728dc2838bb794606bd89f5a37930830b32060f69ee929bbfc59b669024dd90600090a3606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6107ef6112f8565b60008181526069602052604090205461088a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c65746520612060448201527f6e6f6e2d6578697374656e74206f7574707574000000000000000000000000006064820152608401610446565b606854811115610942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f747075747320616674657220746865206c617465737420626c6f636b206e756d60648201527f6265720000000000000000000000000000000000000000000000000000000000608482015260a401610446565b61096c7f00000000000000000000000000000000000000000000000000000000000000008261161b565b60685560405181907f21cbfd8ae20a7662b0a8aa9162fc9428f52c94b2e0ac268312628ea47f3f17eb90600090a250565b60675473ffffffffffffffffffffffffffffffffffffffff163314610a44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c324f75747075744f7261636c653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642062792070726f706f7365720000000000000000006064820152608401610446565b610a4c610fa5565b8314610b00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f7420626520657175616c20746f206e65787420657870656374656420626c6f6360648201527f6b206e756d626572000000000000000000000000000000000000000000000000608482015260a401610446565b42610b0a84610f57565b10610b97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527f32206f757470757420696e2074686520667574757265000000000000000000006064820152608401610446565b83610c24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f20686173680000000000006064820152608401610446565b8115610ce05781814014610ce0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f4c324f75747075744f7261636c653a20626c6f636b6861736820646f6573206e60448201527f6f74206d6174636820746865206861736820617420746865206578706563746560648201527f6420686569676874000000000000000000000000000000000000000000000000608482015260a401610446565b8242857fc120f5e881491e6e212befa39e36b8f57d5eca31915f2e5d60a420f418caa6df60405160405180910390a4505060408051808201825292835242602080850191825260008481526069909152919091209251835551600190920191909155606855565b6040805180820190915260008082526020820152606854821115610e13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604b60248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d6265722063616e60448201527f6e6f742062652067726561746572207468616e20746865206c6174657374206260648201527f6c6f636b206e756d626572000000000000000000000000000000000000000000608482015260a401610446565b60007f000000000000000000000000000000000000000000000000000000000000000060655484610e44919061161b565b610e4e9190611661565b905060008115610e9157610e82827f000000000000000000000000000000000000000000000000000000000000000061161b565b610e8c9085611675565b610e93565b835b600081815260696020908152604091829020825180840190935280548084526001909101549183019190915291925090610f4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4c324f75747075744f7261636c653a206e6f206f757470757420666f756e642060448201527f666f722074686520676976656e20626c6f636b206e756d6265720000000000006064820152608401610446565b949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000060655483610f88919061161b565b610f92919061168d565b606654610f9f9190611675565b92915050565b60007f0000000000000000000000000000000000000000000000000000000000000000606854610fd59190611675565b905090565b610fe26112f8565b73ffffffffffffffffffffffffffffffffffffffff8116611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610446565b61108e8161114c565b50565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b600054610100900460ff16611144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610446565b6106ac611379565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60608160000361120657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611230578061121a816116ca565b91506112299050600a83611702565b915061120a565b60008167ffffffffffffffff81111561124b5761124b611716565b6040519080825280601f01601f191660200182016040528015611275576020820181803683370190505b5090505b8415610f4f5761128a60018361161b565b9150611297600a86611661565b6112a2906030611675565b60f81b8183815181106112b7576112b7611745565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506112f1600a86611702565b9450611279565b60335473ffffffffffffffffffffffffffffffffffffffff1633146106ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610446565b600054610100900460ff16611410576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610446565b6106ac3361114c565b803573ffffffffffffffffffffffffffffffffffffffff8116811461143d57600080fd5b919050565b6000806000806080858703121561145857600080fd5b843593506020850135925061146f60408601611419565b915061147d60608601611419565b905092959194509250565b60005b838110156114a357818101518382015260200161148b565b838111156114b2576000848401525b50505050565b60208152600082518060208401526114d7816040850160208701611488565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561151b57600080fd5b61152482611419565b9392505050565b60006020828403121561153d57600080fd5b5035919050565b6000806000806080858703121561155a57600080fd5b5050823594602084013594506040840135936060013592509050565b60008451611588818460208901611488565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516115c4816001850160208a01611488565b600192019182015283516115df816002840160208801611488565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561162d5761162d6115ec565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261167057611670611632565b500690565b60008219821115611688576116886115ec565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156116c5576116c56115ec565b500290565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036116fb576116fb6115ec565b5060010190565b60008261171157611711611632565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069",
}
// L2OutputOracleABI is the input ABI used to generate the binding from.
......@@ -49,7 +49,7 @@ var L2OutputOracleABI = L2OutputOracleMetaData.ABI
var L2OutputOracleBin = L2OutputOracleMetaData.Bin
// DeployL2OutputOracle deploys a new Ethereum contract, binding an instance of L2OutputOracle to it.
func DeployL2OutputOracle(auth *bind.TransactOpts, backend bind.ContractBackend, _submissionInterval *big.Int, _l2BlockTime *big.Int, _startingL2Output [32]byte, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (common.Address, *types.Transaction, *L2OutputOracle, error) {
func DeployL2OutputOracle(auth *bind.TransactOpts, backend bind.ContractBackend, _submissionInterval *big.Int, _l2BlockTime *big.Int, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (common.Address, *types.Transaction, *L2OutputOracle, error) {
parsed, err := L2OutputOracleMetaData.GetAbi()
if err != nil {
return common.Address{}, nil, nil, err
......@@ -58,7 +58,7 @@ func DeployL2OutputOracle(auth *bind.TransactOpts, backend bind.ContractBackend,
return common.Address{}, nil, nil, errors.New("GetABI returned nil")
}
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(L2OutputOracleBin), backend, _submissionInterval, _l2BlockTime, _startingL2Output, _startingBlockNumber, _startingTimestamp, _proposer, _owner)
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(L2OutputOracleBin), backend, _submissionInterval, _l2BlockTime, _startingBlockNumber, _startingTimestamp, _proposer, _owner)
if err != nil {
return common.Address{}, nil, nil, err
}
......@@ -590,25 +590,25 @@ func (_L2OutputOracle *L2OutputOracleTransactorSession) DeleteL2Outputs(_l2Block
return _L2OutputOracle.Contract.DeleteL2Outputs(&_L2OutputOracle.TransactOpts, _l2BlockNumber)
}
// Initialize is a paid mutator transaction binding the contract method 0xe605d265.
// Initialize is a paid mutator transaction binding the contract method 0x019e2729.
//
// Solidity: function initialize(bytes32 _startingL2Output, uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _owner) returns()
func (_L2OutputOracle *L2OutputOracleTransactor) Initialize(opts *bind.TransactOpts, _startingL2Output [32]byte, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (*types.Transaction, error) {
return _L2OutputOracle.contract.Transact(opts, "initialize", _startingL2Output, _startingBlockNumber, _startingTimestamp, _proposer, _owner)
// Solidity: function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _owner) returns()
func (_L2OutputOracle *L2OutputOracleTransactor) Initialize(opts *bind.TransactOpts, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (*types.Transaction, error) {
return _L2OutputOracle.contract.Transact(opts, "initialize", _startingBlockNumber, _startingTimestamp, _proposer, _owner)
}
// Initialize is a paid mutator transaction binding the contract method 0xe605d265.
// Initialize is a paid mutator transaction binding the contract method 0x019e2729.
//
// Solidity: function initialize(bytes32 _startingL2Output, uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _owner) returns()
func (_L2OutputOracle *L2OutputOracleSession) Initialize(_startingL2Output [32]byte, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (*types.Transaction, error) {
return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _startingL2Output, _startingBlockNumber, _startingTimestamp, _proposer, _owner)
// Solidity: function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _owner) returns()
func (_L2OutputOracle *L2OutputOracleSession) Initialize(_startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (*types.Transaction, error) {
return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _startingBlockNumber, _startingTimestamp, _proposer, _owner)
}
// Initialize is a paid mutator transaction binding the contract method 0xe605d265.
// Initialize is a paid mutator transaction binding the contract method 0x019e2729.
//
// Solidity: function initialize(bytes32 _startingL2Output, uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _owner) returns()
func (_L2OutputOracle *L2OutputOracleTransactorSession) Initialize(_startingL2Output [32]byte, _startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (*types.Transaction, error) {
return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _startingL2Output, _startingBlockNumber, _startingTimestamp, _proposer, _owner)
// Solidity: function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _owner) returns()
func (_L2OutputOracle *L2OutputOracleTransactorSession) Initialize(_startingBlockNumber *big.Int, _startingTimestamp *big.Int, _proposer common.Address, _owner common.Address) (*types.Transaction, error) {
return _L2OutputOracle.Contract.Initialize(&_L2OutputOracle.TransactOpts, _startingBlockNumber, _startingTimestamp, _proposer, _owner)
}
// ProposeL2Output is a paid mutator transaction binding the contract method 0x9aaab648.
......
......@@ -41,7 +41,6 @@ type DeployConfig struct {
L2OutputOracleStartingTimestamp int `json:"l2OutputOracleStartingTimestamp"`
L2OutputOracleProposer common.Address `json:"l2OutputOracleProposer"`
L2OutputOracleOwner common.Address `json:"l2OutputOracleOwner"`
L2OutputOracleGenesisL2Output common.Hash `json:"l2OutputOracleGenesisL2Output"`
SystemConfigOwner common.Address `json:"systemConfigOwner"`
......@@ -145,9 +144,6 @@ func (d *DeployConfig) Check() error {
if d.L2OutputOracleOwner == (common.Address{}) {
return fmt.Errorf("%w: L2OutputOracleOwner cannot be address(0)", ErrInvalidDeployConfig)
}
if d.L2OutputOracleGenesisL2Output == (common.Hash{}) {
log.Warn("L2OutputOracleGenesisL2Output is bytes32(0)")
}
if d.SystemConfigOwner == (common.Address{}) {
return fmt.Errorf("%w: SystemConfigOwner cannot be address(0)", ErrInvalidDeployConfig)
}
......
......@@ -102,7 +102,6 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
}
data, err = l2ooABI.Pack(
"initialize",
config.L2OutputOracleGenesisL2Output,
big.NewInt(0),
uint642Big(uint64(config.L1GenesisBlockTimestamp)),
config.L2OutputOracleProposer,
......@@ -278,7 +277,6 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend)
Args: []interface{}{
uint642Big(config.L2OutputOracleSubmissionInterval),
uint642Big(config.L2BlockTime),
[32]byte(config.L2OutputOracleGenesisL2Output),
big.NewInt(0),
uint642Big(uint64(config.L1GenesisBlockTimestamp)),
config.L2OutputOracleProposer,
......@@ -340,11 +338,10 @@ func l1Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep
backend,
deployment.Args[0].(*big.Int),
deployment.Args[1].(*big.Int),
deployment.Args[2].([32]byte),
deployment.Args[2].(*big.Int),
deployment.Args[3].(*big.Int),
deployment.Args[4].(*big.Int),
deployment.Args[4].(common.Address),
deployment.Args[5].(common.Address),
deployment.Args[6].(common.Address),
)
case "OptimismPortal":
_, tx, _, err = bindings.DeployOptimismPortal(
......
......@@ -33,7 +33,6 @@
"l2GenesisBlockDifficulty": "0x1",
"l2GenesisBlockMixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"l2GenesisBlockCoinbase": "0x42000000000000000000000000000000000000f0",
"l2OutputOracleGenesisL2Output": "0x0000000000000000000000000000000000000000000000000000000000000000",
"l2GenesisBlockNumber": "0x0",
"l2GenesisBlockGasUsed": "0x0",
"l2GenesisBlockParentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
......
......@@ -5,7 +5,7 @@ GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 1122
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 348176)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 112253)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 40502)
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 72807)
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 72829)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74956)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35693)
CrossDomainMessenger_Test:testFuzz_baseGas(uint32) (runs: 256, μ: 20196, ~: 20196)
......@@ -85,30 +85,30 @@ L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 122423)
L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 134632)
L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10568)
L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 52615)
L2OutputOracleTest:testCannot_ProposeWithUnmatchedBlockhash() (gas: 31173)
L2OutputOracleTest:testCannot_constructWithBadTimestamp() (gas: 73077)
L2OutputOracleTest:testCannot_deleteL2Outputs_afterLatest() (gas: 199643)
L2OutputOracleTest:testCannot_deleteL2Outputs_ifNotOwner() (gas: 18827)
L2OutputOracleTest:testCannot_deleteL2Outputs_nonExistent() (gas: 91042)
L2OutputOracleTest:testCannot_proposeEmptyOutput() (gas: 28482)
L2OutputOracleTest:testCannot_proposeFutureTimetamp() (gas: 30440)
L2OutputOracleTest:testCannot_proposeL2OutputIfNotProposer() (gas: 27703)
L2OutputOracleTest:testCannot_proposeOnWrongFork() (gas: 30768)
L2OutputOracleTest:testCannot_proposeUnexpectedBlockNumber() (gas: 30143)
L2OutputOracleTest:test_changeProposer() (gas: 47124)
L2OutputOracleTest:test_computeL2Timestamp() (gas: 37255)
L2OutputOracleTest:test_constructor() (gas: 50016)
L2OutputOracleTest:test_deleteOutputs_multipleOutputs() (gas: 209200)
L2OutputOracleTest:test_deleteOutputs_singleOutput() (gas: 99133)
L2OutputOracleTest:test_getL2Output() (gas: 89416)
L2OutputOracleTest:test_latestBlockNumber() (gas: 80604)
L2OutputOracleTest:test_nextBlockNumber() (gas: 15121)
L2OutputOracleTest:test_proposeWithBlockhashAndHeight() (gas: 79432)
L2OutputOracleTest:test_proposingAnotherOutput() (gas: 81212)
L2OutputOracleTest:test_updateOwner() (gas: 36019)
L2OutputOracleUpgradeable_Test:test_cannotInitImpl() (gas: 21727)
L2OutputOracleUpgradeable_Test:test_cannotInitProxy() (gas: 26731)
L2OutputOracleUpgradeable_Test:test_initValuesOnProxy() (gas: 42544)
L2OutputOracleTest:testCannot_ProposeWithUnmatchedBlockhash() (gas: 31194)
L2OutputOracleTest:testCannot_constructWithBadTimestamp() (gas: 70886)
L2OutputOracleTest:testCannot_deleteL2Outputs_afterLatest() (gas: 199838)
L2OutputOracleTest:testCannot_deleteL2Outputs_ifNotOwner() (gas: 18871)
L2OutputOracleTest:testCannot_deleteL2Outputs_nonExistent() (gas: 91129)
L2OutputOracleTest:testCannot_proposeEmptyOutput() (gas: 28503)
L2OutputOracleTest:testCannot_proposeFutureTimetamp() (gas: 30461)
L2OutputOracleTest:testCannot_proposeL2OutputIfNotProposer() (gas: 27724)
L2OutputOracleTest:testCannot_proposeOnWrongFork() (gas: 30789)
L2OutputOracleTest:testCannot_proposeUnexpectedBlockNumber() (gas: 30164)
L2OutputOracleTest:test_changeProposer() (gas: 47223)
L2OutputOracleTest:test_computeL2Timestamp() (gas: 37163)
L2OutputOracleTest:test_constructor() (gas: 39324)
L2OutputOracleTest:test_deleteOutputs_multipleOutputs() (gas: 262835)
L2OutputOracleTest:test_deleteOutputs_singleOutput() (gas: 152682)
L2OutputOracleTest:test_getL2Output() (gas: 89261)
L2OutputOracleTest:test_latestBlockNumber() (gas: 80647)
L2OutputOracleTest:test_nextBlockNumber() (gas: 15187)
L2OutputOracleTest:test_proposeWithBlockhashAndHeight() (gas: 79453)
L2OutputOracleTest:test_proposingAnotherOutput() (gas: 81255)
L2OutputOracleTest:test_updateOwner() (gas: 36063)
L2OutputOracleUpgradeable_Test:test_cannotInitImpl() (gas: 19546)
L2OutputOracleUpgradeable_Test:test_cannotInitProxy() (gas: 24523)
L2OutputOracleUpgradeable_Test:test_initValuesOnProxy() (gas: 30297)
L2OutputOracleUpgradeable_Test:test_upgrading() (gas: 180457)
L2StandardBridge_Test:test_cannotWithdrawEthWithoutSendingIt() (gas: 21749)
L2StandardBridge_Test:test_finalizeBridgeETH_incorrectValueReverts() (gas: 23733)
......@@ -150,23 +150,23 @@ OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 10
OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 15767)
OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_success() (gas: 16010)
OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_success() (gas: 180435)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 199477)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 201677)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 199367)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 201567)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 39634)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalProofNotOldEnough_reverts() (gas: 197153)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onInsufficientGas_reverts() (gas: 195340)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onRecentWithdrawal_reverts() (gas: 175375)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReentrancy_reverts() (gas: 235617)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReplay_reverts() (gas: 239939)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_success() (gas: 231608)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_targetFails_fails() (gas: 334223)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 195767)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidOutputRootProof_reverts() (gas: 85539)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalProofNotOldEnough_reverts() (gas: 197043)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onInsufficientGas_reverts() (gas: 195266)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onRecentWithdrawal_reverts() (gas: 175309)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReentrancy_reverts() (gas: 235543)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReplay_reverts() (gas: 239675)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_success() (gas: 231454)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_targetFails_fails() (gas: 334069)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 195723)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidOutputRootProof_reverts() (gas: 85495)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onSelfCall_reverts() (gas: 50754)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_oninvalidWithdrawalProof_reverts() (gas: 138797)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProveChangedOutputRoot_success() (gas: 279136)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProve_reverts() (gas: 191198)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_validWithdrawalProof_success() (gas: 181364)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_oninvalidWithdrawalProof_reverts() (gas: 138753)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProveChangedOutputRoot_success() (gas: 279048)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProve_reverts() (gas: 191110)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_validWithdrawalProof_success() (gas: 181320)
OptimismPortal_Test:test_OptimismPortalConstructor() (gas: 17298)
OptimismPortal_Test:test_OptimismPortalReceiveEth_success() (gas: 127483)
OptimismPortal_Test:test_depositTransaction_NoValueContract_success() (gas: 76706)
......@@ -178,7 +178,7 @@ OptimismPortal_Test:test_depositTransaction_withEthValueAndContractContractCreat
OptimismPortal_Test:test_depositTransaction_withEthValueAndEOAContractCreation_success() (gas: 75852)
OptimismPortal_Test:test_depositTransaction_withEthValueFromContract_success() (gas: 83370)
OptimismPortal_Test:test_depositTransaction_withEthValueFromEOA_success() (gas: 83964)
OptimismPortal_Test:test_isBlockFinalized_success() (gas: 109865)
OptimismPortal_Test:test_isBlockFinalized_success() (gas: 109644)
OptimismPortal_Test:test_simple_isBlockFinalized_success() (gas: 24142)
Proxy_Test:test_clashingFunctionSignatures() (gas: 101347)
Proxy_Test:test_implementationKey() (gas: 20887)
......
......@@ -94,7 +94,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
*
* @param _submissionInterval Interval in blocks at which checkpoints must be submitted.
* @param _l2BlockTime The time per L2 block, in seconds.
* @param _startingL2Output The initial L2 output of the L2 chain.
* @param _startingBlockNumber The number of the first L2 block.
* @param _startingTimestamp The timestamp of the first L2 block.
* @param _proposer The address of the proposer.
......@@ -103,7 +102,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
constructor(
uint256 _submissionInterval,
uint256 _l2BlockTime,
bytes32 _startingL2Output,
uint256 _startingBlockNumber,
uint256 _startingTimestamp,
address _proposer,
......@@ -112,20 +110,18 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
SUBMISSION_INTERVAL = _submissionInterval;
L2_BLOCK_TIME = _l2BlockTime;
initialize(_startingL2Output, _startingBlockNumber, _startingTimestamp, _proposer, _owner);
initialize(_startingBlockNumber, _startingTimestamp, _proposer, _owner);
}
/**
* @notice Initializer.
*
* @param _startingL2Output Output for the first recoded L2 block.
* @param _startingBlockNumber Block number for the first recoded L2 block.
* @param _startingTimestamp Timestamp for the first recoded L2 block.
* @param _proposer The address of the proposer.
* @param _owner The address of the owner.
*/
function initialize(
bytes32 _startingL2Output,
uint256 _startingBlockNumber,
uint256 _startingTimestamp,
address _proposer,
......@@ -136,10 +132,9 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
"L2OutputOracle: starting L2 timestamp must be less than current time"
);
startingTimestamp = _startingTimestamp;
startingBlockNumber = _startingBlockNumber;
latestBlockNumber = _startingBlockNumber;
startingTimestamp = _startingTimestamp;
l2Outputs[startingBlockNumber] = Types.OutputProposal(_startingL2Output, block.timestamp);
__Ownable_init();
changeProposer(_proposer);
......@@ -156,7 +151,7 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
// solhint-disable-next-line ordering
function deleteL2Outputs(uint256 _l2BlockNumber) external onlyOwner {
// Simple check that accomplishes two things:
// 1. Prevents deleting anything from before the genesis block.
// 1. Prevents deleting anything before (and including) the starting block.
// 2. Prevents deleting anything other than a checkpoint block.
require(
l2Outputs[_l2BlockNumber].outputRoot != bytes32(0),
......
......@@ -67,7 +67,6 @@ contract BaseSystemDictator is Ownable {
* @notice Dynamic L2OutputOracle config.
*/
struct L2OutputOracleDynamicConfig {
bytes32 l2OutputOracleStartingL2Output;
uint256 l2OutputOracleStartingBlockNumber;
uint256 l2OutputOracleStartingTimestamp;
}
......
......@@ -156,7 +156,6 @@ contract MigrationSystemDictator is BaseSystemDictator {
abi.encodeCall(
L2OutputOracle.initialize,
(
l2OutputOracleDynamicConfig.l2OutputOracleStartingL2Output,
l2OutputOracleDynamicConfig.l2OutputOracleStartingBlockNumber,
l2OutputOracleDynamicConfig.l2OutputOracleStartingTimestamp,
config.l2OutputOracleConfig.l2OutputOracleProposer,
......
......@@ -97,7 +97,6 @@ contract L2OutputOracle_Initializer is CommonTest {
address internal owner = 0x000000000000000000000000000000000000ACDC;
uint256 internal submissionInterval = 1800;
uint256 internal l2BlockTime = 2;
bytes32 internal genesisL2Output = keccak256(abi.encode(0));
uint256 internal startingBlockNumber = 200;
uint256 internal startingTimestamp = 1000;
......@@ -121,7 +120,6 @@ contract L2OutputOracle_Initializer is CommonTest {
oracleImpl = new L2OutputOracle(
submissionInterval,
l2BlockTime,
genesisL2Output,
startingBlockNumber,
startingTimestamp,
proposer,
......@@ -133,7 +131,7 @@ contract L2OutputOracle_Initializer is CommonTest {
address(oracleImpl),
abi.encodeCall(
L2OutputOracle.initialize,
(genesisL2Output, startingBlockNumber, startingTimestamp, proposer, owner)
(startingBlockNumber, startingTimestamp, proposer, owner)
)
);
oracle = L2OutputOracle(address(proxy));
......
......@@ -22,10 +22,6 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
assertEq(oracle.startingTimestamp(), startingTimestamp);
assertEq(oracle.proposer(), proposer);
assertEq(oracle.owner(), owner);
Types.OutputProposal memory proposal = oracle.getL2Output(startingBlockNumber);
assertEq(proposal.outputRoot, genesisL2Output);
assertEq(proposal.timestamp, initL1Time);
}
function testCannot_constructWithBadTimestamp() external {
......@@ -34,7 +30,6 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
new L2OutputOracle(
submissionInterval,
l2BlockTime,
genesisL2Output,
startingBlockNumber,
// startingTimestamp is in the future
block.timestamp + 1,
......@@ -275,6 +270,7 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
function test_deleteOutputs_singleOutput() external {
test_proposingAnotherOutput();
test_proposingAnotherOutput();
uint256 latestBlockNumber = oracle.latestBlockNumber();
Types.OutputProposal memory newLatestOutput = oracle.getL2Output(
......@@ -300,6 +296,7 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
test_proposingAnotherOutput();
test_proposingAnotherOutput();
test_proposingAnotherOutput();
test_proposingAnotherOutput();
uint256 latestBlockNumber = oracle.latestBlockNumber();
Types.OutputProposal memory newLatestOutput = oracle.getL2Output(
......@@ -374,10 +371,6 @@ contract L2OutputOracleUpgradeable_Test is L2OutputOracle_Initializer {
assertEq(startingBlockNumber, oracleImpl.startingBlockNumber());
assertEq(startingTimestamp, oracleImpl.startingTimestamp());
Types.OutputProposal memory initOutput = oracleImpl.getL2Output(startingBlockNumber);
assertEq(genesisL2Output, initOutput.outputRoot);
assertEq(initL1Time, initOutput.timestamp);
assertEq(proposer, oracleImpl.proposer());
assertEq(owner, oracleImpl.owner());
}
......@@ -385,7 +378,6 @@ contract L2OutputOracleUpgradeable_Test is L2OutputOracle_Initializer {
function test_cannotInitProxy() external {
vm.expectRevert("Initializable: contract is already initialized");
L2OutputOracle(payable(proxy)).initialize(
genesisL2Output,
startingBlockNumber,
startingTimestamp,
proposer,
......@@ -396,7 +388,6 @@ contract L2OutputOracleUpgradeable_Test is L2OutputOracle_Initializer {
function test_cannotInitImpl() external {
vm.expectRevert("Initializable: contract is already initialized");
L2OutputOracle(oracleImpl).initialize(
genesisL2Output,
startingBlockNumber,
startingTimestamp,
proposer,
......
......@@ -19,7 +19,6 @@
"l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"l2OutputOracleOwner": "0x6925B8704Ff96DEe942623d6FB5e946EF5884b63",
"l2OutputOracleGenesisL2Output": "0x1111111111111111111111111111111111111111111111111111111111111111",
"baseFeeVaultRecipient": "0xBcd4042DE499D14e55001CcbB24a551F3b954096",
"l1FeeVaultRecipient": "0x71bE63f3384f5fb98995898A86B02Fb2426c5788",
......
import { ethers } from 'ethers'
import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import '@nomiclabs/hardhat-ethers'
......@@ -15,7 +14,6 @@ const deployFn: DeployFunction = async (hre) => {
args: [
hre.deployConfig.l2OutputOracleSubmissionInterval,
hre.deployConfig.l2BlockTime,
ethers.constants.HashZero,
0,
0,
hre.deployConfig.l2OutputOracleProposer,
......
......@@ -46,22 +46,6 @@ const deployFn: DeployFunction = async (hre) => {
}
}
if (
hre.deployConfig.l2OutputOracleGenesisL2Output === ethers.constants.HashZero
) {
if (hre.network.config.live === false) {
console.log(`WARNING!!!`)
console.log(`WARNING!!!`)
console.log(`WARNING!!!`)
console.log(`WARNING!!! A genesis L2 output was not provided.`)
console.log(
`WARNING!!! Make sure you are ONLY doing this on a test network.`
)
} else {
throw new Error(`must specify the finalSystemOwner on live networks`)
}
}
const config = await makeDictatorConfig(hre, controller, finalOwner, false)
await deployAndVerifyAndThen({
hre,
......
......@@ -278,19 +278,6 @@ const deployFn: DeployFunction = async (hre) => {
'owner',
hre.deployConfig.l2OutputOracleOwner
)
if (
hre.deployConfig.l2OutputOracleGenesisL2Output !==
ethers.constants.HashZero
) {
const genesisOutput = await L2OutputOracle.getL2Output(
hre.deployConfig.l2OutputOracleStartingBlockNumber
)
assert(
genesisOutput.outputRoot ===
hre.deployConfig.l2OutputOracleGenesisL2Output,
`L2OutputOracle was not initialized with the correct genesis output root`
)
}
// Check OptimismPortal was initialized properly.
await assertContractVariable(
......@@ -387,8 +374,6 @@ const deployFn: DeployFunction = async (hre) => {
}
await MigrationSystemDictator.updateL2OutputOracleDynamicConfig({
l2OutputOracleStartingL2Output:
hre.deployConfig.l2OutputOracleGenesisL2Output,
l2OutputOracleStartingBlockNumber:
hre.deployConfig.l2OutputOracleStartingBlockNumber,
l2OutputOracleStartingTimestamp: deployL2StartingTimestamp,
......
......@@ -160,11 +160,6 @@ const config: HardhatUserConfig = {
l2OutputOracleSubmissionInterval: {
type: 'number',
},
// bytes32 - The initial L2 output of the L2 chain.
l2OutputOracleGenesisL2Output: {
type: 'string',
default: ethers.constants.HashZero,
},
// uint256 - The number of the first L2 block.
l2OutputOracleStartingBlockNumber: {
type: 'number',
......
......@@ -253,10 +253,13 @@ task('deposit-erc20', 'Deposits WETH9 onto L2.')
for (let i = 0; i < 30; i++) {
const messageReceipt = await messenger.waitForMessageReceipt(depositTx)
if (messageReceipt.receiptStatus !== 1) {
throw new Error('deposit failed')
console.log(`Deposit failed, retrying...`)
}
if (messageReceipt.transactionReceipt.blockHash !== prevBlockHash) {
if (
prevBlockHash !== '' &&
messageReceipt.transactionReceipt.blockHash !== prevBlockHash
) {
console.log(
`Block hash changed from ${prevBlockHash} to ${messageReceipt.transactionReceipt.blockHash}`
)
......
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