-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsubgraph.yaml
264 lines (259 loc) · 6.94 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
specVersion: 0.0.2
description: Tinlake Mainnet Production
graft:
base: QmaHP3LoSoFnACbhfYGipt7rjGRXs6NmANkQayT7ujWEce
block: 18715726
schema:
file: ./schema.graphql
dataSources:
# Block handler across polls, using oldest pile
- kind: ethereum/contract
name: Block
network: mainnet
source:
address: '0x95b74eF13fF280A89cE3d7bBEfc822c210e9939F'
abi: Pile
startBlock: 11063000
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Pool
- Loan
abis:
- name: Pile
file: ./abis/Pile.json
- name: Assessor
file: ./abis/Assessor.json
- name: SeniorTranche
file: ./abis/SeniorTranche.json
- name: ERC20
file: ./abis/ERC20.json
- name: Reserve
file: ./abis/Reserve.json
- name: NavFeed
file: ./abis/NavFeed.json
- name: NftFeed
file: ./abis/NftFeed.json
- name: Shelf
file: ./abis/Shelf.json
- name: Tranche
file: ./abis/Tranche.json
- name: CfgRewardRate
file: ./abis/CfgRewardRate.json
- name: CfgSplitRewardRate
file: ./abis/CfgSplitRewardRate.json
blockHandlers:
- handler: handleBlock
file: ./src/mappings/Block.ts
# Proxy registry across pools
- kind: ethereum/contract
name: ProxyRegistry
network: mainnet
source:
address: '0xc9045c815bf123ad12ea75b9a7c579c1e05051f9'
abi: ProxyRegistry
startBlock: 9994872
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Pool
- Loan
abis:
- name: ProxyRegistry
file: ./abis/ProxyRegistry.json
eventHandlers:
- event: Created(indexed address,indexed address,address,uint256)
handler: handleCreateProxy
file: ./src/mappings/ProxyRegistry.ts
# Pool registry
- kind: ethereum/contract
name: PoolRegistry
network: mainnet
source:
address: '0xddf1c516cf87126c6c610b52fd8d609e67fb6033'
abi: PoolRegistry
startBlock: 11113233
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Pool
- Loan
abis:
- name: PoolRegistry
file: ./abis/PoolRegistry.json
- name: Assessor
file: ./abis/Assessor.json
eventHandlers:
- event: PoolCreated(address,bool,string,string)
handler: handlePoolCreated
- event: PoolUpdated(address,bool,string,string)
handler: handlePoolUpdated
file: ./src/mappings/PoolRegistry.ts
- kind: ethereum/contract
name: Claim
network: mainnet
source:
address: '0x1cA3B2E7FfCAF83d9228a64e4726402B1d5CC054'
abi: TinlakeClaimRad
startBlock: 11686325
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- RewardLink
abis:
- name: TinlakeClaimRad
file: ./abis/TinlakeClaimRad.json
eventHandlers:
- event: Claimed(address,bytes32)
handler: handleClaimed
file: ./src/mappings/TinlakeClaimRad.ts
templates:
- kind: ethereum/contract
name: Coordinator
network: mainnet
source:
abi: Coordinator
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Pool
abis:
- name: Coordinator
file: ./abis/Coordinator.json
- name: Assessor
file: ./abis/Assessor.json
- name: Pile
file: ./abis/Pile.json
- name: Tranche
file: ./abis/Tranche.json
callHandlers:
- function: executeEpoch()
handler: handleCoordinatorExecuteEpoch
- function: closeEpoch()
handler: handleCoordinatorCloseEpoch
file: ./src/mappings/Coordinator.ts
- kind: ethereum/contract
name: Assessor
network: mainnet
source:
abi: Assessor
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Pool
abis:
- name: Assessor
file: ./abis/Assessor.json
callHandlers:
- function: file(bytes32,uint256)
handler: handleAssessorFile
file: ./src/mappings/Assessor.ts
- kind: ethereum/contract
name: Shelf
network: mainnet
source:
abi: Shelf
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Pool
- Loan
abis:
- name: Shelf
file: ./abis/Shelf.json
- name: Pile
file: ./abis/Pile.json
- name: SeniorTranche
file: ./abis/SeniorTranche.json
- name: Assessor
file: ./abis/Assessor.json
- name: NavFeed
file: ./abis/NavFeed.json
callHandlers:
- function: issue(address,uint256)
handler: handleShelfIssue
- function: close(uint256)
handler: handleShelfClose
- function: borrow(uint256,uint256)
handler: handleShelfBorrow
- function: repay(uint256,uint256)
handler: handleShelfRepay
file: ./src/mappings/Shelf.ts
- kind: ethereum/contract
name: NftFeed
network: mainnet
source:
abi: NftFeed
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Loan
abis:
- name: NftFeed
file: ./abis/NftFeed.json
- name: Shelf
file: ./abis/Shelf.json
- name: Pile
file: ./abis/Pile.json
callHandlers:
- function: update(bytes32,uint256,uint256)
handler: handleNftFeedUpdate
- function: update(bytes32,uint256)
handler: handleNftFeedUpdate
file: ./src/mappings/NftFeed.ts
- kind: ethereum/contract
name: Token
network: mainnet
source:
abi: ERC20
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Transfer
abis:
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleERC20Transfer
file: ./src/mappings/ERC20.ts
- kind: ethereum/contract
name: Tranche
network: mainnet
source:
abi: Tranche
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- TokenBalance
abis:
- name: Tranche
file: ./abis/Tranche.json
- name: ERC20
file: ./abis/ERC20.json
callHandlers:
- function: supplyOrder(address,uint256)
handler: handleSupplyOrder
- function: redeemOrder(address,uint256)
handler: handleRedeemOrder
file: ./src/mappings/Tranche.ts