backend

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package backend contains the common oracle backend for gas estimators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OracleBackendChain

type OracleBackendChain interface {
	// ChainConfig gets the chain config
	ChainConfig() *params.ChainConfig
	BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
	BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
	// SuggestGasPrice retrieves the currently suggested gas price to allow a timely
	// execution of a transaction. This is only used for non-determinstic pricing
	SuggestGasPrice(ctx context.Context) (*big.Int, error)

	// SuggestGasTipCap retrieves the currently suggested 1559 priority fee to allow
	// a timely execution of a transaction. This is only used for non-deterministic pricing.
	SuggestGasTipCap(ctx context.Context) (*big.Int, error)
}

OracleBackendChain is the backend for an oracle. It wraps this backend so it can be used by OracleBackend.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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