Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface {
GasUpdaterBlockHistorySize() uint16
GasUpdaterBlockDelay() uint16
GasUpdaterTransactionPercentile() uint16
GasUpdaterBatchSize() uint32
EthMaxGasPriceWei() *big.Int
EthFinalityDepth() uint
SetEthGasPriceDefault(value *big.Int) error
}
Config defines the interface for the supplied config
type GasUpdater ¶
type GasUpdater interface {
store.HeadTrackable
Start() error
Close() error
}
GasUpdater listens for new heads and updates the base gas price dynamically based on the configured percentile of gas prices in that block
func NewGasUpdater ¶
func NewGasUpdater(ethClient eth.Client, config Config) GasUpdater
NewGasUpdater returns a new gas updater.
Click to show internal directories.
Click to hide internal directories.