-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash #28084
Conversation
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
@MariusVanDerWijden Mind hitting merge for me? :) |
We've discussed this last week. Should be ok, but it creates a strange asymmetric API. Would be nice to add the "AtHash" methods for everything (code, balance, nonce, etc). |
@karalabe Added |
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
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.
SGTM!
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…t a specific block hash (ethereum#28084)" This reverts commit 9f7f4a7.
…t a specific block hash (ethereum#28084)" This reverts commit 9f7f4a7.
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
…ific block hash (ethereum#28084) * api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash. * ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
Adds
BlockHash
toCallOpts
so contract bindings can be used to call contracts at a specific block hash. Previously only block number or pending was supported.Backwards compatibility is preserved by introducing a new
BlockHashContractCaller
interface with theCallContractAtHash
andCodeAtHash
methods required from the backend, following a similar pattern toPendingContractCaller
. Simulated backend is updated to support the new methods andCodeAtHash
has been added toethclient.Client
- it already supportedCallContractAtHash
.Fixes #28017