From 1859736f8e0a1683cb2dc3a17ddb0331314ee25c Mon Sep 17 00:00:00 2001 From: xinbenlv Date: Thu, 25 Aug 2022 04:59:50 -0400 Subject: [PATCH] accounts/abi/bind: add const for tx fee elasticity multiplier (#25504) Co-authored-by: Felix Lange Co-authored-by: rjl493456442 --- accounts/abi/bind/base.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go index 5c63a66aadf1e..bdc479537d9b7 100644 --- a/accounts/abi/bind/base.go +++ b/accounts/abi/bind/base.go @@ -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) @@ -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 {