I would like to grab the list of txHashes in the current block or the previous block. I would like to grab this from a json-rpc api. Is this possible? All I found was grabbing info about the block not the actual content.
Thank you.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI would like to grab the list of txHashes in the current block or the previous block. I would like to grab this from a json-rpc api. Is this possible? All I found was grabbing info about the block not the actual content.
Thank you.
https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#getblock
if you pass false for second parameter the returned object has a transactions
property which contains all transaction hashes