-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsubgraph.template.yaml
142 lines (139 loc) · 4.21 KB
/
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
specVersion: 1.0.0
description: Beefy Finance LRT Subgraph
repository: https://github.com/beefyfinance/lrt-subgraph
schema:
file: ./schema.graphql
indexerHints:
# we want to be able to issue time-travel queries for historical data
prune: {{indexerHintPrune}}
dataSources:
- kind: ethereum/contract
name: ConfigBinder
network: {{network}}
source:
address: "{{bindConfigAddress}}"
abi: ConfigBinder
startBlock: {{bindConfigBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7 # 0xgraph's version
language: wasm/assemblyscript
file: ./src/mapping/config-binder.ts
entities:
- ClockTick
- Investor
- Token
- BeefyVault
- BeefyStrategy
- InvestorPosition
- VaultBalanceBreakdown
- VaultBalanceBreakdownUpdateEvent
- InvestorPositionBalanceBreakdown
abis: &abis
- name: ConfigBinder
file: ./abis/beefy/ConfigBinder.json
- name: BeefyVaultV7
file: ./abis/beefy/BeefyVaultV7.json
- name: BeefyRewardPool
file: ./abis/beefy/BeefyRewardPool.json
- name: BeefyLaunchPool
file: ./abis/beefy/BeefyLaunchPool.json
- name: BeefyIStrategyV7
file: ./abis/beefy/BeefyIStrategyV7.json
- name: Multicall3
file: ./abis/multicall/Multicall3.json
- name: IERC20
file: ./abis/IERC20/IERC20.json
- name: PendleMarket
file: ./abis/platform/PendleMarket.json
- name: PendleSyToken
file: ./abis/platform/PendleSyToken.json
- name: BalancerPool
file: ./abis/platform/BalancerPool.json
- name: BalancerVault
file: ./abis/platform/BalancerVault.json
- name: CurveToken
file: ./abis/platform/CurveToken.json
- name: CurvePool
file: ./abis/platform/CurvePool.json
eventHandlers:
- event: {{bindConfigEvent}}
handler: handleInitLrtWatchers
blockHandlers:
- handler: handleClockTick
filter:
kind: polling
every: {{clockTickBlocks}}
templates:
- name: BeefyVaultV7
kind: ethereum/contract
network: {{network}}
source:
abi: BeefyVaultV7
mapping:
kind: ethereum/events
apiVersion: 0.0.7 # 0xgraph's version
language: wasm/assemblyscript
file: ./src/mapping/vault.ts
entities: &vaultEntities
- ClockTick
- Investor
- Token
- BeefyVault
- BeefyRewardPool
- BeefyStrategy
- InvestorPosition
- VaultBalanceBreakdown
- VaultBalanceBreakdownUpdateEvent
- InvestorPositionBalanceBreakdown
abis: *abis
eventHandlers:
- event: {{vaultInitializedEvent}}
handler: handleInitialized
- event: UpgradeStrat(address)
handler: handleUpgradeStrat
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- name: BeefyRewardPool
kind: ethereum/contract
network: {{network}}
source:
abi: BeefyRewardPool
mapping:
kind: ethereum/events
apiVersion: 0.0.7 # 0xgraph's version
language: wasm/assemblyscript
file: ./src/mapping/reward-pool.ts
entities: *vaultEntities
abis: *abis
eventHandlers:
- event: Initialized(uint8)
handler: handleInitialized
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- name: BeefyIStrategyV7
kind: ethereum/contract
network: {{network}}
source:
abi: BeefyIStrategyV7
mapping:
kind: ethereum/events
apiVersion: 0.0.7 # 0xgraph's version
language: wasm/assemblyscript
file: ./src/mapping/strategy.ts
entities:
- ClockTick
- Investor
- Token
- BeefyVault
- BeefyStrategy
- InvestorPosition
- VaultBalanceBreakdown
- VaultBalanceBreakdownUpdateEvent
- InvestorPositionBalanceBreakdown
abis: *abis
eventHandlers:
- event: Initialized(uint8)
handler: handleInitialized
- event: StratHarvest(indexed address,uint256,uint256)
handler: handleHarvest