forked from ourzora/zora-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
533 lines (532 loc) · 19.5 KB
/
subgraph.template.yaml
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
specVersion: 0.0.2
schema:
file: ./schema.graphql
dataSources:
{{#protocolRewards}}
- name: ProtocolRewardsV{{version}}
kind: ethereum/contract
network: {{network}}
source:
abi: ProtocolRewards
address: "{{address}}"
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- RewardsPerUserPerDay
- RewardsPerUser
- RewardsStandardDeposit
- RewardsCustomDeposit
- RewardsWithdraw
language: wasm/assemblyscript
file: ./src/RewardsMappings/rewardsMappings.ts
abis:
- name: ProtocolRewards
file: ./abis/ProtocolRewards.json
eventHandlers:
- event: Deposit(indexed address,indexed address,indexed bytes4,uint256,string)
handler: handleDeposit
- event: RewardsDeposit(indexed address,indexed address,indexed address,address,address,address,uint256,uint256,uint256,uint256,uint256)
handler: handleRewardsDeposit
- event: Withdraw(indexed address,indexed address,uint256)
handler: handleWithdraw
{{/protocolRewards}}
{{#factories1155}}
- kind: ethereum/contract
name: ZoraNFTCreatorFactory1155V{{version}}
network: {{network}}
source:
address: "{{address}}"
abi: ZoraCreator1155FactoryImpl
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ERC1155Drop
- MetadataInfo
- ZoraCreateToken
- ZoraCreateContract
abis:
- name: ZoraCreator1155FactoryImpl
file: ./abis/ZoraCreator1155FactoryImpl.json
- name: ZoraCreator1155Impl
file: ./abis/ZoraCreator1155Impl.json
eventHandlers:
- event: SetupNewContract(indexed address,indexed address,indexed address,string,string,(uint32,uint32,address))
handler: handleNewContractCreated
receipt: true
- event: Upgraded(indexed address)
handler: handle1155FactoryUpgraded
file: ./src/ERC1155Mappings/factoryMappings.ts
{{/factories1155}}
{{#factories721}}
- kind: ethereum/contract
name: Zora721V{{version}}
network: {{network}}
source:
address: "{{address}}"
abi: ZoraNFTCreatorV1
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ZoraCreateContract
- ZoraCreateToken
- MetadataInfo
abis:
- name: ZoraNFTCreatorV1
file: ./abis/ZoraNFTCreatorV1.json
- name: ERC721Drop
file: ./abis/ERC721Drop.json
eventHandlers:
- event: CreatedDrop(indexed address,indexed address,uint256)
handler: handleCreatedDrop
- event: Upgraded(indexed address)
handler: handleFactoryUpgraded
file: ./src/ERC721Mappings/ERC721FactoryMappings.ts
{{/factories721}}
{{#preminter}}
- kind: ethereum/contract
name: ZoraCreator1155PremintExecutorV{{version}}
network: {{network}}
source:
address: "{{address}}"
abi: ZoraCreator1155PremintExecutorImpl
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Premint
file: ./src/ERC1155Mappings/premintMappings.ts
abis:
- name: ZoraCreator1155PremintExecutorImpl
file: ./abis/ZoraCreator1155PremintExecutorImpl.json
eventHandlers:
- event: Preminted(indexed address,indexed uint256,indexed bool,uint32,(address,string,string),(string,uint256,uint64,uint96,uint64,uint64,uint32,uint32,address,address),address,uint256)
handler: handlePreminted
- event: PremintedV2(indexed address,indexed uint256,indexed bool,uint32,address,uint256)
handler: handlePremintedV2
{{/preminter}}
{{#reserveAuctionV3}}
- name: ReserveAuctionV3
kind: ethereum/contract
network: {{network}}
source:
abi: ReserveAuctionV3
address: "{{address}}"
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- Auction
- AuctionBid
language: wasm/assemblyscript
file: ./src/ReserveAuctionV3Mappings/reserveAuctionV3Mappings.ts
abis:
- name: ReserveAuctionV3
file: ./abis/ReserveAuctionV3.json
eventHandlers:
- event: AuctionCreated(indexed address,indexed uint256,(address,address,uint256,uint256,address,uint96,address,uint96,address,uint80,uint16))
handler: handleAuctionCreated
- event: AuctionBid(indexed address,indexed uint256,bool,bool,(address,address,uint256,uint256,address,uint96,address,uint96,address,uint80,uint16))
handler: handleAuctionBid
- event: AuctionCanceled(indexed address,indexed uint256,(address,address,uint256,uint256,address,uint96,address,uint96,address,uint80,uint16))
handler: handleAuctionCanceled
- event: AuctionEnded(indexed address,indexed uint256,(address,address,uint256,uint256,address,uint96,address,uint96,address,uint80,uint16))
handler: handleAuctionEnded
- event: AuctionReservePriceUpdated(indexed address,indexed uint256,(address,address,uint256,uint256,address,uint96,address,uint96,address,uint80,uint16))
handler: handleAuctionReservePriceUpdated
{{/reserveAuctionV3}}
{{#zoraMints}}
- name: ZoraMints
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraMints1155
address: "{{address}}"
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- MintToken
- MintAccountBalance
language: wasm/assemblyscript
file: ./src/MintsMappings/factoryMappings.ts
abis:
- name: ZoraMints1155
file: ./abis/ZoraMints1155.json
eventHandlers:
- event: TokenCreated(indexed uint256,indexed uint256,indexed address)
handler: handleTokenCreated
- event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)
handler: handleTransferSingle
- event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[])
handler: handleTransferBatch
{{/zoraMints}}
{{#mintsManager}}
- name: MintsManager
kind: ethereum/contract
network: {{network}}
source:
abi: MintsManager
address: "{{address}}"
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- MintComment
language: wasm/assemblyscript
file: ./src/MintsMappings/mintsManagerMappings.ts
abis:
- name: MintsManager
file: ./abis/ZoraMintsManagerImpl.json
eventHandlers:
- event: MintComment(indexed address,indexed address,indexed uint256,uint256,string)
handler: handleMintComment
{{/mintsManager}}
{{#zoraSparks}}
- name: ZoraSparks
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraSparks1155
address: "{{address}}"
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- SparkToken
- SparkAccountBalance
language: wasm/assemblyscript
file: ./src/SparksMappings/factoryMappings.ts
abis:
- name: ZoraSparks1155
file: ./abis/ZoraSparks1155.json
eventHandlers:
- event: TokenCreated(indexed uint256,indexed uint256,indexed address)
handler: handleTokenCreated
- event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)
handler: handleTransferSingle
- event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[])
handler: handleTransferBatch
{{/zoraSparks}}
{{#erc20Minter}}
- name: ERC20Minter{{version}}
kind: ethereum/contract
network: {{network}}
source:
abi: ERC20Minter
address: "{{address}}"
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- SalesConfigERC20Minter
- MintComment
- ERC20RewardsDeposit
language: wasm/assemblyscript
file: ./src/ERC1155Mappings/ERC20MinterMappings.ts
abis:
- name: ERC20Minter
file: ./abis/ERC20Minter.json
eventHandlers:
- event: SaleSet(indexed address,indexed uint256,(uint64,uint64,uint64,uint256,address,address))
handler: handleERC20MinterSaleSet
- event: MintComment(indexed address,indexed address,indexed uint256,uint256,string)
handler: handleMintComment
- event: ERC20RewardsDeposit(indexed address,indexed address,indexed address,address,address,address,uint256,uint256,uint256,uint256,uint256)
handler: handleERC20RewardsDeposit
{{/erc20Minter}}
{{#zoraTimedSaleStrategy}}
- name: ZoraTimedSaleStrategy{{version}}
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraTimedSaleStrategy
address: "{{address}}"
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- SalesConfigZoraTimedSaleStrategy
- MintComment
- ZoraTimedSaleStrategyRewardsDeposit
language: wasm/assemblyscript
file: ./src/ERC1155Mappings/templates/ZoraTimedSaleStrategyMappings.ts
abis:
- name: ZoraTimedSaleStrategy
file: ./abis/ZoraTimedSaleStrategy.json
eventHandlers:
- event: SaleSet(indexed address,indexed uint256,(uint64,uint64,string,string),address,address,uint256)
handler: handleZoraTimedSaleStrategySaleSet
- event: MintComment(indexed address,indexed address,indexed uint256,uint256,string)
handler: handleMintComment
- event: ZoraTimedSaleStrategyRewards(indexed address,indexed uint256,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)
handler: handleZoraTimedSaleStrategyRewardsDeposit
- event: MarketLaunched(indexed address,indexed uint256,address,address)
handler: handleMarketLaunched
- event: SaleSetV2(indexed address,indexed uint256,(uint64,uint64,uint64,bool,uint256,address,address,string,string),uint256)
handler: handleZoraTimedSaleStrategySaleSetV2
{{/zoraTimedSaleStrategy}}
templates:
- name: MetadataInfo
kind: file/ipfs
mapping:
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/ipfs/metadata.ts
handler: handleJSONMetadataFetched
entities:
- MetadataInfo
abis:
- name: ZoraCreator1155Impl
file: ./abis/ZoraCreator1155Impl.json
- kind: ethereum/contract
name: EditionMetadataRenderer
network: {{network}}
source:
abi: EditionMetadataRenderer
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- EditionMetadata
- ZoraCreateToken
- OnChainMetadata
- TransactionInfo
abis:
- name: EditionMetadataRenderer
file: ./abis/EditionMetadataRenderer.json
- name: ERC721Drop
file: ./abis/ERC721Drop.json
eventHandlers:
- event: EditionInitialized(indexed address,string,string,string)
handler: handleCreatedEdition
- event: MediaURIsUpdated(indexed address,address,string,string)
handler: handleUpdateMediaURIs
- event: DescriptionUpdated(indexed address,address,string)
handler: handleUpdateDescription
file: ./src/ERC721Mappings/templates/EditionMetadataRendererMappings.ts
- kind: ethereum/contract
name: DropMetadataRenderer
network: {{network}}
source:
abi: DropMetadataRenderer
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- DropMetadata
- ZoraCreateToken
- OnChainMetadata
- TransactionInfo
- MetadataInfo
abis:
- name: DropMetadataRenderer
file: ./abis/DropMetadataRenderer.json
- name: ERC721Drop
file: ./abis/ERC721Drop.json
eventHandlers:
- event: MetadataUpdated(indexed address,string,string,string,uint256)
handler: handleMetadataUpdated
file: ./src/ERC721Mappings/templates/DropMetadataRendererMappings.ts
- name: ZoraCreator1155Impl
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraCreator1155Impl
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- ZoraCreateContract
- ZoraCreateToken
- ZoraCreatorPermission
- Token1155Holder
- OnChainMetadataHistory
- RoyaltyConfig
- MetadataInfo
language: wasm/assemblyscript
file: ./src/ERC1155Mappings/templates/ZoraCreator1155ImplMappings.ts
abis:
- name: ZoraCreator1155Impl
file: ./abis/ZoraCreator1155Impl.json
eventHandlers:
- event: ContractRendererUpdated(address)
handler: handleContractRendererUpdated
- event: RendererUpdated(indexed uint256,indexed address,indexed address)
handler: handleRendererUpdated
- event: URI(string,indexed uint256)
handler: handleURI
- event: UpdatedPermissions(indexed uint256,indexed address,indexed uint256)
handler: handleUpdatedPermissions
- event: UpdatedRoyalties(indexed uint256,indexed address,(uint32,uint32,address))
handler: handleUpdatedRoyalties
- event: UpdatedToken(indexed address,indexed uint256,(string,uint256,uint256))
handler: handleUpdatedToken
receipt: true
- event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)
handler: handleTransferSingle
- event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[])
handler: handleTransferBatch
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: ContractMetadataUpdated(indexed address,string,string)
handler: handleContractMetadataUpdated
- event: SetupNewToken(indexed uint256,indexed address,string,uint256)
handler: handleSetupNewToken
- event: OwnershipTransferred(address,address)
handler: handleOwnershipTransferred
- name: ZoraCreatorFixedPriceSaleStrategy
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraCreatorFixedPriceSaleStrategy
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- SalesConfigFixedPriceSaleStrategy
language: wasm/assemblyscript
file: ./src/ERC1155Mappings/templates/ZoraCreatorFixedPriceSaleStrategyMappings.ts
abis:
- name: ZoraCreatorFixedPriceSaleStrategy
file: ./abis/ZoraCreatorFixedPriceSaleStrategy.json
eventHandlers:
- event: SaleSet(indexed address,indexed uint256,(uint64,uint64,uint64,uint96,address))
handler: handleFixedPriceStrategySaleSet
- event: MintComment(indexed address,indexed address,indexed uint256,uint256,string)
handler: handleMintedWithComment
- name: ZoraCreatorRedeemMinterFactory
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraCreatorRedeemMinterFactory
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- ZoraCreatorRedeemConfig
language: wasm/assemblyscript
file: ./src/ERC1155Mappings/templates/ZoraCreatorRedeemMinterFactory.ts
abis:
- name: ZoraCreatorRedeemMinterFactory
file: ./abis/ZoraCreatorRedeemMinterFactory.json
eventHandlers:
- event: RedeemMinterDeployed(indexed address,indexed address)
handler: handleRedeemMinterDeployed
- name: ZoraCreatorRedeemMinterStrategy
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraCreatorRedeemMinterStrategy
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- RedeemInstructions
- RedeemMinterProcessed
- RedeemMintToken
- SalesConfigRedeemMinterStrategy
language: wasm/assemblyscript
file: ./src/ERC1155Mappings/templates/ZoraCreatorRedeemMinterStrategy.ts
abis:
- name: ZoraCreatorRedeemMinterStrategy
file: ./abis/ZoraCreatorRedeemMinterStrategy.json
eventHandlers:
- event: RedeemsCleared(indexed address,indexed bytes32[])
handler: handleRedeemCleared
- event: RedeemProcessed(indexed address,indexed bytes32,address,uint256[][],uint256[][])
handler: handleRedeemProcessed
- event: RedeemSet(indexed address,indexed bytes32,((address,uint256,uint256,uint8),(uint8,uint256,uint256,uint256,address,address,bytes4)[],uint64,uint64,uint256,address))
handler: handleRedeemSet
- name: ZoraCreatorMerkleMinterStrategy
kind: ethereum/contract
network: {{network}}
source:
abi: ZoraCreatorMerkleMinterStrategy
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- SalesConfigMerkleMinterStrategy
language: wasm/assemblyscript
file: ./src/ERC1155Mappings/templates/ZoraMerkleMinterStrategyMappings.ts
abis:
- name: ZoraCreatorMerkleMinterStrategy
file: ./abis/ZoraCreatorMerkleMinterStrategy.json
eventHandlers:
- event: SaleSet(indexed address,indexed uint256,(uint64,uint64,address,bytes32))
handler: handleMerkleMinterStrategySaleSet
# new mappings
- name: ERC721Drop
kind: ethereum/contract
network: {{network}}
source:
abi: ERC721Drop
mapping:
kind: ethereum/events
apiVersion: 0.0.7
entities:
- ZoraCreateContract
- SalesConfigMerkleMinterStrategy
- SalesStrategyConfig
- SalesConfigFixedPriceSaleStrategy
- ZoraCreatorPermission
- ZoraCreateToken
- RoyaltyConfig
- OnChainMetadataHistory
- KnownRenderer
- MintComment
- TokenSale
language: wasm/assemblyscript
file: ./src/ERC721Mappings/templates/ERC721DropMappings.ts
abis:
- name: ERC721Drop
file: ./abis/ERC721Drop.json
eventHandlers:
- event: SalesConfigChanged(indexed address)
handler: handleSalesConfigChanged
- event: OpenMintFinalized(indexed address,uint256)
handler: handleOpenMintFinalized
- event: FundsRecipientChanged(indexed address,indexed address)
handler: handleFundsRecipientChanged
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleNFTTransfer
- event: MintComment(indexed address,indexed address,indexed uint256,uint256,string)
handler: handleMintComment
- event: Sale(indexed address,indexed uint256,indexed uint256,uint256)
handler: handleSale
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: RoleGranted(indexed bytes32,indexed address,indexed address)
handler: handleRoleGranted
- event: RoleRevoked(indexed bytes32,indexed address,indexed address)
handler: handleRoleRevoked
- event: OwnershipTransferred(indexed address,indexed address)
handler: handleOwnershipTransferred
- event: UpdatedMetadataRenderer(address,address)
handler: handleUpdatedMetadataRenderer
features:
- grafting
- nonFatalErrors
{{#grafting}}
graft:
base: {{base}} # subgraph ID of base subgraph
block: {{block}} # block number
{{/grafting}}