forked from ChaosLabsInc/subgraph-benqi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubgraph.yaml
105 lines (105 loc) · 3.56 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
specVersion: 0.0.5
description: Benqi is an open-source protocol for algorithmic, efficient Money Markets on the Avalanche blockchain.
repository: https://github.com/Rome-Blockchain-Labs/subgraph-lending
schema:
file: ./schema.graphql
graft:
# Those values below should be adjusted on every deploy to make a faster deployment by copying the most recent data from the current subgraph
base: QmaPiB9oke92a8VJPxJPnEMTMdoSZZGzu8n5j3yU8GUwcD # Subgraph ID of the lastet subgraph
block: 29543754 # Block number
features:
- grafting
dataSources:
- kind: ethereum
name: Comptroller
network: avalanche
source:
address: "0x486Af39519B4Dc9a7fCcd318217352830E8AD9b4"
abi: Comptroller
startBlock: 3046285 # comptroller created on https://snowtrace.io/block/3046286
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/comptroller.ts
entities:
- Account
- AccountCToken
- AccountCTokenTransaction
- AccountMarketSnapshot
- Comptroller
- Market
- MarketDailySnapshot
- MarketHourlySnapshot
- BorrowEvent
- RepayEvent
- LiquidationEvent
- MintEvent
- RedeemEvent
- TransferEvent
- Token
abis:
- name: Comptroller
file: ./abis/comptroller.json
- name: CToken
file: ./abis/ctoken.json
- name: PriceOracle2
file: ./abis/priceOracle2.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
- event: MarketListed(address)
handler: handleMarketListed
- event: MarketEntered(address,address)
handler: handleMarketEntered
- event: MarketExited(address,address)
handler: handleMarketExited
- event: NewCloseFactor(uint256,uint256)
handler: handleNewCloseFactor
- event: NewPriceOracle(address,address)
handler: handleNewPriceOracle
- event: NewCollateralFactor(address,uint256,uint256)
handler: handleNewCollateralFactor
- event: NewLiquidationIncentive(uint256,uint256)
handler: handleNewLiquidationIncentive
templates:
- name: CToken
kind: ethereum
network: avalanche
source:
abi: CToken
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/ctoken.ts
entities:
- User
- Market
- CTokenInfo
abis:
- name: CToken
file: ./abis/ctoken.json
- name: PriceOracle2
file: ./abis/priceOracle2.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
- event: Mint(address,uint256,uint256)
handler: handleMint
- event: Redeem(address,uint256,uint256)
handler: handleRedeem
- event: Borrow(address,uint256,uint256,uint256)
handler: handleBorrow
- event: RepayBorrow(address,address,uint256,uint256,uint256)
handler: handleRepayBorrow
- event: LiquidateBorrow(address,address,uint256,address,uint256)
handler: handleLiquidateBorrow
- event: AccrueInterest(uint256,uint256,uint256,uint256)
handler: handleAccrueInterest
- event: NewReserveFactor(uint256,uint256)
handler: handleNewReserveFactor
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: NewMarketInterestRateModel(address,address)
handler: handleNewMarketInterestRateModel