-
Notifications
You must be signed in to change notification settings - Fork 3
/
subgraph.yaml
102 lines (102 loc) · 3.44 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
specVersion: 0.0.4
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Comptroller
network: mainnet
source:
address: "0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B"
abi: Comptroller
startBlock: 7700000
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mapping/comptroller.ts
entities:
- Protocol
- Market
- User
- UserMarket
abis:
- name: CToken
file: ./abis/cToken.json
- name: CERC20
file: ./abis/cErc20.json
- name: Comptroller
file: ./abis/comptroller.json
- name: ERC20
file: ./abis/erc20.json
- name: PriceOracle1
file: ./abis/price-oracle-1.json
- name: PriceOracle2
file: ./abis/price-oracle-2.json
eventHandlers:
- event: MarketListed(address)
handler: handleMarketListed
- event: NewPriceOracle(address,address)
handler: handleNewPriceOracle
- event: MarketEntered(address,address)
handler: handleMarketEntered
- event: MarketExited(address,address)
handler: handleMarketExited
templates:
- name: CToken
kind: ethereum/contract
network: mainnet
source:
abi: CToken
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mapping/ctoken.ts
entities:
- Protocol
- Market
- User
- UserMarket
- Mint
- Redeem
- Borrow
- RepayBorrow
- Transfer
- Liquidation
abis:
- name: CToken
file: ./abis/cToken.json
- name: CERC20
file: ./abis/cErc20.json
- name: CEther
file: ./abis/cEther.json
- name: ERC20
file: ./abis/erc20.json
- name: Comptroller
file: ./abis/comptroller.json
- name: PriceOracle1
file: ./abis/price-oracle-1.json
- name: PriceOracle2
file: ./abis/price-oracle-2.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: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: AccrueInterest(uint256,uint256,uint256)
handler: handleAccrueInterestOld
- event: AccrueInterest(uint256,uint256,uint256,uint256)
handler: handleAccrueInterest
features:
- grafting
graft:
base: QmdzmaeKuBroxvAdRrENGKyCAMvAresZuKXop5hqPvjYeA
block: 15537392