We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Based on the doc, eth_subscribe should take 0 or 1 argument.
Connected (press CTRL+C to quit) > {"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]} < {"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"wrong param count (method 'eth_subscribe'): 1 != 2"}}
Connected (press CTRL+C to quit) > {"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads", null]} < {"jsonrpc":"2.0","result":1,"id":1}
const Web3 = require('web3'); const host = '<RPC_endpoint'>; const web3 = new Web3('ws://' + host + '/rpc/v0') const subscription = web3.eth.subscribe('newBlockHeaders', function(error, result){ console.log(error, result); }); setInterval(() => {}, 1 << 30);
Returned error: Error: Returned error: wrong param count (method 'eth_subscribe'): 1 != 2
Error: Returned error: wrong param count (method 'eth_subscribe'): 1 != 2
The text was updated successfully, but these errors were encountered:
eth_subscribe
No branches or pull requests
Based on the doc, eth_subscribe should take 0 or 1 argument.
Code to reproduce
Reproduce with wscat
Reproduce with web3.js
Returned error:
Error: Returned error: wrong param count (method 'eth_subscribe'): 1 != 2
The text was updated successfully, but these errors were encountered: