-
Notifications
You must be signed in to change notification settings - Fork 15
/
subgraph.yaml
441 lines (387 loc) · 14 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
description: Multi Collateral Dai (MCD)
specVersion: 0.0.2
schema:
file: ./schema.graphql
dataSources:
#
# Core Module
#
# Vault Engine
- name: Vat
kind: ethereum/contract
network: mainnet
source:
abi: Vat
address: '0x35d1b3f3d7966a1dfe207aa4514c12a259a0492b'
startBlock: 8928152
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/core/vat.ts
abis:
- name: Vat
file: ./abis/Vat.json
entities:
- CollateralType
- SystemState
- UserProxy
- Vault
eventHandlers:
### Administration ###
# function init(bytes32 ilk)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x3b66319500000000000000000000000000000000000000000000000000000000'
handler: handleInit
# function file(bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x29ae811400000000000000000000000000000000000000000000000000000000'
handler: handleFile
# function file(bytes32 ilk, bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x1a0b287e00000000000000000000000000000000000000000000000000000000'
handler: handleFile
### Fungibility ###
# function slip(bytes32 ilk, address usr, int256 wad)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x7cdd3fde00000000000000000000000000000000000000000000000000000000'
handler: handleSlip
# function flux(bytes32 ilk, address src, address dst, uint256 rad)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x6111be2e00000000000000000000000000000000000000000000000000000000'
handler: handleFlux
# function move(address src, address dst, uint256 rad)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0xbb35783b00000000000000000000000000000000000000000000000000000000'
handler: handleMove
### CDP Manipulation ###
# function frob(bytes32 i, address u, address v, address w, int256 dink, int256 dart)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x7608870300000000000000000000000000000000000000000000000000000000'
handler: handleFrob
### CDP Fungibility ###
# function fork(bytes32 ilk, address src, address dst, int256 dink, int256 dart)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x870c616d00000000000000000000000000000000000000000000000000000000'
handler: handleFork
### CDP Confiscation ###
# function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0x7bab3f4000000000000000000000000000000000000000000000000000000000'
handler: handleGrab
### Settlement ###
# function heal(uint256 rad)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0xf37ac61c00000000000000000000000000000000000000000000000000000000'
handler: handleHeal
# function suck(address u, address v, uint256 rad)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0xf24e23eb00000000000000000000000000000000000000000000000000000000'
handler: handleSuck
### Rates ###
# function fold(bytes32 i, address u, int256 rate)
- event: LogNote(indexed bytes4,indexed bytes32,indexed bytes32,indexed bytes32,bytes)
topic0: '0xb65337df00000000000000000000000000000000000000000000000000000000'
handler: handleFold
# Liaison between the oracles and core contracts
- name: Spot
kind: ethereum/contract
network: mainnet
source:
abi: Spotter
address: '0x65c79fcb50ca1594b025960e539ed7a9a6d434a3'
startBlock: 8928152
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/core/spot.ts
abis:
- name: Spotter
file: ./abis/Spotter.json
- name: Vat
file: ./abis/Vat.json
entities:
- CollateralPrice
- CollateralType
- SystemState
eventHandlers:
### Administration ###
# TODO: file(bytes32 ilk, bytes32 what, address pip_)
# TODO: file(bytes32 what, uint256 data)
# file(bytes32 ilk, bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x1a0b287e00000000000000000000000000000000000000000000000000000000'
handler: handleFile
### Update value ###
# event Poke(bytes32 ilk, bytes32 val, uint256 spot)
- event: Poke(bytes32,bytes32,uint256)
handler: handlePoke
# Liquidation Agent
- name: Cat
kind: ethereum/contract
network: mainnet
source:
abi: Cat
address: '0x78f2c2af65126834c51822f56be0d7469d7a523e'
startBlock: 8928165
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/core/cat.ts
abis:
- name: Cat
file: ./abis/Cat.json
- name: Vat
file: ./abis/Vat.json
entities:
- CollateralType
- SystemState
eventHandlers:
### Administration ###
# function file(bytes32 ilk, bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x1a0b287e00000000000000000000000000000000000000000000000000000000'
handler: handleFile
# function file(bytes32 ilk, bytes32 what, address flip)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0xebecb39d00000000000000000000000000000000000000000000000000000000'
handler: handleFile
### CDP Liquidation ###
# function bite(bytes32 ilk, address urn)
- event: Bite(indexed bytes32,indexed address,uint256,uint256,uint256,address,uint256)
handler: handleBite
#
# System Stabilizer Module
#
# Surplus Auction
- name: Flap
kind: ethereum/contract
network: mainnet
source:
abi: Flapper
address: '0xdfe0fb1be2a52cdbf8fb962d5701d7fd0902db9f'
startBlock: 8928163
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/system-stabilizer/flap.ts
abis:
- name: Flapper
file: ./abis/Flapper.json
- name: Vat
file: ./abis/Vat.json
entities:
- SystemState
eventHandlers:
### Admin ###
# function file(bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x29ae811400000000000000000000000000000000000000000000000000000000'
handler: handleFile
# Debt Auction
- name: Flop
kind: ethereum/contract
network: mainnet
source:
abi: Flopper
address: '0x4d95a049d5b0b7d32058cd3f2163015747522e99'
startBlock: 9006717
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/system-stabilizer/flop.ts
abis:
- name: Flopper
file: ./abis/Flopper.json
- name: Vat
file: ./abis/Vat.json
entities:
- SystemState
eventHandlers:
### Admin ###
# function file(bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x29ae811400000000000000000000000000000000000000000000000000000000'
handler: handleFile
# Balance Sheet
- name: Vow
kind: ethereum/contract
network: mainnet
source:
abi: Vow
address: '0xa950524441892a31ebddf91d3ceefa04bf454466'
startBlock: 8928163
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/system-stabilizer/vow.ts
abis:
- name: Vow
file: ./abis/Vow.json
- name: Vat
file: ./abis/Vat.json
entities:
- SystemState
eventHandlers:
### Administration ###
# function file(bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x29ae811400000000000000000000000000000000000000000000000000000000'
handler: handleFile
#
# Rates Module
#
# Accumulation of Stability Fees for collateral types
- name: Jug
kind: ethereum/contract
network: mainnet
source:
abi: Jug
address: '0x19c0976f590d67707e62397c87829d896dc0f1f1'
startBlock: 8928160
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/rates/jug.ts
abis:
- name: Jug
file: ./abis/Jug.json
- name: Vat
file: ./abis/Vat.json
entities:
- CollateralType
- SystemState
eventHandlers:
### Administration ###
# init(bytes32 ilk)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x3b66319500000000000000000000000000000000000000000000000000000000'
handler: handleInit
# function file(bytes32 ilk, bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x1a0b287e00000000000000000000000000000000000000000000000000000000'
handler: handleFile
# function file(bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x29ae811400000000000000000000000000000000000000000000000000000000'
handler: handleFile
# Dai Savings Rate
- name: Pot
kind: ethereum/contract
network: mainnet
source:
abi: Pot
address: '0x197e90f9fad81970ba7976f33cbd77088e5d7cf7'
startBlock: 8928160
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/rates/pot.ts
abis:
- name: Pot
file: ./abis/Pot.json
- name: Vat
file: ./abis/Vat.json
entities:
- SystemState
eventHandlers:
### Administration ###
# function file(bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x29ae811400000000000000000000000000000000000000000000000000000000'
handler: handleFile
#
# Proxy Module
#
# Used to deploy new user proxy instances
- name: ProxyFactory
kind: ethereum/contract
network: mainnet
source:
abi: DSProxyFactory
address: '0xa26e15c895efc0616177b7c1e7270a4c7d51c997'
startBlock: 5834580
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/proxy/proxy-factory.ts
abis:
- name: DSProxyFactory
file: ./abis/DSProxyFactory.json
- name: Vat
file: ./abis/Vat.json
entities:
- SystemState
- User
- UserProxy
eventHandlers:
- event: Created(indexed address,indexed address,address,address)
handler: handleCreated
# Allow users to interact with their Vaults in an easy way, treating them as non-fungible tokens (NFTs)
- name: CdpManager
kind: ethereum/contract
network: mainnet
source:
abi: DssCdpManager
address: '0x5ef30b9986345249bc32d8928b7ee64de9435e39'
startBlock: 8928198
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/proxy/cdp-manager.ts
abis:
- name: DssCdpManager
file: ./abis/DssCdpManager.json
- name: Vat
file: ./abis/Vat.json
entities:
- CollateralType
- SystemState
- UserProxy
- Vault
eventHandlers:
# function open(bytes32 ilk, address usr)
- event: NewCdp(indexed address,indexed address,indexed uint256)
handler: handleOpen
# function give(uint cdp, address dst)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0xfcafcc6800000000000000000000000000000000000000000000000000000000'
handler: handleGive
templates:
# Collateral Auction
- name: Flip
kind: ethereum/contract
network: mainnet
source:
abi: Flipper
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/modules/collateral/flip.ts
abis:
- name: Flipper
file: ./abis/Flipper.json
- name: Vat
file: ./abis/Vat.json
entities:
- CollateralAuction
- CollateralType
eventHandlers:
### Admin ###
# function file(bytes32 what, uint256 data)
- event: LogNote(indexed bytes4,indexed address,indexed bytes32,indexed bytes32,bytes)
topic0: '0x29ae811400000000000000000000000000000000000000000000000000000000'
handler: handleFile
### Auction ###
- event: Kick(uint256,uint256,uint256,uint256,indexed address,indexed address)
handler: handleKick