ethereum: add interfaces for missing methods

This commit is contained in:
Felix Lange 2023-12-05 18:33:13 +01:00 committed by Marius van der Wijden
parent c16d8a430b
commit e8d658b186

View file

@ -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)
}