-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
accounts/abi/bind: refactor transact method #23719
Merged
Merged
+217
−81
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fjl
reviewed
Oct 12, 2021
fjl
changed the title
accounts/abi/bind: Refactor transact method
accounts/abi/bind: refactor transact method
Oct 12, 2021
This was referenced Oct 13, 2021
sidhujag
pushed a commit
to syscoin/go-ethereum
that referenced
this pull request
Oct 14, 2021
This fixes a bug where gas-related fields of the TransactOpts passed to transaction methods would be modified, skipping gas estimation for subsequent transactions. Co-authored-by: Yondon Fu <yondon.fu@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com>
tynes
added a commit
to ethereum-optimism/optimism
that referenced
this pull request
Oct 19, 2021
Bumps the go-ethereum dep to release v1.10.10 which fixes a bug with the transact opts where it is mutated and can cause gas estimation errors. See ethereum/go-ethereum#23719
smartcontracts
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Nov 10, 2021
Bumps the go-ethereum dep to release v1.10.10 which fixes a bug with the transact opts where it is mutated and can cause gas estimation errors. See ethereum/go-ethereum#23719
yongjun925
pushed a commit
to DODOEX/go-ethereum
that referenced
this pull request
Dec 3, 2022
This fixes a bug where gas-related fields of the TransactOpts passed to transaction methods would be modified, skipping gas estimation for subsequent transactions. Co-authored-by: Yondon Fu <yondon.fu@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com>
19 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 2, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 6, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 9, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 9, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 9, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 10, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 12, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 12, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 19, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 19, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 19, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 21, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 22, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 22, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 23, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 23, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 26, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 26, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 27, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 9, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 17, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 18, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 25, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 25, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 29, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 30, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 31, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 31, 2024
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Nov 1, 2024
wanwiset25
pushed a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the transact method making it easier to read and easier to reason about.
This however results in ~ 40 lines more compared to the original method.
I would still argue that it's a valid refactor as it clearly discriminates between Dynamic and Legacy transactions.
It fixes an issue where executing a transaction would overwrite the
transactOpts
, and adds a test for it.Previously the
gasEstimation
would populate thefeeCap/tipCap
fields which would mean that if a second transaction would be send with the sametransactionOpts
, the gas estimation would not be executed anymore.It also changes the code s.th.
transact
only queries the blockchain ifgasPrice
is not specified.If
gasPrice
is set, we just construct a legacy transaction. If not we query the head if basefee is already set.supersedes #23663
supersedes #23587
closes #23586