We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See #2462 (comment)
The text was updated successfully, but these errors were encountered:
To add a gas price multiplier to the SubmitTransaction method in submitter.go, follow these steps:
SubmitTransaction
submitter.go
Locate setGasPrice Method: Open ethergo/submitter/submitter.go and find the setGasPrice method.
setGasPrice
ethergo/submitter/submitter.go
Add Multiplier Parameter: Modify the setGasPrice method to accept a multiplier parameter.
func (t *txSubmitterImpl) setGasPrice(ctx context.Context, client client.EVM, transactor *bind.TransactOpts, bigChainID *big.Int, prevTx *types.Transaction, multiplier float64) (err error) {
transactor.GasPrice = gas.BumpByPercent(core.CopyBigInt(prevTx.GasPrice()), bumpPct) transactor.GasPrice = new(big.Int).Mul(transactor.GasPrice, big.NewInt(int64(multiplier * 100))) transactor.GasPrice = new(big.Int).Div(transactor.GasPrice, big.NewInt(100))
err = t.setGasPrice(ctx, chainClient, transactor, chainID, nil, 1.2) // Example multiplier of 1.2
This will apply the gas price multiplier to the transaction submission process.
/ethergo/submitter/submitter.go /ethergo/submitter/README.md
Ask Greptile
Sorry, something went wrong.
No branches or pull requests
See #2462 (comment)
The text was updated successfully, but these errors were encountered: