This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.NOTES
54 lines (37 loc) · 1.44 KB
/
.NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Docs: https://docs.subsquid.io/quickstart/quickstart-substrate/
https://docs.subsquid.io/tutorials/create-an-evm-processing-squid/
Template: https://github.com/subsquid/squid-frontier-evm-template.git
Examples: https://github.com/subsquid/squid-substrate-examples
Squid: https://github.com/subsquid/squid
# Run E2E
## Archive
- Start archive db (localhost:29387), ingest, gateway (http://localhost:8888) and explorer (http://localhost:4444/graphql):
make archive-up
## Processor
Prepare
=======
- Install dependencies
npm install
- Generate entities from schema.graphql (output in src/model/generated)
make codegen (npx squid-typeorm-codegen)
- Generate TypeScript metadata wrappers from typegen.json (output in src/types)
make typegen (npx squid-substrate-typegen typegen.json)
- Generate TypeScript EVM contract interfaces from ABI
npx squid-evm-typegen src/abi src/abi/ERC1155.json
- Build
make build (npm run build)
- Start subsquid db (localhost:23798)
make up
- Delete migration files, generate new one and apply
rm -rf db/migrations/*.js
make migration (npx squid-typeorm-migration generate)
make migrate (npx squid-typeorm-migration apply)
- Start processor
make process (node -r dotenv/config lib/processor.js)
- Start API gateway (http://localhost:4350/graphql)
make serve (npx squid-graphql-server --subscriptions --max-response-size 1000)
## Stop
- Stop archive db, ingest, gateway and explorer:
make archive-down
- Stop subsquid db:
make down