Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Oracle ¶
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 ¶
func NewOracle(backend OracleBackend, params Config) *Oracle
NewOracle returns a new gasprice oracle which can recommend suitable gasprice for newly created transaction.
type OracleBackend ¶
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.