3

I want to replay all events on a chain and index them.

If I understand correctly, the only way of doing this at the moment would be to call getBlock(0) and go from there, checking every transaction one by one.

Is that correct?

1
  • Did you ever find an answer to this? I also looked into subscribe('logs') but even though you can specific fromBlock: 0 it only starts from the block it is actually syncing
    – Geert-Jan
    Jun 2, 2021 at 20:23

1 Answer 1

0

I've measured latency / throughput of different methods, and found that the most efficient way to replay all the logs is using web3.eth.getPastLogs.

1

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.

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