1

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?

Erik
  • 305
  • 5
  • 11
  • 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) – Linmao Song Feb 08 '18 at 11:00
  • Also see https://ethereum.stackexchange.com/questions/2184/exploring-and-analyzing-the-ethereum-blockchain – Linmao Song Feb 08 '18 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 08 '18 at 13:42

0 Answers0