Closed ryscheng closed 11 months ago
I'm using it fully client side here: https://github.com/bitbeckers/cookie-jar/tree/main/src/utils
You can see a lot of handlers and with hypercerts and the number of data points, we probably want to run a BE service somewhere that does the indexing.
We currently index for the following use cases:
@bitbeckers Could you help share your thoughts on the pros/cons of replacing any one of these with chainsauce? Is it worth using chainsauce for everything? Or should we be doing more stuff in the Graph?
Since OpenZeppelin monitors a event and executes a DB mutation for one specific event, that sounds like a good place to start. Also because there's the 120 request rate limit.
If that's the only use case that's worth shooting for at the moment, I'm inclined to defer this until there's a bigger pain that needs to be addressed. It's a pretty big refactor for relatively small benefit.
@ryscheng you're working with Dune now right? I'm taking my name of this ticket for a clean(er) board
What is it?
Chainsauce is an indexing solution that allows you to setup up custom event handlers client or server side.
On a server it would serve as an indexer and we can expose an API endpoint to query data.
Client side, it's possible to store state in -for example- a sqlite DB
I've had issues building it client side (because polyfills) so made a fork that's browser native.
Here are the packages:
OG Chainsauce: https://www.npmjs.com/package/chainsauce My fork: https://www.npmjs.com/package/chainsauce-web
For us, it might be interesting to set up an instance somewhere (like on railway) and expose an endpoint