forked from reflexer-labs/geb-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 1
/
subgraph.template.yaml
873 lines (835 loc) · 31 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
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
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
specVersion: 0.0.2
description: The Graph protocol subgraph for GEB
repository: https://github.com/reflexer-labs/geb-subgraph
schema:
file: ./schema.graphql
dataSources:
- name: SAFEEngine
kind: ethereum/contract
network: {{NETWORK}}
source:
address: '{{GEB_SAFE_ENGINE}}'
abi: SAFEEngine
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/core/safe-engine.ts
entities:
- CollateralType
- SystemState
- Safe
- HourlyStats
- DailyStats
abis:
- name: SAFEEngine
file: ./abis/SAFEEngine.json
# These 2 contract are needed by the periodic handler
- name: UniswapV3Pool
file: ./abis/UniswapV3Pool.json
- name: EACAggregatorProxy
file: ./abis/EACAggregatorProxy.json
- name: OracleRelayer
file: ./abis/OracleRelayer.json
eventHandlers:
- event: InitializeCollateralType(bytes32)
handler: handleInitializeCollateralType
- event: ModifyParameters(indexed bytes32,indexed bytes32,bytes)
handler: handleModifyParameters
# - event: ModifyCollateralBalance(bytes32,address,int256)
# handler: handleModifyCollateralBalance
- event: TransferCollateral(indexed bytes32,indexed address,indexed address,uint256)
handler: handleTransferCollateral
- event: TransferInternalCoins(indexed address,indexed address,uint256)
handler: handleTransferInternalCoins
- event: ModifySAFECollateralization(indexed bytes32,indexed address,address,address,int256,int256)
handler: handleModifySAFECollateralization
- event: TransferSAFECollateralAndDebt(indexed bytes32,indexed address,indexed address,int256,int256)
handler: handleTransferSAFECollateralAndDebt
- event: ConfiscateSAFECollateralAndDebt(indexed bytes32,indexed address,address,address,int256,int256)
handler: handleConfiscateSAFECollateralAndDebt
- event: SettleDebt(indexed address,uint256)
handler: handleSettleDebt
- event: CreateUnbackedDebt(indexed address,indexed address,uint256)
handler: handleCreateUnbackedDebt
- event: UpdateAccumulatedRate(indexed bytes32,address,int256)
handler: handleUpdateAccumulatedRate
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
- name: GebSafeManager
kind: ethereum/contract
network: {{NETWORK}}
source:
address: '{{SAFE_MANAGER}}'
abi: GebSafeManager
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/proxy/safe-manager.ts
entities:
- CollateralType
- SystemState
- Safe
abis:
- name: GebSafeManager
file: ./abis/GebSafeManager.json
eventHandlers:
- event: OpenSAFE(indexed address,indexed address,indexed uint256)
handler: handleOpenSAFE
- event: TransferSAFEOwnership(indexed address,indexed uint256,address)
handler: handleTransferSAFEOwnership
- event: AllowSAFE(indexed address,indexed uint256,address,bool)
handler: handleAllowSAFE
- event: AllowHandler(indexed address,address,bool)
handler: handleAllowHandler
# Other events in SAFEManager are handled by SAFEEngine
- name: OracleRelayer
kind: ethereum/contract
network: {{NETWORK}}
source:
address: '{{GEB_ORACLE_RELAYER}}'
abi: OracleRelayer
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/core/oracle-relayer.ts
entities:
- CollateralType
- SystemState
- Safe
- RedemptionPrice
abis:
- name: OracleRelayer
file: ./abis/OracleRelayer.json
- name: RateSetter
file: ./abis/RateSetter.json
eventHandlers:
- event: UpdateCollateralPrice(indexed bytes32,uint256,uint256,uint256)
handler: handleUpdateCollateralPrice
- event: UpdateRedemptionPrice(uint256)
handler: handleUpdateRedemptionPrice
- event: ModifyParameters(indexed bytes32,indexed bytes32,bytes)
handler: handleModifyParameters
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
- event: InitializeCollateralType(bytes32)
handler: handleInitializeCollateralType
- name: TaxCollector
kind: ethereum/contract
network: {{NETWORK}}
source:
address: '{{GEB_TAX_COLLECTOR}}'
abi: TaxCollector
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/core/tax-collector.ts
entities:
- CollateralType
- SystemState
abis:
- name: TaxCollector
file: ./abis/TaxCollector.json
- name: RateSetter
file: ./abis/RateSetter.json
eventHandlers:
- event: ModifyParameters(indexed bytes32,indexed bytes32,bytes)
handler: handleModifyParameters
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
- event: InitializeCollateralType(bytes32)
handler: handleInitializeCollateralType
# Remaining events
# - event: AddSecondaryReceiver(bytes32,uint256,uint256,uint256,uint256)
# handle: handleAddSecondaryReceiver
# - event: CollectTax(bytes32,uint256,int256)
# handle: handleCollectTax
# - event: DistributeTax(bytes32,address,int256)
# handle: handleDistributeTax
# - event: ModifyParameters(bytes32,address)
# handle: handleModifyParameters
# - event: ModifyParameters(bytes32,uint256,uint256)
# handle: handleModifyParameters
# - event: ModifyParameters(bytes32,uint256,uint256,address)
# handle: handleModifyParameters
# - event: ModifySecondaryReceiver(bytes32,uint256,uint256,uint256,uint256)
# handle: handleModifySecondaryReceiver
- name: LiquidationEngine
kind: ethereum/contract
network: {{NETWORK}}
source:
address: '{{GEB_LIQUIDATION_ENGINE}}'
abi: LiquidationEngine
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/core/liquidation-engine.ts
entities:
- CollateralType
- CollateralAuction
- EnglishAuctionConfiguration
- FixedDiscountAuctionConfiguration
abis:
- name: LiquidationEngine
file: ./abis/LiquidationEngine.json
- name: FixedDiscountCollateralAuctionHouse
file: ./abis/FixedDiscountCollateralAuctionHouse.json
eventHandlers:
- event: Liquidate(indexed bytes32,indexed address,uint256,uint256,uint256,address,uint256)
handler: handleLiquidate
- event: ModifyParameters(indexed bytes32,indexed bytes32,bytes)
handler: handleModifyParameters
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
- event: ConnectSAFESaviour(address)
handler: handleConnectSAFESaviour
- event: DisconnectSAFESaviour(address)
handler: handleDisconnectSAFESaviour
- event: ProtectSAFE(indexed bytes32,indexed address,address)
handler: handleProtectSAFE
- event: InitializeCollateralType(bytes32)
handler: handleInitializeCollateralType
# Remaining events:
# - event: DisableContract()
# handler: handleDisableContract
# - event: SaveSAFE(indexed bytes32,indexed address,uint256)
# handler: handleSaveSAFE
# - event: FailedSAFESave(bytes)
# handler: handleFailedSAFESave
- name: AccountingEngine
kind: ethereum/contract
network: {{NETWORK}}
source:
address: '{{GEB_ACCOUNTING_ENGINE}}'
abi: AccountingEngine
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/core/accounting-engine.ts
entities:
- SystemState
- EnglishAuctionConfiguration
- AccountingEngine
- EnglishAuction
abis:
- name: AccountingEngine
file: ./abis/AccountingEngine.json
- name: DebtAuctionHouse
file: ./abis/DebtAuctionHouse.json
- name: SurplusAuctionHouse
file: ./abis/BurningSurplusAuctionHouse.json
eventHandlers:
- event: ModifyParameters(indexed bytes32,indexed bytes32,bytes)
handler: handleModifyParameters
- event: AuctionDebt(indexed uint256,uint256,uint256)
handler: handleAuctionDebt
- event: AuctionSurplus(indexed uint256,uint256,uint256)
handler: handleAuctionSurplus
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
# Remaining events:
# - event: CancelAuctionedDebtWithSurplus(uint256,uint256,uint256,uint256)
# handler: handleCancelAuctionedDebtWithSurplus
# - event: DisableContract(uint256,uint256,uint256,uint256)
# handler: handleDisableContract
# - event: PopDebtFromQueue(uint256,uint256,uint256)
# handler: handlePopDebtFromQueue
# - event: PushDebtToQueue(uint256,uint256,uint256)
# handler: handlePushDebtToQueue
# - event: SettleDebt(uint256,uint256,uint256)
# handler: handleSettleDebt
# - event: TransferPostSettlementSurplus(address,uint256,uint256)
# handler: handleTransferPostSettlementSurplus
- name: ProxyFactory
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: HaiProxyFactory
address: '{{PROXY_FACTORY}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
# Use this instead of the above for dev (faster sync but not all proxies available)
# startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/proxy/proxy-factory.ts
entities:
- UserProxy
abis:
- name: HaiProxyFactory
file: ./abis/HaiProxyFactory.json
eventHandlers:
- event: Created(indexed address,indexed address,address)
handler: handleCreated
- name: CoinJoin
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: CoinJoin
address: '{{GEB_COIN_JOIN}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/token/coin-join.ts
entities:
- CoinJoin
abis:
- name: CoinJoin
file: ./abis/CoinJoin.json
eventHandlers:
- event: Exit(address,address,uint256)
handler: handleExit
- event: Join(address,address,uint256)
handler: handleJoin
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
# - event: DisableContract()
# handler: handleDisableContract
# - name: EthAJoin
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: BasicCollateralJoin
# address: '{{GEB_JOIN_ETH_A}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/token/collateral-join.ts
# entities:
# - CollateralJoin
# abis:
# - name: BasicCollateralJoin
# file: ./abis/BasicCollateralJoin.json
# eventHandlers:
# - event: Exit(address,address,uint256)
# handler: handleExit
# - event: Join(address,address,uint256)
# handler: handleJoin
# - event: AddAuthorization(address)
# handler: handleAddAuthorization
# - event: RemoveAuthorization(address)
# handler: handleRemoveAuthorization
# - event: DisableContract()
# handler: handleDisableContract
- name: Coin
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: Coin
address: '{{GEB_COIN}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/token/coin.ts
entities:
- ERC20Balance
- ERC20Transfer
- ERC20Allowance
abis:
- name: Coin
file: ./abis/Coin.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: Approval(indexed address,indexed address,uint256)
handler: handleApproval
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
# - name: ProtestPause
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: DSProtestPause
# address: '{{GEB_PAUSE}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/governance/ds-protest-pause.ts
# entities:
# - DsPauseScheduledTransaction
# abis:
# - name: DSProtestPause
# file: ./abis/DSProtestPause.json
# eventHandlers:
# - event: ScheduleTransaction(address,address,bytes32,bytes,uint256)
# handler: handleScheduleTransaction
# - event: AttachTransactionDescription(address,address,bytes32,bytes,uint256,string)
# handler: handleAttachTransactionDescription
# - event: ExecuteTransaction(address,address,bytes32,bytes,uint256)
# handler: handleExecuteTransaction
# - event: AbandonTransaction(address,address,bytes32,bytes,uint256)
# handler: handleAbandonTransaction
# - event: ChangeDelayMultiplier(uint256)
# handler: handleChangeDelayMultiplier
# - event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,uint256,bytes)
# handler: handleLogNote
# - event: LogSetAuthority(indexed address)
# handler: handleLogSetAuthority
# - event: LogSetOwner(indexed address)
# handler: handleLogSetOwner
# - event: ProtestAgainstTransaction(address,address,bytes32,bytes,uint256)
# handler: handleProtestAgainstTransaction
# - event: SetDelay(uint256)
# handler: handleSetDelay
# - event: SetProtester(address)
# handler: handleSetProtester
# - name: EthOsm
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: Osm
# address: '{{FEED_SECURITY_MODULE_ETH}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/oracles/fsm.ts
# entities:
# - FSMUpdate
# abis:
# - name: Osm
# file: ./abis/OSM.json
# eventHandlers:
# - event: UpdateResult(uint256,uint256)
# handler: handleUpdateResult
# - event: AddAuthorization(address)
# handler: handleAddAuthorization
# - event: RemoveAuthorization(address)
# handler: handleRemoveAuthorization
# - event: ChangeDelay(uint16)
# handler: handleChangeDelay
# - event: ChangePriceSource(address)
# handler: handleChangePriceSource
# - event: RestartValue()
# handler: handleRestartValue
# - event: Start()
# handler: handleStart
# - event: Stop()
# handler: handleStop
# - name: CoinTwap
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: CoinTwap
# address: '{{MEDIANIZER_RAI}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/oracles/coinTwap.ts
# entities:
# - MedianizerUpdate
# abis:
# - name: CoinTwap
# file: ./abis/ChainlinkTWAP.json
# - name: UniswapV2Pair
# file: ./abis/UniswapV2Pair.json
# - name: EACAggregatorProxy
# file: ./abis/EACAggregatorProxy.json
# eventHandlers:
# - event: UpdateResult(uint256)
# handler: handleUpdateResult
# - event: AddAuthorization(address)
# handler: handleAddAuthorization
# - event: RemoveAuthorization(address)
# handler: handleRemoveAuthorization
# - event: FailRewardCaller(bytes,address,uint256)
# handler: handleFailRewardCaller
# - event: ModifyParameters(bytes32,uint256)
# handler: handleModifyParameters
# - event: RewardCaller(address,uint256)
# handler: handleRewardCaller
- name: GlobalSettlement
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: GlobalSettlement
address: '{{GEB_GLOBAL_SETTLEMENT}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/core/global-settlement.ts
entities:
- GebAuthorization
abis:
- name: GlobalSettlement
file: ./abis/GlobalSettlement.json
eventHandlers:
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
- name: StabilityFeeTreasury
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: StabilityFeeTreasury
address: '{{GEB_STABILITY_FEE_TREASURY}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/core/stability-fee-treasury.ts
entities:
- GebAuthorization
abis:
- name: StabilityFeeTreasury
file: ./abis/StabilityFeeTreasury.json
eventHandlers:
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
# - name: ProtocolTokenAuthority
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: ProtocolTokenAuthority
# address: '{{PROTOCOL_TOKEN_AUTHORITY}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/governance/protocol-token-authority.ts
# entities:
# - GebAuthorization
# abis:
# - name: ProtocolTokenAuthority
# file: ./abis/ProtocolTokenAuthority.json
# eventHandlers:
# - event: AddAuthorization(indexed address)
# handler: handleAddAuthorization
# - event: RemoveAuthorization(indexed address)
# handler: handleRemoveAuthorization
# - event: SetOwner(indexed address)
# handler: handleSetOwner
# - event: SetRoot(indexed address)
# handler: handleSetRoot
# - name: ProtToken
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: DSToken
# address: '{{GEB_PROT}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/token/prot-token.ts
# entities:
# - ERC20Balance
# abis:
# - name: DSToken
# file: ./abis/DSToken.json
# - name: ERC20
# file: ./abis/ERC20.json
# eventHandlers:
# - event: Transfer(indexed address,indexed address,uint256)
# handler: handleTransfer
# - event: Approval(indexed address,indexed address,uint256)
# handler: handleApproval
# - event: Mint(indexed address,uint256)
# handler: handleMint
# - event: Burn(indexed address,uint256)
# handler: handleBurn
- name: UniCoinPool
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: UniswapV3Pool
address: '{{GEB_COIN_UNISWAP_POOL}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/uniswap/uniswapv3.ts
entities:
- UniswapV3Pool
abis:
- name: UniswapV3Pool
file: ./abis/UniswapV3Pool.json
eventHandlers:
- event: Swap(indexed address,indexed address,int256,int256,uint160,uint128,int24)
handler: handleSwap
- event: Initialize(uint160,int24)
handler: handleInitialize
# - event: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256)
# handler: handleMint
# - event: Burn(indexed address,indexed int24,indexed int24,uint128,uint256,uint256)
# handler: handleBurn
# - name: UniCoinPool
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: UniswapV2Pair
# address: '{{GEB_COIN_UNISWAP_POOL}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/uniswap/uniswap.ts
# entities:
# - UniswapV2Pair
# abis:
# - name: UniswapV2Pair
# file: ./abis/UniswapV2Pair.json
# - name: ERC20
# file: ./abis/ERC20.json
# eventHandlers:
# - event: Sync(uint112,uint112)
# handler: handleSync
# - event: Swap(indexed address,uint256,uint256,uint256,uint256,indexed address)
# handler: handleSwap
# - event: Transfer(indexed address,indexed address,uint256)
# handler: handleTransfer
# - event: Approval(indexed address,indexed address,uint256)
# handler: handleApproval
# - event: Mint(indexed address,uint256,uint256)
# handler: handleMint
# - event: Burn(indexed address,uint256,uint256,indexed address)
# handler: handleBurn
- name: SurplusAuctionHouse
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: SurplusAuctionHouse
address: '{{GEB_SURPLUS_AUCTION_HOUSE}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/auctions/surplus-auction-houses.ts
entities:
- EnglishAuction
- EnglishAuctionBid
abis:
- name: SurplusAuctionHouse
file: ./abis/BurningSurplusAuctionHouse.json
eventHandlers:
- event: ModifyParameters(indexed bytes32,indexed bytes32,bytes)
handler: handleModifyParameters
- event: IncreaseBidSize(indexed uint256,address,uint256,uint256,uint256,uint256)
handler: handleIncreaseBidSize
- event: RestartAuction(indexed uint256,uint256,uint256)
handler: handleRestartAuction
- event: SettleAuction(indexed uint256,uint256,address,uint256)
handler: handleSettleAuction
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
# Remaining events:
# - event: DisableContract()
# handler: handleDisableContract
# - event: StartAuction(uint256,uint256,uint256,uint256,uint256)
# handler: handleStartAuction
# - event: TerminateAuctionPrematurely(uint256,address,address,uint256)
# handler: handleTerminateAuctionPrematurely
- name: DebtAuctionHouse
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: DebtAuctionHouse
address: '{{GEB_DEBT_AUCTION_HOUSE}}'
startBlock: {{STARTING_BLOCK_NUMBER}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/auctions/debt-auction-house.ts
entities:
- CollateralType
- DiscountAuctionBatch
- FixedDiscountAuctionConfiguration
- DiscountAuctionBatch
abis:
- name: DebtAuctionHouse
file: ./abis/DebtAuctionHouse.json
eventHandlers:
- event: ModifyParameters(indexed bytes32,indexed bytes32,bytes)
handler: handleModifyParameters
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
- event: DecreaseSoldAmount(indexed uint256,address,uint256,uint256,uint256,uint256)
handler: handleDecreaseSoldAmount
- event: RestartAuction(indexed uint256,uint256,uint256)
handler: handleRestartAuction
- event: SettleAuction(indexed uint256,uint256,address,uint256)
handler: handleSettleAuction
# Remaining events:
# - event: ModifyParameters(bytes32,address)
# handler: handleModifyParametersAddress
# - event: DisableContract(address)
# handler: handleDisableContract
# - event: StartAuction(uint256,uint256,uint256,uint256,indexed address,uint256,uint256)
# handler: handleStartAuction
# - event: TerminateAuctionPrematurely(uint256,address,address,uint256,uint256)
# handler: handleTerminateAuctionPrematurely
# - name: StakedTokenAuctionHouse
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: StakedTokenAuctionHouse
# address: '{{GEB_STAKING_AUCTION_HOUSE}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/auctions/staked-tokens-auction-houses.ts
# entities:
# - EnglishAuction
# - EnglishAuctionBid
# abis:
# - name: StakedTokenAuctionHouse
# file: ./abis/StakedTokenAuctionHouse.json
# eventHandlers:
# - event: ModifyParameters(bytes32,uint256)
# handler: handleModifyParameters
# - event: StartAuction(indexed uint256,uint256,uint256,uint256,indexed address,indexed uint256,uint256)
# handler: handleStartAuction
# - event: IncreaseBidSize(uint256,address,uint256,uint256,uint256)
# handler: handleIncreaseBidSize
# - event: RestartAuction(indexed uint256,uint256,uint256)
# handler: handleRestartAuction
# - event: SettleAuction(indexed uint256,uint256)
# handler: handleSettleAuction
# - event: AddAuthorization(address)
# handler: handleAddAuthorization
# - event: RemoveAuthorization(address)
# handler: handleRemoveAuthorization
# - name: StakingRewardsFactory
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: StakingRewardsFactory
# address: '{{GEB_INCENTIVES_MINER}}'
# startBlock: {{STARTING_BLOCK_NUMBER}}
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/incentive/incentive-factory.ts
# entities:
# - IncentiveBalance
# - IncentiveCampaign
# abis:
# - name: StakingRewardsFactory
# file: ./abis/StakingRewardsFactory.json
# eventHandlers:
# - event: Deploy(indexed address,indexed uint256,uint256,uint256)
# handler: handleDeploy
# - event: AddAuthorization(address)
# handler: handleAddAuthorization
# - event: RemoveAuthorization(address)
# handler: handleRemoveAuthorization
# - event: ModifyParameters(indexed uint256,bytes32,uint256)
# handler: handleModifyParameters
# - event: NotifyRewardAmount(indexed uint256,uint256)
# handler: handleNotifyRewardAmount
templates:
- name: FixedDiscountCollateralAuctionHouse
kind: ethereum/contract
network: {{NETWORK}}
source:
abi: FixedDiscountCollateralAuctionHouse
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/modules/auctions/discount-collateral-auction-house.ts
entities:
- CollateralType
- DiscountAuctionBatch
- FixedDiscountAuctionConfiguration
- DiscountAuctionBatch
abis:
- name: FixedDiscountCollateralAuctionHouse
file: ./abis/FixedDiscountCollateralAuctionHouse.json
eventHandlers:
- event: BuyCollateral(indexed uint256,uint256,uint256)
handler: handleBuyCollateral
- event: SettleAuction(indexed uint256,uint256)
handler: handleSettleAuction
- event: AddAuthorization(address)
handler: handleAddAuthorization
- event: RemoveAuthorization(address)
handler: handleRemoveAuthorization
# Remaining events:
# - event: StartAuction(uint256,uint256,uint256,uint256,uint256,indexed address,indexed address,uint256)
# handler: handleStartAuction
# - event: TerminateAuctionPrematurely(uint256,address,uint256)
# handler: handleTerminateAuctionPrematurely
# - name: StakingRewards
# kind: ethereum/contract
# network: {{NETWORK}}
# source:
# abi: StakingRewards
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.5
# language: wasm/assemblyscript
# file: ./src/mappings/modules/incentive/incentive.ts
# entities:
# - IncentiveBalance
# - IncentiveCampaign
# abis:
# - name: StakingRewards
# file: ./abis/StakingRewards.json
# eventHandlers:
# - event: RewardAdded(uint256)
# handler: handleRewardAdded
# - event: RewardPaid(indexed address,uint256)
# handler: handleRewardPaid
# - event: Staked(indexed address,uint256)
# handler: handleStaked
# - event: Withdrawn(indexed address,uint256)
# handler: handleWithdrawn