A quest to migrate Lens subgraph to Subsquid
This is the squid implementation of the Lens subgraph (https://github.com/rtomas/lens-protocol-subgraph).
Please note that, the subgraph has only been synced upto 33.2 millionth block. So it is not possible to compare the data with the squid.
- Batch Processing is used.
- An
EntityCache
is used to store the entities in memory to improve performance. schema.graphql
was changed to represent Many to Many relationships.
- Please make sure to add the necessary DB config to
.env
file.
git clone https://github.com/secsec2025/lens-subgraph-migration.git
cd lens-subgraph-migration
npm ci
sqd up
sqd process &
sqd serve
- The core structure stays same with the Subgraph.
Byte
fields have been changed toString
.AccountProfileFollow
andProfileProfileFollow
entities were added to represent Many to Many relationships. These entities will act as pivot tables.- Interface
Publication
was removed. - Entity
FollowProfile
was added to keep track ofFollow
andProfile
entities.
- Time to fully sync - More than 48 hours
- Add more sample queries.
queries.md