Commit f5d5cf5c authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: delete dead code

The `GasPriceOracle` contract no longer uses the events
that were defined in it. This commit deletes the events
and adds a comment noting that they existed before bedrock.
parent 83cd4177
...@@ -30,7 +30,7 @@ var ( ...@@ -30,7 +30,7 @@ var (
// GasPriceOracleMetaData contains all meta data concerning the GasPriceOracle contract. // GasPriceOracleMetaData contains all meta data concerning the GasPriceOracle contract.
var GasPriceOracleMetaData = &bind.MetaData{ var GasPriceOracleMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"decimals\",\"type\":\"uint256\"}],\"name\":\"DecimalsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"overhead\",\"type\":\"uint256\"}],\"name\":\"OverheadUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"scalar\",\"type\":\"uint256\"}],\"name\":\"ScalarUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"baseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"getL1Fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"getL1GasUsed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"overhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"scalar\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"baseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"getL1Fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"getL1GasUsed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"overhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"scalar\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x60e060405234801561001057600080fd5b506000608081905260a052600160c05260805160a05160c051610a0161004f60003960006102c1015260006102980152600061026f0152610a016000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c806354fd4d5011610076578063de26c4a11161005b578063de26c4a114610101578063f45e65d814610114578063fe173b97146100fb57600080fd5b806354fd4d50146100e65780636ef25c3a146100fb57600080fd5b80630c18c162146100a8578063313ce567146100c357806349948e0e146100cb578063519b4bd3146100de575b600080fd5b6100b061011c565b6040519081526020015b60405180910390f35b6100b0600681565b6100b06100d9366004610587565b6101a6565b6100b0610207565b6100ee610268565b6040516100ba9190610686565b486100b0565b6100b061010f366004610587565b61030b565b6100b06103ba565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561017d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a191906106d7565b905090565b6000806101b28361030b565b905060006101be610207565b6101c8908361071f565b905060006101d86006600a61087e565b905060006101e46103ba565b6101ee908461071f565b905060006101fc83836108c0565b979650505050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa15801561017d573d6000803e3d6000fd5b60606102937f000000000000000000000000000000000000000000000000000000000000000061041b565b6102bc7f000000000000000000000000000000000000000000000000000000000000000061041b565b6102e57f000000000000000000000000000000000000000000000000000000000000000061041b565b6040516020016102f7939291906108d4565b604051602081830303815290604052905090565b80516000908190815b8181101561038e5784818151811061032e5761032e61094a565b01602001517fff000000000000000000000000000000000000000000000000000000000000001660000361036e57610367600484610979565b925061037c565b610379601084610979565b92505b8061038681610991565b915050610314565b50600061039961011c565b6103a39084610979565b90506103b181610440610979565b95945050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561017d573d6000803e3d6000fd5b60608160000361045e57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610488578061047281610991565b91506104819050600a836108c0565b9150610462565b60008167ffffffffffffffff8111156104a3576104a3610558565b6040519080825280601f01601f1916602001820160405280156104cd576020820181803683370190505b5090505b8415610550576104e26001836109c9565b91506104ef600a866109e0565b6104fa906030610979565b60f81b81838151811061050f5761050f61094a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610549600a866108c0565b94506104d1565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561059957600080fd5b813567ffffffffffffffff808211156105b157600080fd5b818401915084601f8301126105c557600080fd5b8135818111156105d7576105d7610558565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561061d5761061d610558565b8160405282815287602084870101111561063657600080fd5b826020860160208301376000928101602001929092525095945050505050565b60005b83811015610671578181015183820152602001610659565b83811115610680576000848401525b50505050565b60208152600082518060208401526106a5816040850160208701610656565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156106e957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610757576107576106f0565b500290565b600181815b808511156107b557817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561079b5761079b6106f0565b808516156107a857918102915b93841c9390800290610761565b509250929050565b6000826107cc57506001610878565b816107d957506000610878565b81600181146107ef57600281146107f957610815565b6001915050610878565b60ff84111561080a5761080a6106f0565b50506001821b610878565b5060208310610133831016604e8410600b8410161715610838575081810a610878565b610842838361075c565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610874576108746106f0565b0290505b92915050565b600061088a83836107bd565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826108cf576108cf610891565b500490565b600084516108e6818460208901610656565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610922816001850160208a01610656565b6001920191820152835161093d816002840160208801610656565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000821982111561098c5761098c6106f0565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036109c2576109c26106f0565b5060010190565b6000828210156109db576109db6106f0565b500390565b6000826109ef576109ef610891565b50069056fea164736f6c634300080f000a", Bin: "0x60e060405234801561001057600080fd5b506000608081905260a052600160c05260805160a05160c051610a0161004f60003960006102c1015260006102980152600061026f0152610a016000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c806354fd4d5011610076578063de26c4a11161005b578063de26c4a114610101578063f45e65d814610114578063fe173b97146100fb57600080fd5b806354fd4d50146100e65780636ef25c3a146100fb57600080fd5b80630c18c162146100a8578063313ce567146100c357806349948e0e146100cb578063519b4bd3146100de575b600080fd5b6100b061011c565b6040519081526020015b60405180910390f35b6100b0600681565b6100b06100d9366004610587565b6101a6565b6100b0610207565b6100ee610268565b6040516100ba9190610686565b486100b0565b6100b061010f366004610587565b61030b565b6100b06103ba565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561017d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a191906106d7565b905090565b6000806101b28361030b565b905060006101be610207565b6101c8908361071f565b905060006101d86006600a61087e565b905060006101e46103ba565b6101ee908461071f565b905060006101fc83836108c0565b979650505050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa15801561017d573d6000803e3d6000fd5b60606102937f000000000000000000000000000000000000000000000000000000000000000061041b565b6102bc7f000000000000000000000000000000000000000000000000000000000000000061041b565b6102e57f000000000000000000000000000000000000000000000000000000000000000061041b565b6040516020016102f7939291906108d4565b604051602081830303815290604052905090565b80516000908190815b8181101561038e5784818151811061032e5761032e61094a565b01602001517fff000000000000000000000000000000000000000000000000000000000000001660000361036e57610367600484610979565b925061037c565b610379601084610979565b92505b8061038681610991565b915050610314565b50600061039961011c565b6103a39084610979565b90506103b181610440610979565b95945050505050565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561017d573d6000803e3d6000fd5b60608160000361045e57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610488578061047281610991565b91506104819050600a836108c0565b9150610462565b60008167ffffffffffffffff8111156104a3576104a3610558565b6040519080825280601f01601f1916602001820160405280156104cd576020820181803683370190505b5090505b8415610550576104e26001836109c9565b91506104ef600a866109e0565b6104fa906030610979565b60f81b81838151811061050f5761050f61094a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610549600a866108c0565b94506104d1565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561059957600080fd5b813567ffffffffffffffff808211156105b157600080fd5b818401915084601f8301126105c557600080fd5b8135818111156105d7576105d7610558565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561061d5761061d610558565b8160405282815287602084870101111561063657600080fd5b826020860160208301376000928101602001929092525095945050505050565b60005b83811015610671578181015183820152602001610659565b83811115610680576000848401525b50505050565b60208152600082518060208401526106a5816040850160208701610656565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000602082840312156106e957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610757576107576106f0565b500290565b600181815b808511156107b557817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561079b5761079b6106f0565b808516156107a857918102915b93841c9390800290610761565b509250929050565b6000826107cc57506001610878565b816107d957506000610878565b81600181146107ef57600281146107f957610815565b6001915050610878565b60ff84111561080a5761080a6106f0565b50506001821b610878565b5060208310610133831016604e8410600b8410161715610838575081810a610878565b610842838361075c565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610874576108746106f0565b0290505b92915050565b600061088a83836107bd565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826108cf576108cf610891565b500490565b600084516108e6818460208901610656565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610922816001850160208a01610656565b6001920191820152835161093d816002840160208801610656565b0160020195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000821982111561098c5761098c6106f0565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036109c2576109c26106f0565b5060010190565b6000828210156109db576109db6106f0565b500390565b6000826109ef576109ef610891565b50069056fea164736f6c634300080f000a",
} }
...@@ -479,405 +479,3 @@ func (_GasPriceOracle *GasPriceOracleSession) Version() (string, error) { ...@@ -479,405 +479,3 @@ func (_GasPriceOracle *GasPriceOracleSession) Version() (string, error) {
func (_GasPriceOracle *GasPriceOracleCallerSession) Version() (string, error) { func (_GasPriceOracle *GasPriceOracleCallerSession) Version() (string, error) {
return _GasPriceOracle.Contract.Version(&_GasPriceOracle.CallOpts) return _GasPriceOracle.Contract.Version(&_GasPriceOracle.CallOpts)
} }
// GasPriceOracleDecimalsUpdatedIterator is returned from FilterDecimalsUpdated and is used to iterate over the raw logs and unpacked data for DecimalsUpdated events raised by the GasPriceOracle contract.
type GasPriceOracleDecimalsUpdatedIterator struct {
Event *GasPriceOracleDecimalsUpdated // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *GasPriceOracleDecimalsUpdatedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(GasPriceOracleDecimalsUpdated)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(GasPriceOracleDecimalsUpdated)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *GasPriceOracleDecimalsUpdatedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *GasPriceOracleDecimalsUpdatedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// GasPriceOracleDecimalsUpdated represents a DecimalsUpdated event raised by the GasPriceOracle contract.
type GasPriceOracleDecimalsUpdated struct {
Decimals *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterDecimalsUpdated is a free log retrieval operation binding the contract event 0xd68112a8707e326d08be3656b528c1bcc5bbbfc47f4177e2179b14d8640838c1.
//
// Solidity: event DecimalsUpdated(uint256 decimals)
func (_GasPriceOracle *GasPriceOracleFilterer) FilterDecimalsUpdated(opts *bind.FilterOpts) (*GasPriceOracleDecimalsUpdatedIterator, error) {
logs, sub, err := _GasPriceOracle.contract.FilterLogs(opts, "DecimalsUpdated")
if err != nil {
return nil, err
}
return &GasPriceOracleDecimalsUpdatedIterator{contract: _GasPriceOracle.contract, event: "DecimalsUpdated", logs: logs, sub: sub}, nil
}
// WatchDecimalsUpdated is a free log subscription operation binding the contract event 0xd68112a8707e326d08be3656b528c1bcc5bbbfc47f4177e2179b14d8640838c1.
//
// Solidity: event DecimalsUpdated(uint256 decimals)
func (_GasPriceOracle *GasPriceOracleFilterer) WatchDecimalsUpdated(opts *bind.WatchOpts, sink chan<- *GasPriceOracleDecimalsUpdated) (event.Subscription, error) {
logs, sub, err := _GasPriceOracle.contract.WatchLogs(opts, "DecimalsUpdated")
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(GasPriceOracleDecimalsUpdated)
if err := _GasPriceOracle.contract.UnpackLog(event, "DecimalsUpdated", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseDecimalsUpdated is a log parse operation binding the contract event 0xd68112a8707e326d08be3656b528c1bcc5bbbfc47f4177e2179b14d8640838c1.
//
// Solidity: event DecimalsUpdated(uint256 decimals)
func (_GasPriceOracle *GasPriceOracleFilterer) ParseDecimalsUpdated(log types.Log) (*GasPriceOracleDecimalsUpdated, error) {
event := new(GasPriceOracleDecimalsUpdated)
if err := _GasPriceOracle.contract.UnpackLog(event, "DecimalsUpdated", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// GasPriceOracleOverheadUpdatedIterator is returned from FilterOverheadUpdated and is used to iterate over the raw logs and unpacked data for OverheadUpdated events raised by the GasPriceOracle contract.
type GasPriceOracleOverheadUpdatedIterator struct {
Event *GasPriceOracleOverheadUpdated // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *GasPriceOracleOverheadUpdatedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(GasPriceOracleOverheadUpdated)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(GasPriceOracleOverheadUpdated)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *GasPriceOracleOverheadUpdatedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *GasPriceOracleOverheadUpdatedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// GasPriceOracleOverheadUpdated represents a OverheadUpdated event raised by the GasPriceOracle contract.
type GasPriceOracleOverheadUpdated struct {
Overhead *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterOverheadUpdated is a free log retrieval operation binding the contract event 0x32740b35c0ea213650f60d44366b4fb211c9033b50714e4a1d34e65d5beb9bb4.
//
// Solidity: event OverheadUpdated(uint256 overhead)
func (_GasPriceOracle *GasPriceOracleFilterer) FilterOverheadUpdated(opts *bind.FilterOpts) (*GasPriceOracleOverheadUpdatedIterator, error) {
logs, sub, err := _GasPriceOracle.contract.FilterLogs(opts, "OverheadUpdated")
if err != nil {
return nil, err
}
return &GasPriceOracleOverheadUpdatedIterator{contract: _GasPriceOracle.contract, event: "OverheadUpdated", logs: logs, sub: sub}, nil
}
// WatchOverheadUpdated is a free log subscription operation binding the contract event 0x32740b35c0ea213650f60d44366b4fb211c9033b50714e4a1d34e65d5beb9bb4.
//
// Solidity: event OverheadUpdated(uint256 overhead)
func (_GasPriceOracle *GasPriceOracleFilterer) WatchOverheadUpdated(opts *bind.WatchOpts, sink chan<- *GasPriceOracleOverheadUpdated) (event.Subscription, error) {
logs, sub, err := _GasPriceOracle.contract.WatchLogs(opts, "OverheadUpdated")
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(GasPriceOracleOverheadUpdated)
if err := _GasPriceOracle.contract.UnpackLog(event, "OverheadUpdated", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseOverheadUpdated is a log parse operation binding the contract event 0x32740b35c0ea213650f60d44366b4fb211c9033b50714e4a1d34e65d5beb9bb4.
//
// Solidity: event OverheadUpdated(uint256 overhead)
func (_GasPriceOracle *GasPriceOracleFilterer) ParseOverheadUpdated(log types.Log) (*GasPriceOracleOverheadUpdated, error) {
event := new(GasPriceOracleOverheadUpdated)
if err := _GasPriceOracle.contract.UnpackLog(event, "OverheadUpdated", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// GasPriceOracleScalarUpdatedIterator is returned from FilterScalarUpdated and is used to iterate over the raw logs and unpacked data for ScalarUpdated events raised by the GasPriceOracle contract.
type GasPriceOracleScalarUpdatedIterator struct {
Event *GasPriceOracleScalarUpdated // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *GasPriceOracleScalarUpdatedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(GasPriceOracleScalarUpdated)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(GasPriceOracleScalarUpdated)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *GasPriceOracleScalarUpdatedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *GasPriceOracleScalarUpdatedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// GasPriceOracleScalarUpdated represents a ScalarUpdated event raised by the GasPriceOracle contract.
type GasPriceOracleScalarUpdated struct {
Scalar *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterScalarUpdated is a free log retrieval operation binding the contract event 0x3336cd9708eaf2769a0f0dc0679f30e80f15dcd88d1921b5a16858e8b85c591a.
//
// Solidity: event ScalarUpdated(uint256 scalar)
func (_GasPriceOracle *GasPriceOracleFilterer) FilterScalarUpdated(opts *bind.FilterOpts) (*GasPriceOracleScalarUpdatedIterator, error) {
logs, sub, err := _GasPriceOracle.contract.FilterLogs(opts, "ScalarUpdated")
if err != nil {
return nil, err
}
return &GasPriceOracleScalarUpdatedIterator{contract: _GasPriceOracle.contract, event: "ScalarUpdated", logs: logs, sub: sub}, nil
}
// WatchScalarUpdated is a free log subscription operation binding the contract event 0x3336cd9708eaf2769a0f0dc0679f30e80f15dcd88d1921b5a16858e8b85c591a.
//
// Solidity: event ScalarUpdated(uint256 scalar)
func (_GasPriceOracle *GasPriceOracleFilterer) WatchScalarUpdated(opts *bind.WatchOpts, sink chan<- *GasPriceOracleScalarUpdated) (event.Subscription, error) {
logs, sub, err := _GasPriceOracle.contract.WatchLogs(opts, "ScalarUpdated")
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(GasPriceOracleScalarUpdated)
if err := _GasPriceOracle.contract.UnpackLog(event, "ScalarUpdated", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseScalarUpdated is a log parse operation binding the contract event 0x3336cd9708eaf2769a0f0dc0679f30e80f15dcd88d1921b5a16858e8b85c591a.
//
// Solidity: event ScalarUpdated(uint256 scalar)
func (_GasPriceOracle *GasPriceOracleFilterer) ParseScalarUpdated(log types.Log) (*GasPriceOracleScalarUpdated, error) {
event := new(GasPriceOracleScalarUpdated)
if err := _GasPriceOracle.contract.UnpackLog(event, "ScalarUpdated", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
...@@ -10,10 +10,16 @@ import { L1Block } from "../L2/L1Block.sol"; ...@@ -10,10 +10,16 @@ import { L1Block } from "../L2/L1Block.sol";
* @custom:predeploy 0x420000000000000000000000000000000000000F * @custom:predeploy 0x420000000000000000000000000000000000000F
* @title GasPriceOracle * @title GasPriceOracle
* @notice This contract maintains the variables responsible for computing the L1 portion of the * @notice This contract maintains the variables responsible for computing the L1 portion of the
* total fee charged on L2. The values stored in the contract are looked up as part of the * total fee charged on L2. Before Bedrock, this contract held variables in state that were
* L2 state transition function and used to compute the total fee paid by the user. The * read during the state transition function to compute the L1 portion of the transaction
* contract exposes an API that is useful for knowing how large the L1 portion of their * fee. After Bedrock, this contract now simply proxies the L1Block contract, which has
* transaction fee will be. * the values used to compute the L1 portion of the fee in its state.
*
* The contract exposes an API that is useful for knowing how large the L1 portion of the
* transaction fee will be. The following events were deprecated with Bedrock:
* - event OverheadUpdated(uint256 overhead);
* - event ScalarUpdated(uint256 scalar);
* - event DecimalsUpdated(uint256 decimals);
*/ */
contract GasPriceOracle is Semver { contract GasPriceOracle is Semver {
/** /**
...@@ -56,21 +62,6 @@ contract GasPriceOracle is Semver { ...@@ -56,21 +62,6 @@ contract GasPriceOracle is Semver {
*/ */
uint256 public constant decimals = 6; uint256 public constant decimals = 6;
/**
* @notice Emitted when the overhead value is updated.
*/
event OverheadUpdated(uint256 overhead);
/**
* @notice Emitted when the scalar value is updated.
*/
event ScalarUpdated(uint256 scalar);
/**
* @notice Emitted when the decimals value is updated.
*/
event DecimalsUpdated(uint256 decimals);
/** /**
* @custom:semver 0.0.1 * @custom:semver 0.0.1
*/ */
......
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