From f016bff49330b97347674d60c1d2372a5a4a353d Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Tue, 9 Jan 2024 14:25:13 +0100 Subject: [PATCH] ethclient/simulated: split gasTipCap and feeHistory interfaces --- ethclient/simulated/backend.go | 3 ++- interfaces.go | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ethclient/simulated/backend.go b/ethclient/simulated/backend.go index aeec973647..170004c36c 100644 --- a/ethclient/simulated/backend.go +++ b/ethclient/simulated/backend.go @@ -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 diff --git a/interfaces.go b/interfaces.go index 59ee47e010..0cc402ffd0 100644 --- a/interfaces.go +++ b/interfaces.go @@ -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) }