From 700cb3c642b284255dba5433d3507d123ced3551 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 28 May 2024 11:22:34 +0800 Subject: [PATCH] accounts/abi/bind: fix gas price suggestion with pre EIP-1559 clients (#23102) --- accounts/abi/bind/base.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go index 3580317e86f9..480aa596a4d7 100644 --- a/accounts/abi/bind/base.go +++ b/accounts/abi/bind/base.go @@ -238,13 +238,10 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i return nil, errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet") } if opts.GasPrice == nil { - price, err := c.transactor.SuggestGasTipCap(opts.Context) + price, err := c.transactor.SuggestGasPrice(ensureContext(opts.Context)) if err != nil { return nil, err } - if head.BaseFee != nil { - price.Add(price, head.BaseFee) - } opts.GasPrice = price } }