I was reading through the documentation and i could not for my life find the method to call for the history of transactions for addresses, I see that we have count but we do not have the history
I would like to find transactions for arbitrum, i couldn’t find the method to call for transactions for specific addresses
Hey kah_shun_loh,
To fetch the history of transactions, you can use the following approach:
- Fetching the Latest Block Number: Use the
eth_getBlockNumber
method. This gives you the most recent block number, and from there, you can backtrack to scan previous blocks for transactions. - Iterating Over Blocks for Transactions: For each block, utilize the
eth_getBlockByNumber
method. This provides the details of a block. If your focus is on transactions involving a specific address, sift through the transactions in that block and look for thefrom
andto
fields. By matching these to the desired address, you can filter out the relevant transactions.
-Nick