ethclient/simulated: split gasTipCap and feeHistory interfaces

This commit is contained in:
Marius van der Wijden 2024-01-09 14:25:13 +01:00
parent 6b29940218
commit f016bff493
2 changed files with 8 additions and 3 deletions

View file

@ -56,7 +56,8 @@ type Client interface {
ethereum.ContractCaller
ethereum.GasEstimator
ethereum.GasPricer
ethereum.GasPricer1559
ethereum.GasTipCapReader
ethereum.FeeHistoryReader
ethereum.LogFilterer
ethereum.PendingStateReader
ethereum.PendingContractCaller

View file

@ -199,9 +199,13 @@ type GasPricer interface {
SuggestGasPrice(ctx context.Context) (*big.Int, error)
}
// GasPricer1559 provides access to the EIP-1559 gas price oracle.
type GasPricer1559 interface {
// GasTipCapReader provides access to the EIP-1559 gas price oracle.
type GasTipCapReader interface {
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
}
// FeeHistoryReader provides access to the fee history oracle.
type FeeHistoryReader interface {
FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*FeeHistory, error)
}