0

I installed eth go end rpc I use https://github.com/ethereum/wiki/wiki/JSON-RPC And https://github.com/btelle/ethereum-php I revised all the methods, but I did not understand how to get the list of transactions in my account or by wallet address

2 Answers2

0

To get all transaction from block mean its a kind of block explorer.

There many open source explorer available. You can get reference how one of many block explorer exploring the ethereum block.

https://github.com/etherparty/explorer/tree/master/app/scripts/controllers

Thank you.

Pranay
  • 69
  • 4
0

You cannot get all the transactions from (or to) an account directly, you have to go on every block and every transaction with eth_getTransactionByBlockNumberAndIndex (you can have a Block transaction count with eth_getBlockTransactionCountByNumber).

And you will have to manually look at every transaction and save the ones that are related to your user.

I recommend not doing this on a public RPC as it requires a massive amount of data transfer, best option would be to pre-process every block and sort all transactions in a database in order to make pertinent queries on specific users and recover the transactions faster.

Also you could have a look at current block explorer’s apis. They should have requests to make what you’re asking for.

mortimr
  • 111
  • 4