Hello, this one is a bit long, so I made a few diagrams, basically, our use case is, we are deploying smart contracts for various artists, each contract is unique, but they have a common interface that allows them to be reusable on our platform, they also send common events.
We are going to deploy around 1-2 new contracts every week, and right now to manage to sync these events is a very manual task in Moralis, and is not very scaleable, I suggest small improvements that may allow the automation of some parts and an easier scaling of others,
This is the current situation:
- we have multiple contracts with the same event - same signature, same ABI.
- to sync them with Moralis we need to manually make a sync on the dashboard - it would be nice to expose an API for this? then we can automate the creation of this syncing.
- Each sync event needs its own table, this is not easily scalable and we will start losing track when we have hundreds of tables, can we make all the sync events just go to the same table? since they come from different contract addresses it shouldn’t be an issue to identify them.
- since we need a new table for each event right now, that means we also need a new webhook for each of them, but outside of Moralis we only have a single service with a single endpoint to consume all of these webhooks.
This leads to a lot of manual work, the diagram for managing these looks something like this:
I suggest some changes, all that needs to be done to make this more scalable, is to:
- expose the API you use to create new sync events
2.A. allow syncing events from multiple contracts to the same table
2.B. if A is too complicated because of the data structure, how about exposing an API to register webhooks programmatically?
- By “exposing an API”, I mean, you already have an API, it just requires a token that we get by logging in, I’d imagine using something like the MasterKey instead.