-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubstreams.yaml
178 lines (160 loc) · 4.99 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
specVersion: v0.1.0
package:
name: indexer_stake_tracker
version: v0.0.4
url: https://github.com/streamingfast/substreams-indexer-stake-tracker
image: ./img/thegraph.jpeg
doc: |
This Substreams tracks changes in total staked tokens by indexers on The Graph.
imports:
sql: https://github.com/streamingfast/substreams-sink-sql/releases/download/protodefs-v1.0.7/substreams-sink-sql-protodefs-v1.0.7.spkg
entity: https://github.com/streamingfast/substreams-entity-change/releases/download/v1.1.0/substreams-entity-change-v1.1.0.spkg
database_change: https://github.com/streamingfast/substreams-sink-database-changes/releases/download/v1.2.0/substreams-database-change-v1.2.0.spkg
eth: https://spkg.io/v1/packages/ethereum_common/v0.3.0
protobuf:
files:
- allocations/v1/allocations.proto
importPaths:
- ./proto
excludePaths:
- sf/substreams
- google
binaries:
default:
type: wasm/rust-v1
file: target/wasm32-unknown-unknown/release/substreams_indexer_stake_tracker.wasm
params:
# list of indexer addresses to track. To track all indexers, set to '*'
map_allocation_closed: '["35917c0eb91d2e21bef40940d028940484230c06"]'
store_stake_token_changes: '["35917c0eb91d2e21bef40940d028940484230c06"]'
map_query_fees_collected: '["35917c0eb91d2e21bef40940d028940484230c06"]'
map_indexing_rewards_collected: '["35917c0eb91d2e21bef40940d028940484230c06"]'
# map_allocation_closed: '*'
# store_stake_token_changes: '*'
# map_query_fees_collected: '*'
modules:
- name: map_stake_deposited
kind: map
blockFilter:
module: eth:index_events
query:
string: evt_addr:0x00669a4cf01450b64e8a2a20e9b1fcb71e61ef03
initialBlock: 86288639
inputs:
- source: sf.ethereum.type.v2.Block
output:
type: proto:allocations.types.v1.OwnedStakeTokenChanges
- name: map_stake_withdrawn
kind: map
initialBlock: 86288639
blockFilter:
module: eth:index_events
query:
string: evt_addr:0x00669a4cf01450b64e8a2a20e9b1fcb71e61ef03
inputs:
- source: sf.ethereum.type.v2.Block
output:
type: proto:allocations.types.v1.OwnedStakeTokenChanges
- name: store_stake_token_changes
kind: store
updatePolicy: add
valueType: bigint
inputs:
- params: string
- map: map_stake_deposited
- map: map_stake_withdrawn
- name: map_allocation_closed1
kind: map
initialBlock: 86288639
blockFilter:
module: eth:index_events
query:
string: evt_addr:0x00669a4cf01450b64e8a2a20e9b1fcb71e61ef03
inputs:
- source: sf.ethereum.type.v2.Block
output:
type: proto:allocations.types.v1.AllocationClosedDatas
- name: map_allocation_closed2
kind: map
initialBlock: 86288639
blockFilter:
module: eth:index_events
query:
string: evt_addr:0x00669a4cf01450b64e8a2a20e9b1fcb71e61ef03
inputs:
- source: sf.ethereum.type.v2.Block
output:
type: proto:allocations.types.v1.AllocationClosedDatas
- name: map_allocation_closed
kind: map
initialBlock: 86288639
inputs:
- params: string
- source: sf.substreams.v1.Clock
- map: map_allocation_closed1
- map: map_allocation_closed2
output:
type: proto:allocations.types.v1.AllocationClosedDatas
- name: map_query_fees_collected
kind: map
initialBlock: 86288639
blockFilter:
module: eth:index_events
query:
string: evt_addr:0x00669a4cf01450b64e8a2a20e9b1fcb71e61ef03
inputs:
- params: string
- source: sf.ethereum.type.v2.Block
output:
type: proto:allocations.types.v1.QueryFeesCollecteds
- name: map_indexing_rewards_collected
kind: map
initialBlock: 86288639
blockFilter:
module: eth:index_events
query:
string: evt_addr:0x00669a4cf01450b64e8a2a20e9b1fcb71e61ef03
inputs:
- params: string
- source: sf.ethereum.type.v2.Block
output:
type: proto:allocations.types.v1.IndexingRewardsCollecteds
- name: store_query_fees_collected
kind: store
updatePolicy: add
valueType: bigint
inputs:
- map: map_query_fees_collected
- name: store_indexing_rewards_collected
kind: store
updatePolicy: add
valueType: bigint
inputs:
- map: map_indexing_rewards_collected
- name: map_staked_tokens_changes
kind: map
initialBlock: 86288639
inputs:
- source: sf.substreams.v1.Clock
- map: map_allocation_closed
- store: store_stake_token_changes
- store: store_query_fees_collected
- store: store_indexing_rewards_collected
output:
type: proto:allocations.types.v1.StakedTokensChanges
- name: db_out
kind: map
inputs:
- source: sf.substreams.v1.Clock
- map: map_staked_tokens_changes
output:
type: proto:sf.substreams.sink.database.v1.DatabaseChanges
network: arb-one
sink:
module: db_out
type: sf.substreams.sink.sql.v1.Service
config:
schema: "./schema.sql"
engine: postgres
postgraphile_frontend:
enabled: true