gasupdater

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: MIT Imports: 16 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL