I need to parse live Ethereum blockchain to retrieve all transactions that belongs to particular smart contract's address.

So my general question is how can I do it properly?

My thought about it so far:

  • Need to download blockchain on my local machine
  • Loop thought all blockchain block-by-block and filter transactions against smart contract address that I'm interested in.
  • Store retrieved information in JSON file.

As far I know, Ethereum blockchain format is LevelDb and I guess it's doable. Could please help me this my task and point to right direction?

  • When you say "live" chain, do you mean parsing the DB while it is updated with live blocks/transactions, i.e. by a running Ethereum client? If so, it might be easier to do the same thing through web3 RPC: personally I found it easily corrupts the db with such usage. Although admittedly, web3 is also a pain, as the information can't be retrieved in batch (always single block or transaction) Feb 8, 2018 at 11:00
  • Also see ethereum.stackexchange.com/questions/2184/… Feb 8, 2018 at 11:01
  • I needed the same and ended up using Etherscan.io's API, it's free and provides exactly what you want, although keep in mind the usage is limited.
    – Julien
    Feb 8, 2018 at 13:42


Your Answer

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