-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
web3.eth.getBlockTransactionCount do not return any response #2369
Comments
Testing with const Web3 = require('web3');
const web3 = new Web3('https://ropsten.infura.io/metamask');
web3.eth.getBlockNumber().then(async (block) => {
const txCount = await web3.eth.getBlockTransactionCount(block);
/* ^^^ throws ^^^ */
console.log(txCount);
}); I believe these two are the guilty lines. Unless I'm missing something, these should instead call |
Thanks. Is there any work around on getting the block transaction count? |
You could try to get all the transactions and count, use ethers.js, do a direct request to the nodes, or modify your local web3 package. Otherwise, wait for the fix 😿. |
Thanks for submitting this issue. I‘ll test and fix it asap (I just destroyed my macbook with mouth rinse hopefully I can repair it today or I have to buy a new one asap) |
All issues which aren't created with this template will get immediately closed.
Expected behavior
web3.eth.getBlockTransactionCount will return the total transaction count for the block
Actual behavior
Error return from nodejs and do not receive any total transaction count from the web3.
Steps to reproduce the behavior
Error Logs
Error: Node error: {"code":-32602,"message":"missing value for required argument 1"} at Function.validate (C:\xampp\htdocs\xcoin-btc\node_modules\web3-providers\dist\web3-providers.cjs.js:349:18) at C:\xampp\htdocs\xcoin-btc\node_modules\web3-providers\dist\web3-providers.cjs.js:462:57 at process._tickCallback (internal/process/next_tick.js:68:7) (node:13152) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Versions
web3 ^1.0.0-beta.46
node v10.15.0
ropsten testnet
The text was updated successfully, but these errors were encountered: