Unverified Commit c2e64db3 authored by Marius van der Wijden's avatar Marius van der Wijden Committed by GitHub

accounts/abi/bind/backends: make suggestGasPrice compatible with non-1559 chains (#23840)

parent 1e4becb5
......@@ -462,7 +462,10 @@ func (b *SimulatedBackend) PendingNonceAt(ctx context.Context, account common.Ad
// SuggestGasPrice implements ContractTransactor.SuggestGasPrice. Since the simulated
// 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 b.pendingBlock.Header().BaseFee, nil
if b.pendingBlock.Header().BaseFee != nil {
return b.pendingBlock.Header().BaseFee, nil
}
return big.NewInt(1), nil
}
// SuggestGasTipCap implements ContractTransactor.SuggestGasTipCap. Since the simulated
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment