oracle

package
v0.0.0-...-4611198 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 21 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 struct {

	// Metrics config
	MetricsEnabled          bool
	MetricsHTTP             string
	MetricsPort             int
	MetricsEnableInfluxDB   bool
	MetricsInfluxDBEndpoint string
	MetricsInfluxDBDatabase string
	MetricsInfluxDBUsername string
	MetricsInfluxDBPassword string
	// contains filtered or unexported fields
}

Config represents the configuration options for the gas oracle

func NewConfig

func NewConfig(ctx *cli.Context) *Config

NewConfig creates a new Config

type DeployContractBackend

type DeployContractBackend interface {
	bind.DeployBackend
	bind.ContractBackend
}

DeployContractBackend represents the union of the DeployBackend and the ContractBackend

type GasPriceOracle

type GasPriceOracle struct {
	// contains filtered or unexported fields
}

GasPriceOracle manages a hot key that can update the L2 Gas Price

func NewGasPriceOracle

func NewGasPriceOracle(cfg *Config) (*GasPriceOracle, error)

NewGasPriceOracle creates a new GasPriceOracle based on a Config

func (*GasPriceOracle) BaseFeeLoop

func (g *GasPriceOracle) BaseFeeLoop()

func (*GasPriceOracle) Loop

func (g *GasPriceOracle) Loop()

Loop is the main logic of the gas-oracle

func (*GasPriceOracle) Start

func (g *GasPriceOracle) Start() error

Start runs the GasPriceOracle

func (*GasPriceOracle) Stop

func (g *GasPriceOracle) Stop()

func (*GasPriceOracle) Update

func (g *GasPriceOracle) Update() error

Update will update the gas price

func (*GasPriceOracle) Wait

func (g *GasPriceOracle) Wait()

Jump to

Keyboard shortcuts

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