I’m trying to get details of all the transactions for an entire block. The details I need are:
sending address
receiving address
transaction amount
transaction hash
The way I am currently doing it is:
eth_getBlockByNumber: This gives me an array of the transactions, but only the hash of each transaction.
eth_getTransactionByHash: Call this for each transaction in the block.
If the block has 100 transactions, I am making 101 calls, which seems very inefficient and often leads me to hit rate limits. Is there a more efficient way of doing this?
Hi @mike - One other field I require is status of the transaction. I need to know if this transaction was successful or a failure. Is there any way to get that information from the Transaction object? Or must I do a " eth_getTransactionReceipt" call for each transaction?
Correct you need to check the transaction receipt for the transaction to determine if it succeeded or failed. The transaction object is merely the input.