Versions in this module Expand all Collapse all v0 v0.11.7 Jun 29, 2023 Changes in this version + const DefaultFeeHistoryCacheSize + const DefaultMaxBlockHistory + const DefaultMaxCallBlockHistory + var DefaultMaxLookbackSeconds = uint64(80) + var DefaultMaxPrice = big.NewInt(150 * params.GWei) + var DefaultMinBaseFee = big.NewInt(params.ApricotPhase3InitialBaseFee) + var DefaultMinGasUsed = big.NewInt(6_000_000) + var DefaultMinPrice = big.NewInt(0 * params.GWei) + type Config struct + Blocks int + MaxBlockHistory int + MaxCallBlockHistory int + MaxLookbackSeconds uint64 + MaxPrice *big.Int + MinGasUsed *big.Int + MinPrice *big.Int + Percentile int + type Oracle struct + func NewOracle(backend OracleBackend, config Config) (*Oracle, error) + func (oracle *Oracle) EstimateBaseFee(ctx context.Context) (*big.Int, error) + func (oracle *Oracle) FeeHistory(ctx context.Context, blocks int, unresolvedLastBlock rpc.BlockNumber, ...) (*big.Int, [][]*big.Int, []*big.Int, []float64, error) + func (oracle *Oracle) SuggestPrice(ctx context.Context) (*big.Int, error) + func (oracle *Oracle) SuggestTipCap(ctx context.Context) (*big.Int, error) + type OracleBackend interface + BlockByNumber func(ctx context.Context, number rpc.BlockNumber) (*types.Block, error) + ChainConfig func() *params.ChainConfig + GetReceipts func(ctx context.Context, hash common.Hash) (types.Receipts, error) + HeaderByNumber func(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) + LastAcceptedBlock func() *types.Block + MinRequiredTip func(ctx context.Context, header *types.Header) (*big.Int, error) + SubscribeChainAcceptedEvent func(ch chan<- core.ChainEvent) event.Subscription + SubscribeChainHeadEvent func(ch chan<- core.ChainHeadEvent) event.Subscription v0.11.7-rc.0 Jun 29, 2023