-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Stateless contract log fetcher (for Infura) #1177
Comments
I can get onboard with this. Implementation looks reasonable with potential exceptions related to As for the parameters you should be able to infer them from the other filter creation APIs. Allowing Allowing In general 👍 |
Ok, let me work with a draft implementation and open it as work-in-progress PR. Any sample tests you would recommend to duplicate against this implementation? |
Worth mentioning web3.py provides a stateless log api with the optional It uses getLogs to mimic the node filter api. |
@dylanjw I did not know it existed. I was scratching my head why a relative simple use case is overlooked. It is a minor addition to Contract API and that is where people will look for it, so I'll put it there with the reference to the middleware. The middleware solution may cater some use cases better. |
As an aside, I seem to recall that Infura does allow you to create/query stateful filters if you use the websocket provider. |
Looks like this was merged long ago. Closing! |
What was wrong?
createFilter
method that requires a stateful node (eth_createFilter
API).How can it be fixed?
I have sketched a
web3.contract.ContractEvent
function that is compatible with Infura and other stateless nodes. It is copy-paste job fromcreateFilter
I need guidance on
What are the input parameters
createFilter
uses, so I can properly document them out (argument_files, address, topics)If there is any conflicting work or feedback on the implementation
After this happy to open a PR.
The text was updated successfully, but these errors were encountered: