Indexing Events

Ethers

This project uses ethers to grab deposit and withdraw event data. Without it, withdraw processing wouldn't be possible. To regenerate the latest tree and get the latest root for depositors to use during their withdraw, we are required to get all the past commitment leaves from the Deposit events, so we can recreate the tree.

Only once every deposit leaf is fetched, can a valid PLONK proof be generated and used to successfully withdraw.

Envio

This project was initially built using Envio as the Blockchain indexer to fetch Deposit and Withdraw event data. I found Ethers to then be far simpler and better for the requirements of this protocol, and simply kept the Envio indexer code as an emergency backup.

Last updated