From 16b781bc6010112e0ea0c64efd0c6383a4e32c6c Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 31 May 2024 10:39:30 +0800 Subject: [PATCH] accounts/abi/bin/backends: return basefee in suggestGasPrice's (#23838) --- accounts/abi/bind/backends/simulated.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index bc7ab34e33ac..236d3210f986 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -313,9 +313,9 @@ func (b *SimulatedBackend) PendingNonceAt(ctx context.Context, account common.Ad } // SuggestGasPrice implements ContractTransactor.SuggestGasPrice. Since the simulated -// chain doens't have miners, we just return a gas price of 1 for any call. +// chain doesn't have miners, we just return a gas price of 1 for any call. func (b *SimulatedBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error) { - return big.NewInt(1), nil + return b.pendingBlock.Header().BaseFee, nil } // SuggestGasTipCap implements ContractTransactor.SuggestGasTipCap. Since the simulated