-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubgraph.yaml
More file actions
286 lines (278 loc) · 9.56 KB
/
subgraph.yaml
File metadata and controls
286 lines (278 loc) · 9.56 KB
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
specVersion: 1.3.0
indexerHints:
prune: auto
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AssetPoolFactory
network: base
source:
address: "0xC8e4cc79da89FCFaF4436f5e9F9fFCE0D2850378"
abi: AssetPoolFactory
startBlock: 38430200
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Pool
- Oracle
abis:
- name: AssetPoolFactory
file: ./abis/AssetPoolFactory.json
- name: AssetPool
file: ./abis/AssetPool.json
- name: XToken
file: ./abis/XToken.json
- name: AssetOracle
file: ./abis/AssetOracle.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: AssetOracleCreated(indexed address,string)
handler: handleAssetOracleCreated
- event: AssetPoolCreated(indexed address,string,address,address)
handler: handleAssetPoolCreated
- event: OwnershipTransferred(indexed address,indexed address)
handler: handleOwnershipTransferred
- event: RegistryUpdated(indexed address,indexed address)
handler: handleRegistryUpdated
file: ./src/asset-pool-factory.ts
- kind: ethereum
name: ProtocolRegistry
network: base
source:
address: "0xBB9f34413f48aE7520acdedC4f07b110860c1534"
abi: ProtocolRegistry
startBlock: 38430200
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Pool
- Oracle
- Strategy
abis:
- name: ProtocolRegistry
file: ./abis/ProtocolRegistry.json
- name: DefaultPoolStrategy
file: ./abis/DefaultPoolStrategy.json
eventHandlers:
- event: OracleVerificationUpdated(indexed address,bool)
handler: handleOracleVerificationUpdated
- event: OwnershipTransferred(indexed address,indexed address)
handler: handleOwnershipTransferred
- event: PoolVerificationUpdated(indexed address,bool)
handler: handlePoolVerificationUpdated
- event: StrategyVerificationUpdated(indexed address,bool)
handler: handleStrategyVerificationUpdated
file: ./src/protocol-registry.ts
templates:
- kind: ethereum
name: AssetPool
network: base
source:
abi: AssetPool
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Pool
- UserPosition
- UserRequest
- FeeEvent
abis:
- name: AssetPool
file: ./abis/AssetPool.json
- name: XToken
file: ./abis/XToken.json
eventHandlers:
- event: CollateralDeposited(indexed address,uint256)
handler: handleCollateralDeposited
- event: CollateralWithdrawn(indexed address,uint256)
handler: handleCollateralWithdrawn
- event: DepositRequested(indexed address,uint256,indexed uint256)
handler: handleDepositRequested
- event: AssetClaimed(indexed address,uint256,indexed uint256)
handler: handleAssetClaimed
- event: RedemptionRequested(indexed address,uint256,indexed uint256)
handler: handleRedemptionRequested
- event: ReserveWithdrawn(indexed address,uint256,indexed uint256)
handler: handleReserveWithdrawn
- event: LiquidationRequested(indexed address,address,indexed uint256,indexed uint256)
handler: handleLiquidationRequested
- event: LiquidationClaimed(indexed address,indexed address,uint256,uint256,uint256)
handler: handleLiquidationClaimed
- event: LiquidationCancelled(indexed address,indexed address,uint256)
handler: handleLiquidationCancelled
- event: FeeDeducted(indexed address,uint256)
handler: handleFeeDeducted
file: ./src/asset-pool.ts
- kind: ethereum
name: PoolCycleManager
network: base
source:
abi: PoolCycleManager
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Pool
- LPPosition
abis:
- name: PoolCycleManager
file: ./abis/PoolCycleManager.json
- name: PoolLiquidityManager
file: ./abis/PoolLiquidityManager.json
- name: DefaultPoolStrategy
file: ./abis/DefaultPoolStrategy.json
eventHandlers:
- event: CycleStarted(indexed uint256,uint256)
handler: handleCycleStarted
- event: RebalanceInitiated(indexed uint256,uint8)
handler: handleRebalanceInitiated
- event: Rebalanced(indexed address,uint256,uint256,bool,indexed uint256)
handler: handleRebalanced
- event: InterestAccrued(uint256,uint256)
handler: handleInterestAccrued
- event: isPriceDeviationValidUpdated(bool)
handler: handleIsPriceDeviationValidUpdated
file: ./src/pool-cycle-manager.ts
- kind: ethereum
name: PoolLiquidityManager
network: base
source:
abi: PoolLiquidityManager
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Pool
- LPPosition
- LPRequest
- FeeEvent
abis:
- name: PoolLiquidityManager
file: ./abis/PoolLiquidityManager.json
eventHandlers:
- event: CollateralAdded(indexed address,uint256)
handler: handleCollateralAdded
- event: CollateralReduced(indexed address,uint256)
handler: handleCollateralReduced
- event: InterestClaimed(indexed address,uint256)
handler: handleInterestClaimed
- event: LPAdded(indexed address,uint256,uint256)
handler: handleLPAdded
- event: LPLiquidationExecuted(indexed address,indexed address,uint256,uint256)
handler: handleLPLiquidationExecuted
- event: LPLiquidationRequested(indexed address,uint256,uint256)
handler: handleLPLiquidationRequested
- event: LPRemoved(indexed address)
handler: handleLPRemoved
- event: LiquidationCancelled(indexed address)
handler: handleLiquidationCancelled
- event: LiquidityAdded(indexed address,uint256)
handler: handleLiquidityAdded
- event: LiquidityAdditionRequested(indexed address,uint256,uint256)
handler: handleLiquidityAdditionRequested
- event: LiquidityReduced(indexed address,uint256)
handler: handleLiquidityReduced
- event: LiquidityReductionRequested(indexed address,uint256,uint256)
handler: handleLiquidityReductionRequested
- event: InterestDistributedToLP(indexed address,indexed uint256,indexed uint256)
handler: handleInterestDistributedToLP
- event: RebalanceAmountTransferred(indexed address,indexed uint256,indexed uint256)
handler: handleRebalanceAmountTransferred
- event: FeeDeducted(indexed address,uint256)
handler: handleFeeDeducted
- event: DelegateSet(indexed address,indexed address)
handler: handleDelegateSet
file: ./src/pool-liquidity-manager.ts
- kind: ethereum
name: XToken
network: base
source:
abi: XToken
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Pool
abis:
- name: XToken
file: ./abis/XToken.json
file: ./src/xtoken.ts
- kind: ethereum
name: AssetOracle
network: base
source:
abi: AssetOracle
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Oracle
- Pool
abis:
- name: AssetOracle
file: ./abis/AssetOracle.json
eventHandlers:
- event: AssetPriceUpdated(uint256,uint256)
handler: handleAssetPriceUpdated
- event: OHLCDataUpdated(uint256,uint256,uint256,uint256,uint256)
handler: handleOHLCDataUpdated
- event: SplitDetected(uint256,uint256)
handler: handleSplitDetected
file: ./src/asset-oracle.ts
- kind: ethereum
name: ERC20
network: base
source:
abi: ERC20
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Pool
abis:
- name: ERC20
file: ./abis/ERC20.json
file: ./src/erc20.ts
- kind: ethereum
name: DefaultPoolStrategy
network: base
source:
abi: DefaultPoolStrategy
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Strategy
abis:
- name: DefaultPoolStrategy
file: ./abis/DefaultPoolStrategy.json
eventHandlers:
- event: InterestRateParamsUpdated(uint256,uint256,uint256,uint256,uint256)
handler: handleInterestRateParamsUpdated
- event: UserCollateralParamsUpdated(uint256,uint256)
handler: handleUserCollateralParamsUpdated
- event: LPLiquidityParamsUpdated(uint256,uint256,uint256,uint256)
handler: handleLPLiquidityParamsUpdated
- event: CycleParamsUpdated(uint256,uint256)
handler: handleCycleParamsUpdated
- event: HaltParamsUpdated(uint256,uint256,uint256,uint256)
handler: handleHaltParamsUpdated
- event: FeeParamsUpdated(uint256,address)
handler: handleFeeParamsUpdated
- event: IsYieldBearingUpdated(bool)
handler: handleIsYieldBearingUpdated
file: ./src/default-pool-strategy.ts