Skip to content
New issue

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

bind TransactOpts #25986

Closed
saman-pasha opened this issue Oct 13, 2022 · 1 comment
Closed

bind TransactOpts #25986

saman-pasha opened this issue Oct 13, 2022 · 1 comment

Comments

@saman-pasha
Copy link
Contributor

In accounts/abi/bind/base.go #374

	if opts.GasPrice != nil {
		rawTx, err = c.createLegacyTx(opts, contract, input)
	} else if opts.GasFeeCap != nil && opts.GasTipCap != nil {
		rawTx, err = c.createDynamicTx(opts, contract, input, nil)
	} else {
		// Only query for basefee if gasPrice not specified
		if head, errHead := c.transactor.HeaderByNumber(ensureContext(opts.Context), nil); errHead != nil {
			return nil, errHead
		} else if head.BaseFee != nil {
			rawTx, err = c.createDynamicTx(opts, contract, input, head)
		} else {
			// Chain is not London ready -> use legacy transaction
			rawTx, err = c.createLegacyTx(opts, contract, input)
		}
	}

I added another else if for when both GasFeeCap and GasTipCap are specified and no need to retrieve head

@holiman
Copy link
Contributor

holiman commented Oct 14, 2022

Cool. If you want up upstream this change, please open a pull request instead of filing a ticket. I'm going to go ahead and close this one, since there's not any actual bug that needs fixing.

@holiman holiman closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants