forked from zarbanio/subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubgraph.yaml
executable file
·443 lines (429 loc) · 13.6 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
specVersion: 1.0.0
indexerHints:
prune: auto
schema:
file: ./schema.graphql
dataSources:
# Liquidity Market Contracts
- kind: ethereum
name: LendingPoolAddressesProvider
network: arbitrum-one
source:
address: "0x11804AC1d57B8b703AEDDCcE3dDB54844d123632"
abi: LendingPoolAddressesProvider
startBlock: 160749055
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Protocol
abis:
- name: LendingPoolAddressesProvider
file: ./abis/LendingPoolAddressesProvider.json
eventHandlers:
- event: PriceOracleUpdated(indexed address)
handler: handlePriceOracleUpdated
file: ./src/mapping.ts
- kind: ethereum
name: LendingPool
network: arbitrum-one
source:
address: "0xC62545B7f466317b014773D1C605cA0D0931B0Fd"
abi: LendingPool
startBlock: 160751671
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Market
- Deposit
- Withdraw
- Repay
- Borrow
- Liquidate
abis:
- name: ZarbanIncentivesController
file: ./abis/ZarbanIncentivesController.json
- name: StakedZarban
file: ./abis/StakedZarban.json
- name: ZToken
file: ./abis/ZToken.json
- name: VariableDebtToken
file: ./abis/VariableDebtToken.json
- name: StableDebtToken
file: ./abis/StableDebtToken.json
- name: LendingPool
file: ./abis/LendingPool.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20NameBytes
file: ./abis/ERC20NameBytes.json
- name: ERC20SymbolBytes
file: ./abis/ERC20SymbolBytes.json
- name: IPriceOracleGetter
file: ./abis/IPriceOracleGetter.json
eventHandlers:
- event: Deposit(indexed address,address,indexed address,uint256,indexed uint16)
handler: handleDeposit
- event: Withdraw(indexed address,indexed address,indexed address,uint256)
handler: handleWithdraw
- event: Borrow(indexed address,address,indexed address,uint256,uint256,uint256,indexed uint16)
handler: handleBorrow
- event: Repay(indexed address,indexed address,indexed address,uint256)
handler: handleRepay
receipt: true
- event: Swap(indexed address,indexed address,uint256)
handler: handleSwapBorrowRateMode
- event: LiquidationCall(indexed address,indexed address,indexed address,uint256,uint256,address,bool)
handler: handleLiquidationCall
- event: ReserveDataUpdated(indexed address,uint256,uint256,uint256,uint256,uint256)
handler: handleReserveDataUpdated
- event: ReserveUsedAsCollateralEnabled(indexed address,indexed address)
handler: handleReserveUsedAsCollateralEnabled
- event: ReserveUsedAsCollateralDisabled(indexed address,indexed address)
handler: handleReserveUsedAsCollateralDisabled
- event: Paused()
handler: handlePaused
- event: Unpaused()
handler: handleUnpaused
- event: FlashLoan(indexed address,indexed address,indexed address,uint256,uint256,uint16)
handler: handleFlashloan
file: ./src/mapping.ts
- kind: ethereum
name: LendingPoolConfigurator
network: arbitrum-one
source:
address: "0x70c979a7930D94D1E06EF12dd72d8232f748bb78"
abi: LendingPoolConfigurator
startBlock: 160753996
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Market
abis:
- name: ZToken
file: ./abis/ZToken.json
- name: LendingPoolConfigurator
file: ./abis/LendingPoolConfigurator.json
- name: LendingPool
file: ./abis/LendingPool.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20NameBytes
file: ./abis/ERC20NameBytes.json
- name: ERC20SymbolBytes
file: ./abis/ERC20SymbolBytes.json
eventHandlers:
- event: ReserveInitialized(indexed address,indexed address,address,address,address)
handler: handleReserveInitialized
- event: CollateralConfigurationChanged(indexed address,uint256,uint256,uint256)
handler: handleCollateralConfigurationChanged
- event: BorrowingEnabledOnReserve(indexed address,bool)
handler: handleBorrowingEnabledOnReserve
- event: BorrowingDisabledOnReserve(indexed address)
handler: handleBorrowingDisabledOnReserve
- event: ReserveActivated(indexed address)
handler: handleReserveActivated
- event: ReserveDeactivated(indexed address)
handler: handleReserveDeactivated
- event: ReserveFactorChanged(indexed address,uint256)
handler: handleReserveFactorChanged
file: ./src/mapping.ts
# Stablecoin system Contracts
- name: Vat
kind: ethereum
network: arbitrum-one
source:
abi: Vat
address: "0x975Eb113D580c44aa5676370E2CdF8f56bf3F99F"
startBlock: 77669795
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
abis:
- name: Vat
file: ./abis/Vat.json
- name: Spot
file: ./abis/Spot.json
- name: Dog
file: ./abis/Dog.json
- name: Jug
file: ./abis/Jug.json
- name: GemJoin
file: ./abis/GemJoin.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20NameBytes
file: ./abis/ERC20NameBytes.json
- name: ERC20SymbolBytes
file: ./abis/ERC20SymbolBytes.json
- name: ZAR
file: ./abis/ZAR.json
- name: Pip
file: ./abis/Pip.json
entities:
- Market
- Token
eventHandlers:
# function rely(address usr)
# 0x65fae35e00000000000000000000000000000000000000000000000000000000
- event: Rely(indexed address)
handler: handleVatRely
# function cage()
- event: Cage()
handler: handleVatCage
### CDP Manipulation ###
# function frob(bytes32 i, address u, address v, address w, int256 dink, int256 dart)
- event: Frob(bytes32,indexed address,indexed address,indexed address,int256,int256)
handler: handleVatFrob
### CDP Confiscation
# function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart)
- event: Grab(bytes32,indexed address,indexed address,indexed address,int256,int256)
handler: handleVatGrab
receipt: true
# function fork( bytes32 ilk, address src, address dst, int256 dink, int256 dart)
- event: Fork(indexed bytes32,indexed address,indexed address,int256,int256)
handler: handleVatFork
### Collect stability fee ###
# function fold(bytes32 i, address u, int256 rate)
- event: Fold(indexed bytes32,indexed address,indexed int256)
handler:
handleVatFold
### Update collateral data ###
# function file(bytes32 ilk, bytes32 what, uint256 data)
- event: File(indexed bytes32,indexed bytes32,indexed uint256)
handler: handleVatFile
# Borrow rate
- name: Jug
kind: ethereum
network: arbitrum-one
source:
abi: Jug
address: "0xE959bfe924A175Cd7348b7435D33620ceDcfD7cC"
startBlock: 77669842
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
abis:
- name: Jug
file: ./abis/Jug.json
- name: ZAR
file: ./abis/ZAR.json
entities:
- Market
eventHandlers:
### Change borrow interest rate ###
# function file(bytes32 ilk, bytes32 what, uint256 data)
- event: File(indexed bytes32,indexed bytes32,indexed uint256)
handler: handleJugFileDuty
# Liaison between the oracles and core contracts
- name: Spot
kind: ethereum
network: arbitrum-one
source:
abi: Spot
address: "0xcAc6896D91A21c502e92D77c6d54455594D2eB22"
startBlock: 77669795
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
abis:
- name: Spot
file: ./abis/Spot.json
- name: ZAR
file: ./abis/ZAR.json
- name: IPriceOracleGetter
file: ./abis/IPriceOracleGetter.json
entities:
- _Ilk
- LendingProtocol
eventHandlers:
### Setting mat & par (ltv ratio) ###
# file(bytes32 ilk, bytes32 what, uint256 data)
- event: File(indexed bytes32,indexed bytes32,uint256)
handler: handleSpotFileMat
# file(bytes32 what, uint256 data)
- event: File(bytes32,uint256)
handler: handleSpotFilePar
### Update price ###
# event Poke(bytes32 ilk, bytes32 val, uint256 spot)
- event: Poke(bytes32,bytes32,uint256)
handler: handleSpotPoke
- name: Dog
kind: ethereum
network: arbitrum-one
source:
abi: Dog
address: "0x4eB5a223B2c797Dcc13297B3C002225b1770d837"
startBlock: 77669898
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
abis:
- name: Vat
file: ./abis/Vat.json
- name: Dog
file: ./abis/Dog.json
- name: ZAR
file: ./abis/ZAR.json
entities:
- Market
- Token
eventHandlers:
# flag loan for liquidation
- event: Bark(indexed bytes32,indexed address,uint256,uint256,uint256,address,indexed uint256)
handler: handleDogBark
# set liquidation penalty
# function file(bytes32 ilk, bytes32 what, uint256 data)
- event: File(indexed bytes32,indexed bytes32,uint256)
handler: handleDogFile
# User may interact w/ maker contracts via cdpmanger
- name: CdpManager
kind: ethereum
network: arbitrum-one
source:
abi: CdpManager
address: "0xe1063E05f94BeCAA1cACc917D0Dd19F6b2f3CB8a"
startBlock: 77672144
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
abis:
- name: CdpManager
file: ./abis/CdpManager.json
- name: ZAR
file: ./abis/ZAR.json
- name: Vat
file: ./abis/Vat.json
entities:
- _Proxy
eventHandlers:
- event: NewCdp(indexed address,indexed address,indexed uint256)
handler: handleNewCdp
templates:
# Liquidity Market templates
- kind: ethereum
name: ZToken
network: arbitrum-one
source:
abi: ZToken
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities: []
abis:
- name: ZToken
file: ./abis/ZToken.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: BalanceTransfer(indexed address,indexed address,uint256,uint256)
handler: handleCollateralTransfer
file: ./src/mapping.ts
- kind: ethereum
name: StableDebtToken
network: arbitrum-one
source:
abi: StableDebtToken
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities: []
abis:
- name: StableDebtToken
file: ./abis/StableDebtToken.json
- name: ERC20
file: ./abis/ERC20.json
file: ./src/mapping.ts
- kind: ethereum
name: VariableDebtToken
network: arbitrum-one
source:
abi: VariableDebtToken
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities: []
abis:
- name: VariableDebtToken
file: ./abis/VariableDebtToken.json
- name: ERC20
file: ./abis/ERC20.json
file: ./src/mapping.ts
- name: ZarbanOracle
kind: ethereum
network: arbitrum-one
source:
abi: IPriceOracleGetter
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
entities:
- _DefaultOracle
abis:
- name: IPriceOracleGetter
file: ./abis/IPriceOracleGetter.json
eventHandlers:
- event: AssetSourceUpdated(indexed address,indexed address)
handler: handleZarbanOracleAssetSourceUpdated
# Stablecoin system templates
- name: Clip
kind: ethereum
network: arbitrum-one
source:
abi: Clip
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
entities:
- Market
abis:
- name: Clip
file: ./abis/Clip.json
- name: ZAR
file: ./abis/ZAR.json
eventHandlers:
# collateral auction
- event: Take(indexed uint256,uint256,uint256,uint256,uint256,uint256,indexed address)
handler: handleClipTakeBid
- event: Yank(uint256)
handler: handleClipYankBid
- name: Pip
kind: ethereum
network: arbitrum-one
source:
abi: Pip
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping.ts
entities:
- _ilk
abis:
- name: Pip
file: ./abis/Pip.json
eventHandlers:
- event: LogValue(bytes32)
handler: handlePipLogValue