From e8d658b186f5fb46cff3743b288319c15d2523fa Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 5 Dec 2023 18:33:13 +0100 Subject: [PATCH] ethereum: add interfaces for missing methods --- interfaces.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/interfaces.go b/interfaces.go index c4948191d1..59ee47e010 100644 --- a/interfaces.go +++ b/interfaces.go @@ -199,6 +199,12 @@ type GasPricer interface { SuggestGasPrice(ctx context.Context) (*big.Int, error) } +// GasPricer1559 provides access to the EIP-1559 gas price oracle. +type GasPricer1559 interface { + SuggestGasTipCap(ctx context.Context) (*big.Int, error) + FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*FeeHistory, error) +} + // FeeHistory provides recent fee market data that consumers can use to determine // a reasonable maxPriorityFeePerGas value. type FeeHistory struct { @@ -239,3 +245,13 @@ type GasEstimator interface { type PendingStateEventer interface { SubscribePendingTransactions(ctx context.Context, ch chan<- *types.Transaction) (Subscription, error) } + +// BlockNumberReader provides access to the current block number. +type BlockNumberReader interface { + BlockNumber(ctx context.Context) (uint64, error) +} + +// ChainIDReader provides access to the chain ID. +type ChainIDReader interface { + ChainID(ctx context.Context) (*big.Int, error) +}