Skip to content

Commit

Permalink
accounts/abi/bind: add const for tx fee elasticity multiplier (ethere…
Browse files Browse the repository at this point in the history
…um#25504)


Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
  • Loading branch information
3 people authored and blakehhuynh committed Oct 3, 2022
1 parent b5bc4ba commit 9207fdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import (
"github.com/ethereum/go-ethereum/event"
)

const basefeeWiggleMultiplier = 2

// SignerFn is a signer function callback when a contract requires a method to
// sign the transaction before submission.
type SignerFn func(common.Address, *types.Transaction) (*types.Transaction, error)
Expand Down Expand Up @@ -254,7 +256,7 @@ func (c *BoundContract) createDynamicTx(opts *TransactOpts, contract *common.Add
if gasFeeCap == nil {
gasFeeCap = new(big.Int).Add(
gasTipCap,
new(big.Int).Mul(head.BaseFee, big.NewInt(2)),
new(big.Int).Mul(head.BaseFee, big.NewInt(basefeeWiggleMultiplier)),
)
}
if gasFeeCap.Cmp(gasTipCap) < 0 {
Expand Down

0 comments on commit 9207fdf

Please sign in to comment.