-
Notifications
You must be signed in to change notification settings - Fork 0
/
substreams.yaml
executable file
·305 lines (275 loc) · 8.13 KB
/
substreams.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
specVersion: v0.1.0
package:
name: curve_sps
version: v0.1.21-alpha
imports:
graph: https://github.com/streamingfast/substreams-sink-subgraph/releases/download/v0.1.0/substreams-sink-subgraph-protodefs-v0.1.0.spkg
entities: https://github.com/streamingfast/substreams-sink-entity-changes/releases/download/v1.3.0/substreams-sink-entity-changes-v1.3.0.spkg
chainlink_prices: https://github.com/Graph-BuildersDAO/substreams/releases/download/chainlink-prices-v1.0.2/chainlink-price-substream-v1.0.2.spkg
uniswap_prices: https://github.com/Graph-BuildersDAO/uniswap-pricing-substream/releases/download/v0.1.3/uniswap-pricing-v0.1.3.spkg
protobuf:
files:
- curve/v1/curve.proto
importPaths:
- ./proto
binaries:
default:
type: wasm/rust-v1
file: ./target/wasm32-unknown-unknown/release/substreams.wasm
modules:
- name: map_curve_events
kind: map
initialBlock: 9456293
inputs:
- source: sf.ethereum.type.v2.Block
output:
type: proto:curve.types.v1.CurveEvents
- name: store_pools_created
kind: store
updatePolicy: set
valueType: proto:curve.types.v1.Pools
inputs:
- map: map_curve_events
- name: store_pool_count
kind: store
updatePolicy: add
valueType: int64
inputs:
- map: map_curve_events
- name: store_pool_addresses
kind: store
updatePolicy: set_if_not_exists
valueType: string
inputs:
- map: map_curve_events
- store: store_pool_count
mode: deltas
- name: store_tokens
kind: store
updatePolicy: add
valueType: int64
inputs:
- map: map_curve_events
- name: map_extract_pool_events
kind: map
inputs:
- source: sf.ethereum.type.v2.Block
- store: store_pools_created
- store: uniswap_prices:store_uniswap_prices
- store: chainlink_prices:chainlink_price_store
output:
type: proto:curve.types.v1.Events
- name: store_pool_fees
kind: store
updatePolicy: set
valueType: proto:curve.types.v1.PoolFees
inputs:
- map: map_curve_events
- map: map_extract_pool_events
- name: store_output_token_supply
kind: store
updatePolicy: add
valueType: bigint
inputs:
- map: map_extract_pool_events
- name: store_input_token_balances
kind: store
updatePolicy: add
valueType: bigint
inputs:
- map: map_extract_pool_events
- name: store_pool_volume_native
kind: store
updatePolicy: add
valueType: bigint
inputs:
- source: sf.substreams.v1.Clock
- map: map_extract_pool_events
- store: store_pools_created
- store: store_current_time
mode: deltas
- name: store_pool_volume_usd
kind: store
updatePolicy: add
valueType: bigdecimal
inputs:
- source: sf.substreams.v1.Clock
- map: map_extract_pool_events
- store: store_pools_created
- store: store_current_time
mode: deltas
- store: chainlink_prices:chainlink_price_store
- store: uniswap_prices:store_uniswap_prices
- name: store_protocol_volume_usd
kind: store
updatePolicy: add
valueType: bigdecimal
inputs:
- source: sf.substreams.v1.Clock
- store: store_pool_volume_usd
mode: deltas
- store: store_current_time
mode: deltas
- name: store_pool_tvl
kind: store
updatePolicy: set
valueType: bigdecimal
inputs:
- store: store_pools_created
- store: store_input_token_balances
- store: store_input_token_balances
mode: deltas
- store: chainlink_prices:chainlink_price_store
- store: uniswap_prices:store_uniswap_prices
- name: store_protocol_tvl
kind: store
updatePolicy: add
valueType: bigdecimal
inputs:
- store: store_pool_tvl
mode: deltas
- name: store_active_users
kind: store
updatePolicy: set_if_not_exists
valueType: int64
inputs:
- source: sf.substreams.v1.Clock
- map: map_extract_pool_events
- store: store_current_time
mode: deltas
- name: store_usage_metrics
kind: store
updatePolicy: add
valueType: int64
inputs:
- source: sf.substreams.v1.Clock
- map: map_extract_pool_events
- store: store_active_users
mode: deltas
- store: store_current_time
mode: deltas
- name: store_current_time
kind: store
initialBlock: 9456293
updatePolicy: set
valueType: int64
inputs:
- source: sf.substreams.v1.Clock
- name: store_gauges
kind: store
updatePolicy: set
valueType: proto:curve.types.v1.LiquidityGauge
inputs:
- map: map_curve_events
- name: store_controller_gauges
kind: store
updatePolicy: set_if_not_exists
valueType: int64
inputs:
- map: map_curve_events
- name: map_gauge_events
kind: map
initialBlock: 9456293
inputs:
- source: sf.ethereum.type.v2.Block
- store: store_gauges
output:
type: proto:curve.types.v1.LiquidityGaugeEvents
- name: store_crv_inflation
kind: store
updatePolicy: set
valueType: string
inputs:
- map: map_curve_events
- name: store_reward_token_count
kind: store
updatePolicy: add
valueType: int64
inputs:
- map: map_gauge_events
- name: store_reward_tokens
kind: store
updatePolicy: set
valueType: proto:curve.types.v1.RewardToken
inputs:
- map: map_gauge_events
- store: store_gauges
- store: store_reward_token_count
mode: deltas
- store: store_pools_created
- name: store_pool_rewards
kind: store
updatePolicy: set
valueType: proto:curve.types.v1.PoolRewards
inputs:
- map: map_gauge_events
- store: store_gauges
- store: store_controller_gauges
- store: store_crv_inflation
- store: store_reward_token_count
- store: store_reward_tokens
- store: uniswap_prices:store_uniswap_prices
- store: chainlink_prices:chainlink_price_store
- source: sf.substreams.v1.Clock
- name: graph_out
kind: map
initialBlock: 9456293
inputs:
- source: sf.substreams.v1.Clock
- map: map_curve_events
- map: map_extract_pool_events
- store: store_pools_created
- store: store_pool_count
- store: store_pool_count
mode: deltas
- store: store_pool_addresses
- store: store_pool_fees
- store: store_pool_fees
mode: deltas
- store: store_tokens
- store: store_output_token_supply
- store: store_input_token_balances
- store: store_pool_volume_native
- store: store_pool_volume_usd
- store: store_pool_volume_usd
mode: deltas
- store: store_protocol_volume_usd
- store: store_protocol_volume_usd
mode: deltas
- store: store_pool_tvl
- store: store_pool_tvl
mode: deltas
- store: store_protocol_tvl
- store: store_usage_metrics
- store: store_current_time
mode: deltas
- store: store_gauges
- map: map_gauge_events
- store: store_reward_token_count
- store: store_reward_tokens
- store: store_pool_rewards
- store: store_pool_rewards
mode: deltas
- store: uniswap_prices:store_uniswap_prices
- store: chainlink_prices:chainlink_price_store
output:
type: proto:sf.substreams.sink.entity.v1.EntityChanges
network: mainnet
networks:
mainnet:
initialBlock:
chainlink_prices:store_confirmed_feeds: 9456293
chainlink_prices:get_chainlink_answers: 9456293
chainlink_prices:chainlink_price_store: 9456293
chainlink_prices:graph_out: 9456293
uniswap_prices:map_pair_created_events: 9456293
uniswap_prices:store_pair_created_events: 9456293
uniswap_prices:map_weth_prices: 9456293
uniswap_prices:store_weth_prices: 9456293
uniswap_prices:map_uniswap_prices: 9456293
uniswap_prices:store_uniswap_prices: 9456293
uniswap_prices:warmup: 9456293
uniswap_prices:chainlink_prices:chainlink_price_store: 9456293
uniswap_prices:chainlink_prices:graph_out: 9456293
uniswap_prices:chainlink_prices:get_chainlink_answers: 9456293
uniswap_prices:chainlink_prices:store_confirmed_feeds: 9456293