I want to replay all events on a bsc 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?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI want to replay all events on a bsc 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?
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
.
subscribe('logs')
but even though you can specificfromBlock: 0
it only starts from the block it is actually syncing