-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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: allow to specify signer on transactOpts #21356
Conversation
Wondering if we should use a What are your thoughts? I'm open to alternatives, just looking at it from an API perspective. Also this PR would break all existing code relying on abigen generated contracts :P |
Yeah I think that might be a better interface, we don't really want to encourage homestead signers anymore, right? |
The more docs the better :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, but I'm not really well versed in that whole abi/bind thingy, I've never used it and am not the best person to give a thumbs-up :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order not to break contracts right off the bat, It should be possible to keep the legacy system and display a deprecation warning when the function is used, and offer the new API with a slightly different name. Leave it like that for a few releases and then remove it.
Hmm I restored the old functions now, I'm not a huge fan, but at least I'll get a purely red pr in some months |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
08baedd
to
ed7218f
Compare
cc @fjl |
…thereum#21545) This allows users to estimate gas on top of arbitrary blocks as well as pending and latest. Tracing on pending is useful for most users as it takes into account the current txpool while tracing on latest might be useful for users that have little to know knowledge of the current transactions in the network. If blockNrOrHash is not specified, estimateGas defaults to pending
This commit enables users to specify which signer they want to use while creating their transactOpts. Previously all contract interactions used the homestead signer. Now a user can specify whether they want to sign with homestead or EIP155 and specify the chainID which adds another layer of security.
ff36fd8
to
e61c432
Compare
cc @fjl |
This commit enables users to specify which signer they want to use while creating their transactOpts.
Previously all contract interactions used the homestead signer. Now a user can specify whether they
want to sign with homestead or EIP155 and specify the chainID which adds another layer of security.
closes #16484
This PR changes the interface of New{}Transactor, so it is a breaking change for everyone who uses the bind package to create their signer.