I am trying to get the numbers of transactions in a rinkeby testnet in the last block
I wrote the following code
var Web3 = require('web3'); const Project_ID_Infura = 'write your own Infura ID'; const apiKey = 'https://rinkeby.infura.io/v3/' + Project_ID_Infura; const web3 = new Web3(new Web3.providers.HttpProvider(apiKey)); var block = web3.eth.getBlock('latest'); console.log(Object.values(block));
Where as you can see it is empty! I want to get the transaction field of this
block. How may I do so?