Open gitloverr opened 3 years ago
The eth_subscribe
method is not supported yet. Here are the methods that are currently supported:
https://github.com/thetatoken/theta-eth-rpc-adaptor#rpc-apis
For now, one workaround is to call eth_blockNumber
every 6 seconds (the block interval is roughly 6 seconds), and then call eth_getBlockByNumber
to get the details of the newly added block(s).
hi everyone,
Is there any way I can listen to the last block header or block number over websocket? I couldn't find anything in your supported methods?
I tried this:
{"id": 1, "method": "eth_subscribe", "params": ["newHeads", {}]}
but I got this error:
{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"no \"newHeads\" subscription in eth namespace"}}
what should I do?
thank you