-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathproject-mainnet.yaml
592 lines (591 loc) · 22.2 KB
/
project-mainnet.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
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
specVersion: 1.0.0
name: subquery-network-subql-project
version: 1.0.0
runner:
node:
name: '@subql/node-ethereum'
version: '>= 5.2.0'
options:
unfinalizedBlocks: true
query:
name: '@subql/query'
version: '>= 2.10.0'
description: 'Query registry project for SubQuery Mainnet'
repository: ''
schema:
file: ./schema.graphql
network:
chainId: '8453' # base
dictionary: ''
x-ethereum: ðereum
kind: ethereum/Runtime
startBlock: 10512216
assets:
eraManager:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/l2/EraManager.sol/EraManager.json
staking:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/Staking.sol/Staking.json
sqtoken:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/l2/L2SQToken.sol/L2SQToken.json
indexerRegistry:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/IndexerRegistry.sol/IndexerRegistry.json
projectRegistry:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/ProjectRegistry.sol/ProjectRegistry.json
planManager:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/PlanManager.sol/PlanManager.json
purchaseOfferMarket:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/PurchaseOfferMarket.sol/PurchaseOfferMarket.json
serviceAgreementRegistry:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/ServiceAgreementRegistry.sol/ServiceAgreementRegistry.json
consumerRegistry:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/ConsumerRegistry.sol/ConsumerRegistry.json
rewardsDistributor:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/RewardsDistributor.sol/RewardsDistributor.json
rewardsPool:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/RewardsPool.sol/RewardsPool.json
rewardsStaking:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/RewardsStaking.sol/RewardsStaking.json
stateChannel:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/StateChannel.sol/StateChannel.json
disputeManager:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/DisputeManager.sol/DisputeManager.json
priceOracle:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/PriceOracle.sol/PriceOracle.json
tokenExchange:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/TokenExchange.sol/TokenExchange.json
rewardsBooster:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/RewardsBooster.sol/RewardsBooster.json
stakingAllocation:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/StakingAllocation.sol/StakingAllocation.json
airdropper:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/Airdropper.sol/Airdropper.json
l2SQToken:
file: ./node_modules/@subql/contract-sdk/artifacts/contracts/l2/L2SQToken.sol/L2SQToken.json
dataSources:
- <<: *ethereum
options:
abi: eraManager
address: '0xf80A8E45a13D2C116Aa8cFFEf3dcb6049cd8059e'
mapping:
file: ./dist/index.js
handlers:
- handler: handleNewEra
kind: ethereum/LogHandler
filter:
topics:
- NewEraStart(uint256 indexed era, address caller)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: indexerRegistry
address: '0xadED5DDFA892250018fE54DB8E8C6CAd45476DC9'
mapping:
file: ./dist/index.js
handlers:
- handler: handleRegisterIndexer
kind: ethereum/LogHandler
filter:
topics:
- RegisterIndexer(address indexed indexer, uint256 amount, bytes32 metadata)
- handler: handleUpdateIndexerMetadata
kind: ethereum/LogHandler
filter:
topics:
- UpdateMetadata(address indexed indexer, bytes32 metadata)
- handler: handleSetControllerAccount
kind: ethereum/LogHandler
filter:
topics:
- SetControllerAccount(address indexed indexer, address indexed controller)
- handler: handleUnregisterIndexer
kind: ethereum/LogHandler
filter:
topics:
- UnregisterIndexer(address indexed indexer)
- handler: handleSetCommissionRate
kind: ethereum/LogHandler
filter:
topics:
- SetCommissionRate(address indexed indexer, uint256 amount)
- handler: handleSetMinimumStakingAmount
kind: ethereum/TransactionHandler
filter:
function: setminimumStakingAmount(uint256 amount)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: staking
address: '0x7A68b10EB116a8b71A9b6f77B32B47EB591B6Ded'
mapping:
file: ./dist/index.js
handlers:
- handler: handleAddDelegation
kind: ethereum/LogHandler
filter:
topics:
- DelegationAdded(address indexed source, address indexed runner, uint256 amount)
- handler: handleRemoveDelegation
kind: ethereum/LogHandler
filter:
topics:
- DelegationRemoved(address indexed source, address indexed runner, uint256 amount)
- handler: handleWithdrawRequested
kind: ethereum/LogHandler
filter:
topics:
- UnbondRequested(address indexed source, address indexed runner, uint256 amount, uint256 index, uint8 _type)
- handler: handleWithdrawClaimed
kind: ethereum/LogHandler
filter:
topics:
- UnbondWithdrawn(address indexed source, uint256 amount, uint256 fee, uint256 index)
- handler: handleWithdrawCancelled
kind: ethereum/LogHandler
filter:
topics:
- UnbondCancelled(address indexed source, address indexed runner, uint256 amount, uint256 index)
- handler: handleSetIndexerLeverageLimit
kind: ethereum/TransactionHandler
filter:
function: setIndexerLeverageLimit(uint256 _indexerLeverageLimit)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: sqtoken
address: '0x858c50C3AF1913b0E849aFDB74617388a1a5340d'
mapping:
file: './dist/index.js'
handlers:
- handler: handleTransfer
kind: ethereum/LogHandler
filter:
topics:
- Transfer(address indexed from, address indexed to, uint256 amount)
- <<: *ethereum
options:
abi: projectRegistry
address: '0x5499c960cc54563E7264Fb96be4E0907a93E825B'
mapping:
file: ./dist/index.js
handlers:
# latest version of events
- handler: handleProjectCreated
kind: ethereum/LogHandler
filter:
topics:
- ProjectCreated(address indexed creator, uint256 indexed projectId, string projectMetadata, uint8 projectType, bytes32 deploymentId, bytes32 deploymentMetadata)
- handler: handlerProjectTransferred
kind: ethereum/LogHandler
filter:
topics:
- Transfer(address indexed from, address indexed to, uint256 indexed tokenId)
- handler: handleProjectMetadataUpdated
kind: ethereum/LogHandler
filter:
topics:
- ProjectMetadataUpdated(address indexed owner, uint256 indexed projectId, string metadata)
- handler: handleProjectDeploymentUpdated
kind: ethereum/LogHandler
filter:
topics:
- ProjectDeploymentUpdated(address indexed owner, uint256 indexed projectId, bytes32 deploymentId, bytes32 metadata)
- handler: handleProjectLatestDeploymentUpdated
kind: ethereum/LogHandler
filter:
topics:
- ProjectLatestDeploymentUpdated(address indexed owner, uint256 projectId, bytes32 deploymentId)
- handler: handleServiceStatusChanged
kind: ethereum/LogHandler
filter:
topics:
- ServiceStatusChanged(address indexed indexer, bytes32 indexed deploymentId, uint8 status)
- <<: *ethereum
options:
abi: planManager
address: '0xbF443a0474AE33C30c2A0dfbc608B0e374A59DcD'
mapping:
file: ./dist/index.js
handlers:
- handler: handlePlanTemplateCreated
kind: ethereum/LogHandler
filter:
topics:
- PlanTemplateCreated(uint256 indexed planTemplateId)
- handler: handlePlanTemplateMetadataUpdated
kind: ethereum/LogHandler
filter:
topics:
- PlanTemplateMetadataChanged(uint256 indexed planTemplateId, bytes32 metadata)
- handler: handlePlanTemplateStatusUpdated
kind: ethereum/LogHandler
filter:
topics:
- PlanTemplateStatusChanged(uint256 indexed planTemplateId, bool active)
- handler: handlePlanCreated
kind: ethereum/LogHandler
filter:
topics:
- PlanCreated(uint256 indexed planId, address creator, bytes32 deploymentId, uint256 planTemplateId, uint256 price)
- handler: handlePlanRemoved
kind: ethereum/LogHandler
filter:
topics:
- PlanRemoved(uint256 indexed planId)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: serviceAgreementRegistry
address: '0xe86861fE07Bfb166FE1010467160ffFD70677403'
mapping:
file: ./dist/index.js
handlers:
- handler: handleServiceAgreementCreated
kind: ethereum/LogHandler
filter:
topics:
- ClosedAgreementCreated(address indexed consumer, address indexed indexer, bytes32 indexed deploymentId, uint256 serviceAgreementId)
- handler: handlerAgreementTransferred
kind: ethereum/LogHandler
filter:
topics:
- Transfer(address indexed from, address indexed to, uint256 indexed tokenId)
- <<: *ethereum
options:
abi: rewardsDistributor
address: '0x18AEC6c407235d446E52Aa243CD1A75421bb264e'
mapping:
file: ./dist/index.js
handlers:
- handler: handleRewardsDistributed
kind: ethereum/LogHandler
filter:
topics:
- DistributeRewards(address indexed runner, uint256 indexed eraIdx, uint256 rewards, uint256 commission)
- handler: handleRewardsClaimed
kind: ethereum/LogHandler
filter:
topics:
- ClaimRewards(address indexed runner, address indexed delegator, uint256 rewards)
- handler: handleRewardsUpdated
kind: ethereum/LogHandler
filter:
topics:
- RewardsChanged(address indexed runner, uint256 indexed eraIdx, uint256 additions, uint256 removals)
- handler: handleInstantRewards
kind: ethereum/LogHandler
filter:
topics:
- InstantRewards(address indexed runner, uint256 indexed eraIdx, uint256 token)
- handler: handleAgreementRewards
kind: ethereum/LogHandler
filter:
topics:
- AgreementRewards(address indexed runner, uint256 agreementId, uint256 token);
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: rewardsStaking
address: '0x1c285c5513f2135f8AD12A930E6473dA47581BE8'
mapping:
file: ./dist/index.js
handlers:
- handler: handleRunnerWeightApplied
kind: ethereum/LogHandler
filter:
topics:
- RunnerWeightApplied(address indexed runner, uint256 weight)
- handler: handleSettledEraUpdated
kind: ethereum/LogHandler
filter:
topics:
- SettledEraUpdated(address indexed runner, uint256 era)
- <<: *ethereum
options:
abi: purchaseOfferMarket
address: '0x72E7333bEdf33dc70021519457f05B096e971f37'
mapping:
file: ./dist/index.js
handlers:
- handler: handlePurchaseOfferCreated
kind: ethereum/LogHandler
filter:
topics:
- PurchaseOfferCreated(address consumer, uint256 offerId, bytes32 deploymentId, uint256 planTemplateId, uint256 deposit, uint16 limit, uint256 minimumAcceptHeight, uint256 minimumStakingAmount, uint256 expireDate)
- handler: handlePurchaseOfferCancelled
kind: ethereum/LogHandler
filter:
topics:
- PurchaseOfferCancelled(address indexed creator, uint256 offerId, uint256 penalty)
- handler: handlePurchaseOfferAccepted
kind: ethereum/LogHandler
filter:
topics:
- OfferAccepted(address indexed indexer, uint256 offerId, uint256 agreementId)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: stateChannel
address: '0x6797Df373589dF2AA37FA353c4254FD7834B751A'
mapping:
file: ./dist/index.js
handlers:
- handler: handleChannelOpen
kind: ethereum/LogHandler
filter:
topics:
- ChannelOpen(uint256 indexed channelId, address indexer, address consumer, uint256 total, uint256 price, uint256 expiredAt, bytes32 deploymentId, bytes callback)
- handler: handleChannelExtend
kind: ethereum/LogHandler
filter:
topics:
- ChannelExtend(uint256 channelId, uint256 expiredAt, uint256 price)
- handler: handleChannelFund
kind: ethereum/LogHandler
filter:
topics:
- ChannelFund(uint256 indexed channelId, uint256 realTotal, uint256 total)
- handler: handleChannelCheckpoint
kind: ethereum/LogHandler
filter:
topics:
- ChannelCheckpoint(uint256 indexed channelId, uint256 spent, bool isFinal)
- handler: handleChannelTerminate
kind: ethereum/LogHandler
filter:
topics:
- ChannelTerminate(uint256 channelId, uint256 spent, uint256 terminatedAt, bool terminateByIndexer)
- handler: handleChannelFinalize
kind: ethereum/LogHandler
filter:
topics:
- ChannelFinalize(uint256 channelId, uint256 total, uint256 remain)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- handler: handlerChannelLabor2
kind: ethereum/LogHandler
filter:
topics:
- ChannelLabor2(uint256 indexed channelId, bytes32 deploymentId, address indexer, uint256 amount)
- <<: *ethereum
options:
abi: disputeManager
address: '0xd82a8f11645f6FEF2b863CEe19755bA22decD42a'
mapping:
file: ./dist/index.js
handlers:
- handler: handleDisputeOpen
kind: ethereum/LogHandler
filter:
topics:
- DisputeOpen(uint256 indexed disputeId, address fisherman, address indexer, uint8 _type)
- handler: handleDisputeFinalized
kind: ethereum/LogHandler
filter:
topics:
- DisputeFinalized(uint256 indexed disputeId, uint8 state, uint256 slashAmount, uint256 returnAmount)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: priceOracle
address: '0x240f0aCDf5C7c9cD4AE70E1aF61fba9547DF2139'
mapping:
file: ./dist/index.js
handlers:
- handler: handlePricePosted
kind: ethereum/LogHandler
filter:
topics:
- PricePosted(address assetFrom, address assetTo, uint256 previousPrice, uint256 newPrice);
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: consumerRegistry
address: '0xd1ce436a883206a87c7e695f0d88B3b57369C477'
mapping:
file: ./dist/index.js
handlers:
- handler: handleConsumerControllerAdded
kind: ethereum/LogHandler
filter:
topics:
- ControllerAdded(address indexed consumer, address controller)
- handler: handleConsumerControllerRemoved
kind: ethereum/LogHandler
filter:
topics:
- ControllerRemoved(address indexed consumer, address controller)
- <<: *ethereum
options:
abi: rewardsBooster
address: '0x7F138D57A5e05b6FBF3bCAdDa9a1252354245464'
mapping:
file: ./dist/index.js
handlers:
- handler: handleDeploymentBoosterAdded
kind: ethereum/LogHandler
filter:
topics:
- DeploymentBoosterAdded(bytes32 indexed deploymentId, address indexed account, uint256 amount)
- handler: handleDeploymentBoosterRemoved
kind: ethereum/LogHandler
filter:
topics:
- DeploymentBoosterRemoved(bytes32 indexed deploymentId, address indexed account, uint256 amount)
- handler: handleMissedLabor
kind: ethereum/LogHandler
filter:
topics:
- MissedLabor(bytes32 indexed deploymentId, address indexed runner, uint256 labor)
- handler: handleAllocationRewardsGiven
kind: ethereum/LogHandler
filter:
topics:
- AllocationRewardsGiven(bytes32 indexed deploymentId, address indexed runner, uint256 amount)
- handler: handleAllocationRewardsBurnt
kind: ethereum/LogHandler
filter:
topics:
- AllocationRewardsBurnt(bytes32 indexed deploymentId, address indexed runner, uint256 amount)
- handler: handleQueryRewardsSpent
kind: ethereum/LogHandler
filter:
topics:
- QueryRewardsSpent(bytes32 indexed deploymentId, address indexed runner, uint256 amount, bytes data)
- handler: handleQueryRewardsRefunded
kind: ethereum/LogHandler
filter:
topics:
- QueryRewardsRefunded(bytes32 indexed deploymentId, address indexed runner, uint256 amount, bytes data)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: stakingAllocation
address: '0x20E4B978b930ce17a499C33BbF958b5b920F70E1'
mapping:
file: ./dist/index.js
handlers:
- handler: handleStakeAllocationAdded
kind: ethereum/LogHandler
filter:
topics:
- StakeAllocationAdded(bytes32 deploymentId, address runner, uint256 amount)
- handler: handleStakeAllocationRemoved
kind: ethereum/LogHandler
filter:
topics:
- StakeAllocationRemoved(bytes32 deploymentId, address runner, uint256 amount)
- handler: handleOverAllocationStarted
kind: ethereum/LogHandler
filter:
topics:
- OverAllocationStarted(address runner, uint256 start)
- handler: handleOverAllocationEnded
kind: ethereum/LogHandler
filter:
topics:
- OverAllocationEnded(address runner, uint256 end, uint256 time)
- <<: *ethereum
options:
abi: airdropper
address: '0x8611F6647C57339b994aE5C1BB7cD8b101eB4716'
mapping:
file: ./dist/index.js
handlers:
- handler: handleRoundCreated
kind: ethereum/LogHandler
filter:
topics:
- RoundCreated(uint256 indexed roundId, address tokenAddress, uint256 roundStartTime, uint256 roundDeadline)
- handler: handleAddAirdrop
kind: ethereum/LogHandler
filter:
topics:
- AddAirdrop(address indexed addr, uint256 roundId, uint256 amount)
- handler: handleAirdropClaimed
kind: ethereum/LogHandler
filter:
topics:
- AirdropClaimed(address indexed addr, uint256 roundId, uint256 amount)
- handler: handleRoundSettled
kind: ethereum/LogHandler
filter:
topics:
- RoundSettled(uint256 indexed roundId, address settleDestination, uint256 unclaimAmount)
- handler: handleParameterEvent
kind: ethereum/LogHandler
filter:
topics:
- Parameter(string name, bytes value)
- <<: *ethereum
options:
abi: l2SQToken
address: '0x858c50C3AF1913b0E849aFDB74617388a1a5340d'
mapping:
file: ./dist/index.js
handlers:
- handler: handleBurn
kind: ethereum/LogHandler
filter:
topics:
- Burn(address indexed _account, uint256 _amount)
- kind: ethereum/Runtime
startBlock: 12750283
endBlock: 12750283
mapping:
file: ./dist/index.js
handlers:
- handler: handleBlock_12750283
kind: ethereum/BlockHandler
filter:
modulo: 1
- <<: *ethereum
options:
abi: rewardsPool
address: '0xd2b00e427e3FE06Be815C20039421308f0487d03'
mapping:
file: ./dist/index.js
handlers:
- handler: handleRewardsPoolCollect
kind: ethereum/LogHandler
filter:
topics:
- Collect(bytes32 deploymentId, address runner, uint256 era, uint256 amount)