-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubgraph.yaml
545 lines (545 loc) · 19.2 KB
/
subgraph.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
specVersion: 0.0.4
schema:
file: ./schema.graphql
description: Subgraph for Tetu V2
dataSources:
- name: ControllerData
kind: ethereum/contract
network: matic
source:
abi: ControllerAbi
address: "0x33b27e0A2506a4A2FBc213a01C51d0451745343a"
startBlock: 36865497
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ControllerEntity
- AddressChangeAnnounceEntity
- ProxyUpgradeAnnounceEntity
- TetuVoterEntity
abis:
- name: ControllerAbi
file: ./abis/ControllerV2.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
- name: InvestFundAbi
file: ./abis/InvestFundV2.json
- name: ForwarderAbi
file: ./abis/ForwarderV3.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: TetuVoterAbi
file: ./abis/TetuVoter.json
- name: PlatformVoterAbi
file: ./abis/PlatformVoter.json
- name: MultiBribeAbi
file: ./abis/MultiBribe.json
eventHandlers:
- event: AddressChangeAnnounced(uint256,address)
handler: handleAddressChangeAnnounced
- event: AddressChanged(uint256,address,address)
handler: handleAddressChanged
- event: ContractInitialized(address,uint256,uint256)
handler: handleContractInitialized
- event: ProxyUpgradeAnnounced(address,address)
handler: handleProxyUpgradeAnnounced
- event: ProxyUpgraded(address,address)
handler: handleProxyUpgraded
- event: RegisterVault(address)
handler: handleRegisterVault
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: VaultRemoved(address)
handler: handleVaultRemoved
- event: AddressAnnounceRemove(uint256)
handler: handleAddressAnnounceRemove
- event: ProxyAnnounceRemoved(address)
handler: handleProxyAnnounceRemoved
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: OperatorAdded(address)
handler: handleOperatorAdded
- event: OperatorRemoved(address)
handler: handleOperatorRemoved
file: ./src/controller.ts
- name: VaultFactoryData
kind: ethereum/contract
network: matic
source:
abi: VaultFactoryAbi
address: "0xaAd7a2517b0d0d15E3Da5C37C5371F7283cCc074"
startBlock: 36865497
mapping:
file: ./src/vault-factory.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- VaultFactoryEntity
abis:
- name: VaultFactoryAbi
file: ./abis/VaultFactory.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ControllerAbi
file: ./abis/ControllerV2.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
- name: StrategySplitterAbi
file: ./abis/StrategySplitterV2.json
- name: MultiBribeAbi
file: ./abis/MultiBribe.json
- name: MultiGaugeAbi
file: ./abis/MultiGauge.json
- name: VeTetuAbi
file: ./abis/VeTetu.json
eventHandlers:
- event: VaultDeployed(address,address,string,string,address,uint256,address,address,address,address,address)
handler: handleVaultDeployed
- event: VaultImplChanged(address)
handler: handleVaultImplChanged
- event: VaultInsuranceImplChanged(address)
handler: handleVaultInsuranceImplChanged
- event: SplitterImplChanged(address)
handler: handleSplitterImplChanged
templates:
- name: PlatformVoterTemplate
kind: ethereum/contract
network: matic
source:
abi: PlatformVoterAbi
mapping:
file: ./src/platfrom-voter.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- PlatformVoterEntity
abis:
- name: PlatformVoterAbi
file: ./abis/PlatformVoter.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: Voted(uint256,uint256,uint256,address,uint256,uint256,uint256,uint256,uint256)
handler: handleVoted
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: VoteRemoved(uint256,uint256,uint256,address)
handler: handleVoteRemoved
- name: MultiBribeTemplate
kind: ethereum/contract
network: matic
source:
abi: MultiBribeAbi
mapping:
file: ./src/bribe.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- BribeEntity
abis:
- name: MultiBribeAbi
file: ./abis/MultiBribe.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: BribeDeposit(indexed address,indexed uint256,uint256)
handler: handleBribeDeposit
- event: BribeWithdraw(indexed address,indexed uint256,uint256)
handler: handleBribeWithdraw
- event: ClaimRewards(indexed address,address,indexed address,uint256,address)
handler: handleClaimRewards
- event: NotifyReward(indexed address,address,indexed address,uint256)
handler: handleNotifyReward
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: Upgraded(indexed address)
handler: handleUpgraded
- name: MultiGaugeTemplate
kind: ethereum/contract
network: matic
source:
abi: MultiGaugeAbi
mapping:
file: ./src/gauge.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- GaugeEntity
abis:
- name: MultiGaugeAbi
file: ./abis/MultiGauge.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: ControllerAbi
file: ./abis/ControllerV2.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: ClaimRewards(indexed address,address,indexed address,uint256,address)
handler: handleClaimRewards
- event: Deposit(indexed address,indexed address,uint256)
handler: handleDeposit
- event: NotifyReward(indexed address,address,indexed address,uint256)
handler: handleNotifyReward
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: VeTokenLocked(indexed address,indexed address,uint256)
handler: handleVeTokenLocked
- event: VeTokenUnlocked(indexed address,indexed address,uint256)
handler: handleVeTokenUnlocked
- event: Withdraw(indexed address,indexed address,uint256,bool,uint256)
handler: handleWithdraw
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: AddStakingToken(address)
handler: handleAddStakingToken
- name: TetuVoterTemplate
kind: ethereum/contract
network: matic
source:
abi: TetuVoterAbi
mapping:
file: ./src/tetu-voter.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- TetuVoterEntity
abis:
- name: TetuVoterAbi
file: ./abis/TetuVoter.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: MultiBribeAbi
file: ./abis/MultiBribe.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: VeTetuAbi
file: ./abis/VeTetu.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: Abstained(uint256,int256,address)
handler: handleAbstained
- event: DistributeReward(indexed address,indexed address,uint256)
handler: handleDistributeReward
- event: NotifyReward(indexed address,uint256)
handler: handleNotifyReward
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: Voted(indexed address,uint256,int256,address,int256,int256)
handler: handleVoted
- event: Upgraded(indexed address)
handler: handleUpgraded
- name: VeTetuTemplate
kind: ethereum/contract
network: matic
source:
abi: VeTetuAbi
mapping:
file: ./src/ve.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- VeTetuEntity
abis:
- name: VeTetuAbi
file: ./abis/VeTetu.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: Deposit(indexed address,indexed address,uint256,uint256,indexed
uint256,uint8,uint256)
handler: handleDeposit
- event: TransferWhitelisted(address)
handler: handleTransferWhitelisted
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
- event: Withdraw(indexed address,indexed address,uint256,uint256,uint256)
handler: handleWithdraw
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: Merged(indexed address,indexed address,uint256,uint256)
handler: handleMerged
- event: Split(uint256,uint256,uint256)
handler: handleSplit
- name: ForwarderTemplate
kind: ethereum/contract
network: matic
source:
abi: ForwarderAbi
mapping:
file: ./src/forwarder.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ForwarderEntity
abis:
- name: ForwarderAbi
file: ./abis/ForwarderV3.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ControllerAbi
file: ./abis/ControllerV2.json
- name: InvestFundAbi
file: ./abis/InvestFundV2.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: Distributed(address,address,uint256,uint256,uint256,uint256,uint256,uint256)
handler: handleDistributed
- event: GaugeRatioChanged(uint256,uint256)
handler: handleGaugeRatioChanged
- event: InvestFundRatioChanged(uint256,uint256)
handler: handleInvestFundRatioChanged
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: SlippageChanged(address,uint256)
handler: handleSlippageChanged
- event: TetuThresholdChanged(uint256,uint256)
handler: handleTetuThresholdChanged
- event: Upgraded(indexed address)
handler: handleUpgraded
- name: InvestFundTemplate
kind: ethereum/contract
network: matic
source:
abi: InvestFundAbi
mapping:
file: ./src/invest-fund.ts
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- InvestFundEntity
abis:
- name: InvestFundAbi
file: ./abis/InvestFundV2.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: FundDeposit(indexed address,uint256)
handler: handleFundDeposit
- event: FundWithdrawn(indexed address,uint256)
handler: handleFundWithdrawn
- name: VaultTemplate
kind: ethereum/contract
network: matic
source:
abi: VaultAbi
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/vault.ts
entities:
- VaultEntity
- InsuranceEntity
- VaultApproveEntity
- UserVault
abis:
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: InsuranceAbi
file: ./abis/VaultInsurance.json
- name: ControllerAbi
file: ./abis/ControllerV2.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: Approval(indexed address,indexed address,uint256)
handler: handleApproval
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: BufferChanged(uint256,uint256)
handler: handleBufferChanged
- event: DoHardWorkOnInvestChanged(bool,bool)
handler: handleDoHardWorkOnInvestChanged
- event: FeeChanged(uint256,uint256)
handler: handleFeeChanged
- event: FeeTransfer(uint256)
handler: handleFeeTransfer
- event: LossCovered(uint256)
handler: handleLossCovered
- event: MaxDepositChanged(uint256,uint256)
handler: handleMaxDepositChanged
- event: MaxWithdrawChanged(uint256,uint256)
handler: handleMaxWithdrawChanged
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: WithdrawRequestBlocks(uint256)
handler: handleWithdrawRequestBlocks
- name: StrategySplitterTemplate
kind: ethereum/contract
network: matic
source:
abi: StrategySplitterAbi
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/splitter.ts
entities:
- SplitterEntity
abis:
- name: StrategySplitterAbi
file: ./abis/StrategySplitterV2.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ControllerAbi
file: ./abis/ControllerV2.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: StrategyAbi
file: ./abis/StrategyBaseV3.json
- name: ProxyAbi
file: ./abis/Proxy.json
- name: ForwarderAbi
file: ./abis/ForwarderV3.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
eventHandlers:
- event: ContinueInvesting(address,uint256,address)
handler: handleContinueInvesting
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: HardWork(address,address,uint256,uint256,uint256,uint256,uint256)
handler: handleHardWork
- event: ManualAprChanged(address,address,uint256,uint256)
handler: handleManualAprChanged
- event: Paused(address,address)
handler: handlePaused
- event: Rebalance(address,address,uint256,uint256,uint256,uint256)
handler: handleRebalance
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: StrategyAdded(address,uint256)
handler: handleStrategyAdded
- event: StrategyRemoved(address)
handler: handleStrategyRemoved
- event: StrategyScheduled(address,uint256,uint256)
handler: handleStrategyScheduled
- event: ScheduledStrategyRemove(address)
handler: handleScheduledStrategyRemove
- event: Loss(address,uint256)
handler: handleLoss
- event: Invested(address,uint256)
handler: handleInvested
- event: WithdrawFromStrategy(address)
handler: handleWithdrawFromStrategy
- event: SetStrategyCapacity(address,uint256)
handler: handleSetStrategyCapacity
- name: StrategyTemplate
kind: ethereum/contract
network: matic
source:
abi: StrategyAbi
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/strategy.ts
entities:
- StrategyEntity
abis:
- name: StrategyAbi
file: ./abis/StrategyBundle.json
- name: VaultAbi
file: ./abis/TetuVaultV2.json
- name: ForwarderAbi
file: ./abis/ForwarderV3.json
- name: StrategySplitterAbi
file: ./abis/StrategySplitterV2.json
- name: LiquidatorAbi
file: ./abis/TetuLiquidator.json
- name: PriceCalculatorAbi
file: ./abis/PriceCalculator.json
- name: IPairStrategyAbi
file: ./abis/IPairStrategy.json
eventHandlers:
- event: Upgraded(indexed address)
handler: handleUpgraded
- event: CompoundRatioChanged(uint256,uint256)
handler: handleCompoundRatioChanged
- event: EmergencyExit(address,uint256)
handler: handleEmergencyExit
- event: RevisionIncreased(uint256,address)
handler: handleRevisionIncreased
- event: WithdrawAllToSplitter(uint256)
handler: handleWithdrawAllToSplitter
- event: WithdrawToSplitter(uint256,uint256,uint256)
handler: handleWithdrawToSplitter
- event: StrategySpecificNameChanged(string)
handler: handleStrategySpecificNameChanged
- event: AlgebraFeesClaimed(uint256,uint256)
handler: handleAlgebraFeesClaimed
- event: KyberFeesClaimed(uint256,uint256)
handler: handleKyberFeesClaimed
- event: UniV3FeesClaimed(uint256,uint256)
handler: handleUniV3FeesClaimed
- event: AlgebraRewardsClaimed(uint256,uint256)
handler: handleAlgebraRewardsClaimed
- event: KyberRewardsClaimed(uint256)
handler: handleKyberRewardsClaimed
- event: Rebalanced(uint256,uint256,uint256)
handler: handleRebalanced
- event: RebalancedDebt(uint256,uint256,uint256)
handler: handleRebalancedDebt
- event: FixPriceChanges(uint256,uint256)
handler: handleFixPriceChanges
- event: UncoveredLoss(uint256,uint256,uint256,uint256)
handler: handleLUncoveredLoss