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 gzliudan committed Jan 10, 2025
1 parent e8a4714 commit 1859736
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 @@ -36,6 +36,8 @@ var (
errNoEventSignature = errors.New("no event signature")
)

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 @@ -258,7 +260,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 1859736

Please sign in to comment.