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 <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
  • Loading branch information
3 people authored and jagdeep sidhu committed Aug 26, 2022
1 parent ebbb487 commit 435ac0b
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 435ac0b

Please sign in to comment.