Skip to content

Commit

Permalink
accounts/abi/bind: fix gas price suggestion with pre EIP-1559 clients (
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Sep 9, 2024
1 parent 2c571a6 commit fe23589
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit fe23589

Please sign in to comment.