forked from aave/protocol-subgraphs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathethereum.subgraph.template.yaml
571 lines (562 loc) · 23.3 KB
/
ethereum.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
specVersion: 0.0.2
description: Protocol v2 subgraph
repository: https://github.com/aave/protocol-v2-subgraph
schema:
file: ./schema.graphql
dataSources:
# --------------------------------------
# ORACLES / PRICE PROVIDERS
# --------------------------------------
- kind: ethereum/contract
name: AaveOracle
network: {{network}}
source:
address: '{{AaveOracleAddress}}'
startBlock: {{AaveOracleStartBlock}}
abi: AaveOracle
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- ChainlinkAggregator
- PriceOracle
- PriceOracleAsset
abis:
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
- name: GenericOracleI
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/GenericOracleI.sol/GenericOracleI.json
- name: IExtendedPriceAggregator
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/IExtendedPriceAggregator.sol/IExtendedPriceAggregator.json
- name: IERC20Detailed
file: ./externals/protocol-v2/artifacts/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol/IERC20Detailed.json
- name: EACAggregatorProxy
file: ./constant-abis/EACAggregatorProxy.json
eventHandlers:
- event: AssetSourceUpdated(indexed address,indexed address)
handler: handleAssetSourceUpdated
- event: FallbackOracleUpdated(indexed address)
handler: handleFallbackOracleUpdated
- event: WethSet(indexed address)
handler: handleWethSet
file: src/mapping/proxy-price-provider/ethereum.ts
- kind: ethereum/contract
name: OracleAnchor
network: {{network}}
source:
address: '{{OracleAnchorAddress}}'
startBlock: {{OracleAnchorStartBlock}}
abi: OracleAnchor
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- OracleSystemMigrated
abis:
- name: OracleAnchor
file: ./constant-abis/OracleAnchor.json
- name: IERC20Detailed
file: ./externals/protocol-v2/artifacts/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol/IERC20Detailed.json
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
- name: IExtendedPriceAggregator
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/IExtendedPriceAggregator.sol/IExtendedPriceAggregator.json
- name: EACAggregatorProxy
file: ./constant-abis/EACAggregatorProxy.json
eventHandlers:
- event: OracleSystemMigrated()
handler: handleOracleSystemMigrated
- event: AssetSourceUpdated(indexed address,indexed address)
handler: handleAssetSourceUpdatedAnchor
file: src/mapping/oracle-anchor.ts
- kind: ethereum/contract
name: ChainlinkSourcesRegistry
network: {{network}}
source:
address: '{{ChainlinkSourcesRegistryAddress}}'
startBlock: {{ChainlinkSourcesRegistryStartBlock}}
abi: ChainlinkSourcesRegistry
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- PriceOracle
abis:
- name: ChainlinkSourcesRegistry
file: ./constant-abis/ChainlinkSourcesRegistry.json
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
- name: GenericOracleI
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/GenericOracleI.sol/GenericOracleI.json
- name: IExtendedPriceAggregator
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/IExtendedPriceAggregator.sol/IExtendedPriceAggregator.json
eventHandlers:
- event: AggregatorUpdated(address,address)
handler: handleChainlinkAggregatorUpdated
file: src/mapping/proxy-price-provider/ethereum.ts
- kind: ethereum/contract
name: ChainlinkENSResolver
network: {{network}}
source:
address: '{{ChainlinkENSResolver}}'
startBlock: {{ChainlinkENSResolverBlock}}
abi: ChainlinkENSResolver
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- ENS
abis:
- name: ChainlinkENSResolver
file: ./constant-abis/ENSResolverChainlink.json
- name: IExtendedPriceAggregator
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/IExtendedPriceAggregator.sol/IExtendedPriceAggregator.json
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
eventHandlers:
- event: AddrChanged(indexed bytes32,address)
handler: handleAddressesChanged
file: src/mapping/ens-chainlink.ts
# --------------------------------------
# CONFIGURATIONS
# --------------------------------------
- kind: ethereum/contract
name: LendingPoolAddressesProviderRegistry
network: {{network}}
source:
address: '{{LendingPoolAddressesProviderRegistryAddress}}'
abi: LendingPoolAddressesProviderRegistry
startBlock: {{LendingPoolAddressesProviderRegistryStartBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- LendingPoolAddressesProvider
abis:
- name: LendingPoolAddressesProviderRegistry
file: ./externals/protocol-v2/artifacts/contracts/protocol/configuration/LendingPoolAddressesProviderRegistry.sol/LendingPoolAddressesProviderRegistry.json
eventHandlers:
- event: AddressesProviderRegistered(indexed address)
handler: handleAddressesProviderRegistered
- event: AddressesProviderUnregistered(indexed address)
handler: handleAddressesProviderUnregistered
file: src/mapping/address-provider-registry.ts
# --------------------------------------
# ADAPTERS
# --------------------------------------
- kind: ethereum/contract
name: UniswapLiquiditySwapAdapter
network: {{network}}
source:
address: '{{UniswapLiquiditySwapAdapterAddress}}'
abi: UniswapLiquiditySwapAdapter
startBlock: {{UniswapLiquiditySwapAdapterStartBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- UniswapLiquiditySwapAdapter
abis:
- name: UniswapLiquiditySwapAdapter
file: ./externals/protocol-v2/artifacts/contracts/adapters/UniswapLiquiditySwapAdapter.sol/UniswapLiquiditySwapAdapter.json
eventHandlers:
- event: Swapped(address,address,uint256,uint256)
handler: handleSwappedLiquidity
file: src/mapping/lending-pool/ethereum.ts
- kind: ethereum/contract
name: UniswapRepayAdapter
network: {{network}}
source:
address: '{{UniswapRepayAdapterAddress}}'
abi: UniswapRepayAdapter
startBlock: {{UniswapRepayAdapterStartBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- UniswapRepayAdapter
abis:
- name: UniswapRepayAdapter
file: ./externals/protocol-v2/artifacts/contracts/adapters/UniswapRepayAdapter.sol/UniswapRepayAdapter.json
eventHandlers:
- event: Swapped(address,address,uint256,uint256)
handler: handleSwappedRepay
file: src/mapping/lending-pool/ethereum.ts
# --------------------------------------
#
# --------------------------------------
templates:
# --------------------------------------
# INCENTIVES
# --------------------------------------
- kind: ethereum/contract
name: AaveIncentivesController
network: {{network}}
source:
abi: AaveIncentivesController
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- IncentivesController
abis:
- name: AaveIncentivesController
file: ./constant-abis/AaveIncentivesController.json
- name: IERC20Detailed
file: ./externals/protocol-v2/artifacts/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol/IERC20Detailed.json
- name: AToken
file: ./constant-abis/AToken.json
eventHandlers:
- event: AssetConfigUpdated(indexed address,uint256)
handler: handleAssetConfigUpdated
- event: RewardsAccrued(indexed address,uint256)
handler: handleRewardsAccrued
- event: RewardsClaimed(indexed address,indexed address,indexed address,uint256)
handler: handleRewardsClaimedClaimer
- event: AssetIndexUpdated(indexed address,uint256)
handler: handleAssetIndexUpdated
- event: UserIndexUpdated(indexed address,indexed address,uint256)
handler: handleUserIndexUpdated
- event: DistributionEndUpdated(uint256)
handler: handleDistributionEndUpdated
file: src/mapping/incentives-controller/ethereum.ts
# --------------------------------------
# ORACLES / PRICE PROVIDERS
# --------------------------------------
- kind: ethereum/contract
name: FallbackPriceOracle
network: {{network}}
source:
abi: GenericOracleI
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- PriceOracle
- PriceOracleReserve
abis:
- name: GenericOracleI
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/GenericOracleI.sol/GenericOracleI.json
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
eventHandlers:
- event: AssetPriceUpdated(address,uint256,uint256)
handler: handleAssetPriceUpdated
- event: EthPriceUpdated(uint256,uint256)
handler: handleEthPriceUpdated
- event: ProphecySubmitted(indexed address,indexed address,uint96,uint96)
handler: handleProphecySubmitted
file: src/mapping/price-oracle.ts
- kind: ethereum/contract
name: ChainlinkAggregator
network: {{network}}
source:
abi: IExtendedPriceAggregator
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- PriceOracleReserve
abis:
- name: IExtendedPriceAggregator
file: ./externals/protocol-v2/artifacts/contracts/mocks/oracle/IExtendedPriceAggregator.sol/IExtendedPriceAggregator.json
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
eventHandlers:
- event: AnswerUpdated(indexed int256,indexed uint256,uint256)
handler: handleChainlinkAnswerUpdated
file: src/mapping/price-oracle.ts
# --------------------------------------
# AToken / Stable / Variable
# --------------------------------------
- kind: ethereum/contract
name: AToken
network: {{network}}
source:
abi: AToken
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- AToken
- UserReserve
abis:
# - name: AToken
# file: ./externals/protocol-v2/artifacts/contracts/protocol/tokenization/AToken.sol/AToken.json
- name: AToken
file: ./constant-abis/AToken.json
- name: IERC20Detailed
file: ./externals/protocol-v2/artifacts/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol/IERC20Detailed.json
- name: AaveIncentivesController
file: ./constant-abis/AaveIncentivesController.json
eventHandlers:
- event: Burn(indexed address,indexed address,uint256,uint256)
handler: handleATokenBurn
- event: BalanceTransfer(indexed address,indexed address,uint256,uint256)
handler: handleATokenTransfer
- event: Mint(indexed address,uint256,uint256)
handler: handleATokenMint
- event: Initialized(indexed address,indexed address,address,address,uint8,string,string,bytes)
handler: handleATokenInitialized
file: src/mapping/tokenization/initialization.ts
- kind: ethereum/contract
name: StableDebtToken
network: {{network}}
source:
abi: StableDebtToken
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- StableDebtToken
- UserReserve
abis:
# - name: StableDebtToken
# file: ./externals/protocol-v2/artifacts/contracts/protocol/tokenization/StableDebtToken.sol/StableDebtToken.json
- name: StableDebtToken
file: ./constant-abis/StableDebtToken.json
- name: IERC20Detailed
file: ./externals/protocol-v2/artifacts/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol/IERC20Detailed.json
- name: AaveIncentivesController
file: ./constant-abis/AaveIncentivesController.json
eventHandlers:
- event: Burn(indexed address,uint256,uint256,uint256,uint256,uint256)
handler: handleStableTokenBurn
- event: Mint(indexed address,indexed address,uint256,uint256,uint256,uint256,uint256,uint256)
handler: handleStableTokenMint
- event: BorrowAllowanceDelegated(indexed address,indexed address,address,uint256)
handler: handleStableTokenBorrowAllowanceDelegated
- event: Initialized(indexed address,indexed address,address,uint8,string,string,bytes)
handler: handleSTokenInitialized
file: src/mapping/tokenization/initialization.ts
- kind: ethereum/contract
name: VariableDebtToken
network: {{network}}
source:
abi: VariableDebtToken
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- StableDebtToken
- UserReserve
abis:
# - name: VariableDebtToken
# file: ./externals/protocol-v2/artifacts/contracts/protocol/tokenization/VariableDebtToken.sol/VariableDebtToken.json
- name: VariableDebtToken
file: ./constant-abis/VariableDebtToken.json
- name: IERC20Detailed
file: ./externals/protocol-v2/artifacts/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol/IERC20Detailed.json
- name: AaveIncentivesController
file: ./constant-abis/AaveIncentivesController.json
eventHandlers:
- event: Burn(indexed address,uint256,uint256)
handler: handleVariableTokenBurn
- event: Mint(indexed address,indexed address,uint256,uint256)
handler: handleVariableTokenMint
- event: BorrowAllowanceDelegated(indexed address,indexed address,address,uint256)
handler: handleVariableTokenBorrowAllowanceDelegated
- event: Initialized(indexed address,indexed address,address,uint8,string,string,bytes)
handler: handleVTokenInitialized
file: src/mapping/tokenization/initialization.ts
# --------------------------------------
# CONFIGURATIONS
# --------------------------------------
- kind: ethereum/contract
name: LendingPoolAddressesProvider
network: {{network}}
source:
abi: LendingPoolAddressesProvider
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- LendingPoolAddressesProvider
abis:
- name: LendingPoolAddressesProvider
file: ./externals/protocol-v2/artifacts/contracts/protocol/configuration/LendingPoolAddressesProvider.sol/LendingPoolAddressesProvider.json
eventHandlers:
- event: ProxyCreated(bytes32,indexed address)
handler: handleProxyCreated
- event: PriceOracleUpdated(indexed address)
handler: handlePriceOracleUpdated
- event: LendingRateOracleUpdated(indexed address)
handler: handleLendingRateOracleUpdated
- event: LendingPoolUpdated(indexed address)
handler: handleLendingPoolUpdated
- event: LendingPoolConfiguratorUpdated(indexed address)
handler: handleLendingPoolConfiguratorUpdated
- event: LendingPoolCollateralManagerUpdated(indexed address)
handler: handleLendingPoolCollateralManagerUpdated
- event: ConfigurationAdminUpdated(indexed address) # past aaveadminupdated todo: change
handler: handleConfigurationAdminUpdated
- event: EmergencyAdminUpdated(indexed address) #new
handler: handleEmergencyAdminUpdated
# - event: EthereumAddressUpdated(indexed address) #new
# handler: handleEthereumAddressUpdated
# - event: OwnershipTransferred(indexed address,indexed address) #new
# handler: handleOwnershipTransferred
- event: AddressSet(bytes32,indexed address,bool) #new
handler: handleAddressSet
file: src/mapping/lending-pool-address-provider.ts
- kind: ethereum/contract
name: LendingPoolConfigurator
network: {{network}}
source:
abi: LendingPoolConfigurator
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- Reserve
abis:
- name: LendingPoolConfigurator
file: ./externals/protocol-v2/artifacts/contracts/protocol/lendingpool/LendingPoolConfigurator.sol/LendingPoolConfigurator.json
- name: IERC20Detailed
file: ./externals/protocol-v2/artifacts/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol/IERC20Detailed.json
- name: IERC20DetailedBytes
file: ./constant-abis/IERC20DetailedBytes.json
- name: DefaultReserveInterestRateStrategy
file: ./externals/protocol-v2/artifacts/contracts/protocol/lendingpool/DefaultReserveInterestRateStrategy.sol/DefaultReserveInterestRateStrategy.json
eventHandlers:
- event: ReserveInitialized(indexed address,indexed address,address,address,address)
handler: handleReserveInitialized
- event: BorrowingEnabledOnReserve(indexed address,bool)
handler: handleBorrowingEnabledOnReserve
- event: BorrowingDisabledOnReserve(indexed address)
handler: handleBorrowingDisabledOnReserve
- event: CollateralConfigurationChanged(indexed address,uint256,uint256,uint256)
handler: handleCollateralConfigurationChanged
- event: StableRateEnabledOnReserve(indexed address)
handler: handleStableRateEnabledOnReserve
- event: StableRateDisabledOnReserve(indexed address)
handler: handleStableRateDisabledOnReserve
- event: ReserveActivated(indexed address)
handler: handleReserveActivated
- event: ReserveDeactivated(indexed address)
handler: handleReserveDeactivated
- event: ReserveFrozen(indexed address)
handler: handleReserveFreezed
- event: ReserveUnfrozen(indexed address)
handler: handleReserveUnfreezed
- event: ReserveFactorChanged(indexed address,uint256)
handler: handleReserveFactorChanged
- event: ReserveDecimalsChanged(indexed address,uint256)
handler: handleReserveDecimalsChanged
- event: ReserveInterestRateStrategyChanged(indexed address,address)
handler: handleReserveInterestRateStrategyChanged
- event: ATokenUpgraded(indexed address,indexed address,indexed address)
handler: handleATokenUpgraded
- event: StableDebtTokenUpgraded(indexed address,indexed address,indexed address)
handler: handleStableDebtTokenUpgraded
- event: VariableDebtTokenUpgraded(indexed address,indexed address,indexed address)
handler: handleVariableDebtTokenUpgraded
file: src/mapping/lending-pool-configurator/ethereum.ts
- kind: ethereum/contract
name: LendingPool
network: {{network}}
source:
abi: LendingPool
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- ReserveOperation
- InterestRateHistory
- Reserve
- UserReserve
- User
abis:
- name: LendingPool
file: ./externals/protocol-v2/artifacts/contracts/protocol/lendingpool/LendingPool.sol/LendingPool.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
- event: Swap(indexed address,indexed address,uint256)
handler: handleSwap
- event: ReserveUsedAsCollateralEnabled(indexed address,indexed address)
handler: handleReserveUsedAsCollateralEnabled
- event: ReserveUsedAsCollateralDisabled(indexed address,indexed address)
handler: handleReserveUsedAsCollateralDisabled
- event: RebalanceStableBorrowRate(indexed address,indexed address)
handler: handleRebalanceStableBorrowRate
- event: FlashLoan(indexed address,indexed address,indexed address,uint256,uint256,uint16)
handler: handleFlashLoan
- event: LiquidationCall(indexed address,indexed address,indexed address,uint256,uint256,address,bool)
handler: handleLiquidationCall
- event: Paused()
handler: handlePaused
- event: Unpaused()
handler: handleUnpaused
- event: ReserveDataUpdated(indexed address,uint256,uint256,uint256,uint256,uint256)
handler: handleReserveDataUpdated
file: src/mapping/lending-pool/ethereum.ts
# --------------------------------------
# CONFIGURATIONS
# --------------------------------------
- kind: ethereum/contract
name: UniswapExchange
network: {{network}}
source:
abi: IUniswapExchange
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- PriceOracleAsset
- PriceOracle
abis:
- name: IUniswapExchange
file: ./constant-abis/IUniswapExchange.json
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
eventHandlers:
- event: Sync(uint112,uint112)
handler: updateAssetPriceFromAaveOracle
file: ./src/helpers/price-updates.ts
- kind: ethereum/contract
name: BalancerPool
network: {{network}}
source:
abi: IBalancerPool
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- PriceOracleAsset
- PriceOracle
abis:
- name: IBalancerPool
file: ./constant-abis/IBalancerPool.json
- name: AaveOracle
file: ./externals/protocol-v2/artifacts/contracts/misc/AaveOracle.sol/AaveOracle.json
eventHandlers:
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256)
handler: updateAssetPriceFromAaveOracle
- event: Transfer(indexed address,indexed address,uint256)
handler: updateAssetPriceFromAaveOracle
file: ./src/helpers/price-updates.ts