-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Block identifier parameter in Contract.call #446
Comments
Yes, this should be added (and should be relatively easy to implement) |
Interesting that this API is not defined in the web3js v1 docs yet: https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#methods-mymethod-call Should it be an extra parameter to
|
I'd say extra optional parameter. |
Hey guys...would love to go ahead on this one now...couple things.
|
|
Cool sounds good, I'll get to work! |
hello,I get the web3 of vision4.2.1,but i cannot call my contract method at a block number,such as "detail = info.functions.getInfo().call(block_identifier=3)",I always get the "latest" block's info.Could tell me what's the reason of my problem? |
Hi @mtcz91 that looks right. There's not enough info to help you debug. This issue was left open by mistake, it is only tracking the main feature being added. I'm closing it now. Can you open a new issue with a minimal, complete, and verifiable example: https://stackoverflow.com/help/mcve ? Specifically, the contract source, the contract deployment, any transactions, and the call. |
What was wrong?
I'm trying to query a contract state 6 block ago. Unlike web3.js api in Contract.call I can't specify block identifier to run this call against.
What is a correct way of doing this in web3py?
Am I correct in my understanding that as a workaround I can temporarily set
Eth.defaultBlock
to desired number and I won't run into any internal web3py thread/green thread concurrency issues?How can it be fixed?
I'm feature-requesting addition of block identifier parameter in Contract.call in accord with web3.js api.
The text was updated successfully, but these errors were encountered: