Sorry for the newbie question here, but I have been banging my head against the wall all day and not finding any answers…
I have a static webpage that currently gets a contracts past event logs via metamask. I am trying to modify the dapp to allow users without metamask as a web3 provider. I want to use infura. Question… can do this, aka can I get eventLogs using infura running everything on a static site.
If so can you point me to an example.
Thanks in advance.
Hi @Ted welcome to the Infura community!
You’ve come to the right place, a lot of our users are utilizing Infura for this. Here’s some resources to get you started,
For getting logs you can do this two ways,
In order to use these you just call Infura directly in your application using either a library that allows you to create websocket connections/subscriptions or a library that allows you to send http requests. In Python, you can use https://websockets.readthedocs.io/en/stable/ to create websocket connections and https://2.python-requests.org/en/master/ to create http requests.