Documentation ¶
Index ¶
- type Config
- type Oracle
- type RollupOracle
- func (gpo *RollupOracle) SetL1GasPrice(gasPrice *big.Int) error
- func (gpo *RollupOracle) SetL2GasPrice(gasPrice *big.Int) error
- func (gpo *RollupOracle) SetOverhead(overhead *big.Int) error
- func (gpo *RollupOracle) SetScalar(scalar *big.Int, decimals *big.Int) error
- func (gpo *RollupOracle) SuggestL1GasPrice(ctx context.Context) (*big.Int, error)
- func (gpo *RollupOracle) SuggestL2GasPrice(ctx context.Context) (*big.Int, error)
- func (gpo *RollupOracle) SuggestOverhead(ctx context.Context) (*big.Int, error)
- func (gpo *RollupOracle) SuggestScalar(ctx context.Context) (*big.Float, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Oracle ¶
type Oracle struct {
// contains filtered or unexported fields
}
Oracle recommends gas prices based on the content of recent blocks. Suitable for both light and full clients.
type RollupOracle ¶
type RollupOracle struct {
// contains filtered or unexported fields
}
RollupOracle holds the L1 and L2 gas prices for fee calculation
func NewRollupOracle ¶
func NewRollupOracle() *RollupOracle
NewRollupOracle returns an initialized RollupOracle
func (*RollupOracle) SetL1GasPrice ¶
func (gpo *RollupOracle) SetL1GasPrice(gasPrice *big.Int) error
SetL1GasPrice returns the current L1 gas price
func (*RollupOracle) SetL2GasPrice ¶
func (gpo *RollupOracle) SetL2GasPrice(gasPrice *big.Int) error
SetL2GasPrice returns the current L2 gas price
func (*RollupOracle) SetOverhead ¶
func (gpo *RollupOracle) SetOverhead(overhead *big.Int) error
SetOverhead caches the overhead value that is set in the OVM_GasPriceOracle
func (*RollupOracle) SuggestL1GasPrice ¶
SuggestL1GasPrice returns the gas price which should be charged per byte of published data by the sequencer.
func (*RollupOracle) SuggestL2GasPrice ¶
SuggestL2GasPrice returns the gas price which should be charged per unit of gas set manually by the sequencer depending on congestion
func (*RollupOracle) SuggestOverhead ¶
SuggestOverhead returns the cached overhead value from the OVM_GasPriceOracle
func (*RollupOracle) SuggestScalar ¶
SuggestScalar returns the cached scalar value