Skip to content

Commit

Permalink
accounts/abi/bind: add const for tx fee elasticity multiplier (#25504)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
  • Loading branch information
3 people authored Aug 25, 2022
1 parent 70e1e65 commit f03c37b
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 f03c37b

Please sign in to comment.