-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsubstreams.yaml
97 lines (84 loc) · 2.45 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
specVersion: v0.1.0
package:
name: erc20_balance_changes
version: v1.4.0
url: https://github.com/streamingfast/substreams-erc20-balance-changes
doc: |
This Substreams extracts all ERC20/ERC721 transfers from Ethereum events for the full chain.
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
binaries:
default:
type: wasm/rust-v1
file: target/wasm32-unknown-unknown/release/erc20.wasm
protobuf:
files:
- erc20.proto
importPaths:
- ./proto/v1
excludePaths:
- sf/substreams
- google
modules:
- name: map_balance_changes
kind: map
doc: Extracts ERC20 balance changes
initialBlock: 1397553
inputs:
- source: sf.ethereum.type.v2.Block
output:
type: proto:erc20.types.v1.BalanceChanges
- name: map_valid_balance_changes
kind: map
doc: Extracts ERC20 balance changes
initialBlock: 1397553
inputs:
- map: map_balance_changes
output:
type: proto:erc20.types.v1.ValidBalanceChanges
- name: map_unknown_balance_changes
kind: map
initialBlock: 1397553
inputs:
- map: map_balance_changes
output:
type: proto:erc20.types.v1.UnknownBalanceChanges
- name: db_out
kind: map
inputs:
- source: sf.substreams.v1.Clock
- map: map_balance_changes
output:
type: proto:sf.substreams.sink.database.v1.DatabaseChanges
- name: graph_out
kind: map
initialBlock: 1397553
inputs:
- source: sf.substreams.v1.Clock
- map: map_balance_changes
output:
type: proto:sf.substreams.sink.entity.v1.EntityChanges
- name: store_valid_balance_changes
kind: store
updatePolicy: add
valueType: bigint
inputs:
- map: map_balance_changes
- name: balance_change_stats
kind: map
inputs:
- source: sf.substreams.v1.Clock
- store: store_valid_balance_changes
output:
type: proto:erc20.types.v1.BalanceChangeStats
network: mainnet
sink:
module: db_out
type: sf.substreams.sink.sql.v1.Service
config:
schema: "./schema.sql"
engine: postgres
postgraphile_frontend:
enabled: true