I'm trying to use log events to show the transactions from newest to oldest. The problem is that line like this

contractHandle.allEvents({ fromBlock: startingBlock, toBlock: 'latest' })

retrieves events from oldest to newest. I would like to present reports showing newest entries at the top. For small amount of entries this is not a problem, but if you want to allow paging through the results, this presents a problem, because each time you would have to go through all of the events to just show one page of results. Any ideas how to do this better?

1 Answer 1


Retrieve the historical list of events once, store them in a regular Web 2.0 database, update that database as new event appear, and then accomplish the paging/scrolling task exactly as you would have in Web 2.0 days.

Your Answer

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

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