-
Notifications
You must be signed in to change notification settings - Fork 62
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
web.eth.Contract support? #92
Comments
The docs you were referring to is to our Rest endpoints. But yes, we do support that function in our websocket endpoints. We are in the process of making our docs better and that will be released soon. To my knowledge and please let me know if im wrong, but in Web3, the getPastEvents is just a wrapper around the |
For Web3 1.0 docs, I'd just look at the official Web3 docs for that. |
Thanks for the quick reply. You're right, I took a look at the web3.js source code and it's just a wrapper on To be clear, I'm not connecting to the websocket endpoint, just the HTTPS RPC endpoint sent in the original registration email. The only reference I found of the websocket endpoints was in #29 and not in any official documentation. Do you recommending connecting via websocket instead of RPC? If so, do you mind describing why and what the advantages are? |
Ah. I'm not sure why I thought you were using the websocket endpoints haha. |
The downside is that it is still in "experiemental" or beta mode right now and therefore there may be bugs. |
No worries. Thanks for the info Eric! |
The documentation isn't clear to me so I this seemed like the next best place to look for an answer--please redirect me if there's a better place for me to ask.
We're using the web3.js 1.0 beta and creating a web3.eth.Contract object locally to interact with our contract.
I checked the /v1/jsonrpc/network/methods endpoint to see if
getPastEvents
is supported but it's currently not listed. However, I'm able to point to the Infura RPC endpoint and callgetPastEvents
just fine. My question is this: is this officially supported? Is there documentation that describes the web3.js 1.0 supported functions?Here's a snippet of code. Currently we poll every 15s looking at (blockHeight - 12) to see if any events in our contract were in the block:
The text was updated successfully, but these errors were encountered: