Documentation ¶
Index ¶
- type Config
- type Oracle
- type RollupOracle
- func (gpo *RollupOracle) DASwitch() *big.Int
- func (gpo *RollupOracle) SCCAddress() common.Address
- func (gpo *RollupOracle) SetCharge(charge *big.Int) error
- func (gpo *RollupOracle) SetDAGasPrice(daGasPrice *big.Int) error
- func (gpo *RollupOracle) SetDASwitch(daSwitch *big.Int) error
- func (gpo *RollupOracle) SetIsBurning(isBurning *big.Int) error
- 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) SetSCCAddress(sccAddress common.Address) error
- func (gpo *RollupOracle) SetScalar(scalar *big.Int, decimals *big.Int) error
- func (gpo *RollupOracle) SuggestDAGasPrice(ctx context.Context) (*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) DASwitch ¶
func (gpo *RollupOracle) DASwitch() *big.Int
DASwitch returns the cached DASwitch value
func (*RollupOracle) SCCAddress ¶
func (gpo *RollupOracle) SCCAddress() common.Address
SCCAddress returns the cached SCCAddress value
func (*RollupOracle) SetCharge ¶
func (gpo *RollupOracle) SetCharge(charge *big.Int) error
SetCharge sets the charge value held in the BVM_GasPriceOracle
func (*RollupOracle) SetDAGasPrice ¶
func (gpo *RollupOracle) SetDAGasPrice(daGasPrice *big.Int) error
SetDAGasPrice returns the current DA gas price
func (*RollupOracle) SetDASwitch ¶
func (gpo *RollupOracle) SetDASwitch(daSwitch *big.Int) error
SetDASwitch sets the daSwitch value held in the BVM_GasPriceOracle
func (*RollupOracle) SetIsBurning ¶
func (gpo *RollupOracle) SetIsBurning(isBurning *big.Int) error
SetIsBurning sets the isBurning value held in the BVM_GasPriceOracle
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 BVM_GasPriceOracle
func (*RollupOracle) SetSCCAddress ¶
func (gpo *RollupOracle) SetSCCAddress(sccAddress common.Address) error
SetCharge sets the charge value held in the BVM_GasPriceOracle
func (*RollupOracle) SuggestDAGasPrice ¶
SuggestDAGasPrice returns the gas price which should be charged per byte of published data by the sequencer.
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 BVM_GasPriceOracle
func (*RollupOracle) SuggestScalar ¶
SuggestScalar returns the cached scalar value