This quest is to migrate the Snapshot Subgraph to Squid SDK. The resulting squid should match the GraphQL API of the subgraph as close as possible, by migrating schema.graphql
. The judges reserve the right to request improvements afther the initial review of the submission. Reach out to the Discord Channel for any tech questions regarding this quest.
Category | Skill Level | Time required (hours) | Max Participants | Reward | Status |
---|---|---|---|---|---|
Squid Deployment | ~40 | 5 | open |
Each quest should be submitted as a private repo and will be reviewed manually. To submit, create an issue with url to your repo and invite the following github accounts: @dariaag, @belopash, @abernatskiy and @dzhelezov. The repo should contain README.MD
with
- Insturctions how to run the squid locally
- Sample Squid queries and the corresponding Subgraph queries
The code should be well documented. The judges will access:
- In-line commends where necessary
- Clarity of the code
- Performance and optimization (if batching and Multicall queries are used whenever appropriate)
-
Install Node v16.x or newer https://nodejs.org/en/download
-
Install Docker https://docs.docker.com/engine/install/
-
Install git https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
-
Install Squid CLI
npm i -g @subsquid/cli@latest
- Install dependecies:
npm ci
- Generate model
sqd codegen
- Generate types
sqd typegen
- Open docker and run:
sqd up
- Generate migrations:
sqd migration:generate
- Start processing:
sqd process
- Docker not installed
X db Error × query-gateway Error
Error response from daemon: Get "https://registry-1.docker.jo/v2/": uri ting to 127.0.0.1:8888: dial cp 127.0.0.1:8888: connectex: No connection
- Git not installed
Error: Error: spawn git ENOENT
at ChildProcess._handle.onexit (node: internal/child_process: 284:19)
at onErrorNT (node: internal/child_process:477:16)
at process.processTicksAndRejections (node: internal/process/task_queues:82:21)
- Dependencies not installed. Run
npm ci
sqd typegen
TYPEGEN
Error: spawn squid-evm-typegen ENOENT
Code: ENOENT
- Rate-limiting. Change the
rpcUrl
inprocessor.ts
will pause new requests for 20000ms {"rpcUrl":"https://rpc.ankr.com/eth",
"reason" : "HttpError: got 429 from https://rpc.ankr.com/eth"}