1

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.

1
  • Basic check... Have you made transactions on the rpc? Are you retrieving data from the blocks that contain your transactions? Commented Jun 12, 2021 at 15:27

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.