vikiival / mimick

Indexer for ink! based NFTs
GNU General Public License v3.0
1 stars 3 forks source link

Squid Questions #6

Open vikiival opened 1 year ago

vikiival commented 1 year ago

As soon as, I would love to have MVP. However, some things are slowing me down.

1. Architecture choice

a. Time Warp

The ideal solution we have described with @Maar-io is that we have marketplace contract that should emit Register(collection: Account32, medatada: BoundedVec<u8>)

When this event is registered by the SubSquid indexer it should spawn a new SubIndexer that would fetch this (PSP34) contract.

However, as I mentioned in #3. The only indexer I have seen is from Talisman, and the architecture suffers a lot.

b. Factory

The second possible solution is to abandon any smart contracts outside the Marketplace Factory contract.

However, this has a few issues:

Quick :adhesive_bandage: : skip using the batch processor. (Faster to implement/ slower for indexing)

Still missing filter, as said in #4

c. Dima's dirty hacking

As I already spoke with @dzhelezov (15 Dec 2022 at 17:27:28), he suggested:

I'd rather do the following.

1) make a separate job/squid that outputs a list of contracts to track 2) once a day start a new squid which indexes this contracts from scratch 3) once done, switch the endpoint

That means

I suggest a cron job that does sqd deploy , sqd prod and sqd kill

so once a day: a json with contracts is generated. A new squid is deployed, it indexes only the contracts in the JSON (it is read on init)

when it's in sync, the old squid is killed, and the alias is switched to the new one

This solution can break in three parts: