I am building a system that monitors ERC20 token deposits to a large number of ethereum addresses (1-4 million). While I have not tried, I do not think that the parity clients would be able to support such a large amount of filters. I intend to build a customised data structure in order to achieve this task. Therefore, I would like to acquire the logs of all transactions in a block. Is there a way to do so?

This question is related to How to programmatically detect and accept ETH and ERC20 deposits

However, answers to the above post have not adequately addressed my concern about scalability.

What I have tried:

I am currently scanning the whole block for transaction hashes and then using eth_getTransactionReceipt to acquire the logs for each transaction. The pseudocode is as follows:

for block in all blocks:
  all_tx = get_all_txs(block);
  for tx in all_tx:

I am wondering if there is a better way to retrieve the logs, perhaps retrieving all logs at once?


See eth_getLogs: https://github.com/paritytech/parity/wiki/JSONRPC-eth-module#eth_getlogs

There you have possibility to filter only logs from ERC20 using topics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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