gas_station

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ComponentName = "gasPriceGasStation"

Variables

This section is empty.

Functions

This section is empty.

Types

type GasStation

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

func New

func New(ctx context.Context, logger log.Logger, client *ethclient.Client, netID int64) (*GasStation, error)

func (*GasStation) Name added in v0.2.0

func (self *GasStation) Name() string

func (*GasStation) Query

func (self *GasStation) Query(ctx context.Context, confidence int) (baseFeeGwei, tipFeeGwei float64, err error)

Query implements the gas query interface. For now gas station doesn't have 1559 api so just returning the client suggested values.

type GasStationModel

type GasStationModel struct {
	Fast    float32 `json:"fast"`
	Fastest float32 `json:"fastest"`
	Average float32 `json:"average"`
}

GasStation is what ETHGasStation returns from queries. Not all fields are filled in.

Jump to

Keyboard shortcuts

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