forked from quest-chains/subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubgraph.template.yaml
More file actions
249 lines (249 loc) · 7.2 KB
/
subgraph.template.yaml
File metadata and controls
249 lines (249 loc) · 7.2 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
specVersion: 0.0.4
description: dAcademy
features:
- ipfsOnEthereumContracts
- nonFatalErrors
- fullTextSearch
schema:
file: ./src/schema.graphql
dataSources:
- kind: ethereum/contract
name: BookFactory{{version}}
network: {{network}}
source:
address: '{{factory}}'
abi: BookFactory
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Book
- ChapterStatus
- Chapter
- User
abis:
- name: Book
file: ./src/abis/Book.json
- name: Collection
file: ./src/abis/Collection.json
- name: Shelf
file: ./src/abis/Shelf.json
- name: BookFactory
file: ./src/abis/BookFactory.json
- name: BookToken
file: ./src/abis/BookToken.json
- name: ERC20
file: ./src/abis/ERC20.json
eventHandlers:
- event: FactorySetup()
handler: handleFactorySetup
- event: BookCreated(uint256,address)
handler: handleBookCreated
- event: ShelfCreated(address[],address,uint256)
handler: handleShelfCreated
- event: CollectionCreated(address[],address)
handler: handleCollectionCreated
- event: AdminReplaced(address)
handler: handleAdminReplaced
- event: PaymentTokenReplaced(address)
handler: handlePaymentTokenReplaced
- event: UpgradeFeeReplaced(uint256)
handler: handleUpgradeFeeReplaced
- event: BookUpgraded(address,address)
handler: handleBookUpgraded
file: ./src/mappings/factory.ts
templates:
- kind: ethereum/contract
name: Book
network: {{network}}
source:
abi: Book
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Book
- ChapterStatus
- Chapter
- User
abis:
- name: Book
file: ./src/abis/Book.json
- name: BookFactory
file: ./src/abis/BookFactory.json
- name: BookToken
file: ./src/abis/BookToken.json
eventHandlers:
- event: BookInit(string,string[],bool)
handler: handleBookInit
- event: BookEdited(address,string)
handler: handleBookEdited
- event: RoleGranted(indexed bytes32,indexed address,indexed address)
handler: handleRoleGranted
- event: RoleRevoked(indexed bytes32,indexed address,indexed address)
handler: handleRoleRevoked
- event: Paused(address)
handler: handlePaused
- event: Unpaused(address)
handler: handleUnpaused
- event: ConfiguredChapters(address,uint256[],(bool,bool,bool)[])
handler: handleConfiguredChapters
- event: ChaptersCreated(address,string[])
handler: handleChaptersCreated
- event: ChaptersEdited(address,uint256[],string[])
handler: handleChaptersEdited
- event: ChapterProofsSubmitted(address,uint256[],string[])
handler: handleChapterProofsSubmitted
- event: ChapterProofsReviewed(address,address[],uint256[],bool[],string[])
handler: handleChapterProofsReviewed
file: ./src/mappings/book.ts
- kind: ethereum/contract
name: Shelf
network: {{network}}
source:
abi: Shelf
mapping:
file: ./src/mappings/shelf.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Shelf
abis:
- name: Shelf
file: ./src/abis/Shelf.json
- name: BookFactory
file: ./src/abis/BookFactory.json
- name: BookToken
file: ./src/abis/BookToken.json
eventHandlers:
- event: ShelfOrdered(address[])
handler: handleShelfOrdered
- event: ShelfEdited(string)
handler: handleShelfEdited
- kind: ethereum/contract
name: Collection
network: {{network}}
source:
abi: Collection
mapping:
file: ./src/mappings/collection.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Collection
abis:
- name: Collection
file: ./src/abis/Collection.json
- name: BookFactory
file: ./src/abis/BookFactory.json
- name: BookToken
file: ./src/abis/BookToken.json
eventHandlers:
- event: CollectionOrdered(address[])
handler: handleCollectionOrdered
- event: CollectionEdited(string)
handler: handleCollectionEdited
- kind: ethereum/contract
name: BookToken
network: {{network}}
source:
abi: BookToken
mapping:
file: ./src/mappings/token.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Book
abis:
- name: Book
file: ./src/abis/Book.json
- name: BookFactory
file: ./src/abis/BookFactory.json
- name: BookToken
file: ./src/abis/BookToken.json
eventHandlers:
- event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)
handler: handleTransferSingle
- event: URI(string,indexed uint256)
handler: handleURIUpdated
- name: BookTokenMetadata
kind: file/ipfs
mapping:
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/metadata.ts
handler: handleBookTokenMetadata
entities:
- BookTokenMetadata
abis:
- name: BookToken
file: ./src/abis/BookToken.json
- name: ChapterMetadata
kind: file/ipfs
mapping:
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/metadata.ts
handler: handleChapterMetadata
entities:
- ChapterMetadata
abis:
- name: BookToken
file: ./src/abis/BookToken.json
- name: ShelfMetadata
kind: file/ipfs
mapping:
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/metadata.ts
handler: handleShelfMetadata
entities:
- ShelfMetadata
- Category
abis:
- name: Shelf
file: ./src/abis/Shelf.json
- name: CollectionMetadata
kind: file/ipfs
mapping:
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/metadata.ts
handler: handleCollectionMetadata
entities:
- CollectionMetadata
- Category
abis:
- name: Collection
file: ./src/abis/Collection.json
- name: BookMetadata
kind: file/ipfs
mapping:
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/metadata.ts
handler: handleBookMetadata
entities:
- BookMetadata
- Category
abis:
- name: BookToken
file: ./src/abis/BookToken.json
- name: SubmissionMetadata
kind: file/ipfs
mapping:
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/metadata.ts
handler: handleSubmissionMetadata
entities:
- SubmissionMetadata
abis:
- name: BookToken
file: ./src/abis/BookToken.json