extract gas tip cap const

This commit is contained in:
Felipe Andrade 2023-12-12 17:40:45 -08:00
parent ab7b570df0
commit 08d64c9c3f

@ -212,8 +212,12 @@ func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEt
"err", err)
return nil, nil, err
}
gasTipCap = new(big.Int).Mul(gasTipCap, big.NewInt(110))
gasTipCap = new(big.Int).Div(gasTipCap, big.NewInt(100))
// adjust gas tip cap by 110%
const GasTipCapAdjustmentMultiplier = 110
const GasTipCapAdjustmentDivisor = 100
gasTipCap = new(big.Int).Mul(gasTipCap, big.NewInt(GasTipCapAdjustmentMultiplier))
gasTipCap = new(big.Int).Div(gasTipCap, big.NewInt(GasTipCapAdjustmentDivisor))
head, err := client.HeaderByNumber(ctx, nil)
if err != nil {