Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Oracle ¶ added in v1.6.0
type Oracle struct {
// contains filtered or unexported fields
}
Oracle recommends gas prices based on the content of recent blocks. Suitable for both light and full clients.
func NewOracle ¶ added in v1.6.0
func NewOracle(backend OracleBackend, params Config) *Oracle
NewOracle returns a new gasprice oracle which can recommend suitable gasprice for newly created transaction.
type OracleBackend ¶ added in v1.9.23
type OracleBackend interface { HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error) ChainConfig() *params.ChainConfig }
OracleBackend includes all necessary background APIs for oracle.
Click to show internal directories.
Click to hide internal directories.