Repository navigation
Releases: pinax-network/substreams-evm-balances
Release list
evm-balances-native-v0.7.10
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.10.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
Changes
v0.7.10 accepts Arbitrum One block 500,689,520, which v0.7.9's full-history noop refused on 2026-10-18, in its captured producer shape, and writes the same rows as v0.7.9 for every block v0.7.9 accepts, on every network:
- Arbitrum One: an account created in its transaction that self-destructs to itself is recorded as a debit, a refund of the account itself, the burn of the refund and a repeated withdraw. The repeat is dropped, and the account ends at zero (block 500,689,520, ArbOS 61). Like the other repeated self-destruct withdraws, the rule needs no ArbOS version: a destroyed account ends at zero under either opcode.
On Arbitrum One this release writes arbitrum-one:evm-balances-native@v0.7.10. Every other network, Base among them, gets the same rows from it as from v0.7.9, so a database can stay on the version it runs: the module hash differs, and the sinks run with --on-module-hash-mistmatch=error.
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.10, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.10 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.10/evm-balances-native-v0.7.10.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.10/evm-balances-native-v0.7.10.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124). Its evidence is offline: captured fixtures, RPC-era rows at the refused block and a comparison with v0.7.9 on saved blocks.
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. Where a network's Extended blocks begin later, start at the first whole 1,000-block segment of them: Optimism 105,236,000, Arbitrum One 22,208,000 (start blocks). A block with incomplete or ambiguous native data, or a shape no rule pins, stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-native-v0.7.9
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.9.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
Changes
v0.7.9 accepts the thirteen Arbitrum One and Base blocks that v0.7.8's full-history noops refused up to 2026-10-18, each in a captured producer shape, and writes the same rows as v0.7.8 for every block v0.7.8 accepts, on every network:
- Arbitrum One: a repeated self-destruct withdraw when the call creates the beneficiary's account between the debit and the refund is dropped (blocks 223,944,083, 235,153,999, 282,198,061, 344,105,344); a self-destruct to itself burns the balance before ArbOS 20 (136,808,179, 161,626,224) and keeps it since ArbOS 20 (326,011,151); a failed SetCode transaction's self-authorization with the transaction's own nonce, which cannot apply, counts as discarded (358,023,229, 360,021,045, 382,234,350, 420,239,048, 472,773,590). The ArbOS version comes from the block itself, not from a parameter.
- Base: a fee vault's credit after a transfer into the vault during the execution starts from the transferred balance (47,424,842).
Arbitrum One and Base sync into new databases, arbitrum-one:evm-balances-native@v0.7.9 and base:evm-balances-native@v0.7.9. Ethereum, BSC, Polygon, Optimism, Unichain and HyperEVM get the same rows from this release as from v0.7.8, so their v0.7.8 databases can stay on v0.7.8: the module hash differs, and the sinks run with --on-module-hash-mistmatch=error. ERC-20 is unchanged and still refuses the five Arbitrum One SetCode blocks.
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.9, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.9 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.9/evm-balances-native-v0.7.9.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.9/evm-balances-native-v0.7.9.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124). Its evidence is offline: captured fixtures, RPC-era rows at the refused blocks and a comparison with v0.7.8 on saved blocks.
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. Where a network's Extended blocks begin later, start at the first whole 1,000-block segment of them: Optimism 105,236,000, Arbitrum One 22,208,000 (start blocks). A block with incomplete or ambiguous native data, or a shape no rule pins, stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-erc20-v0.7.4
ERC-20 balances from Firehose Extended blocks, inferred per block from Transfer flows and persisted storage, and written to ClickHouse in the ERC-20 tables of substreams-evm evm-balances v0.3.4. No RPC, no params and no token list; the default network is BSC. Native balances are the separate evm-balances-native package, with their own database.
This release
v0.7.4 (owner, 2026-10-17) changes which rows are inferred, for past blocks as well as new ones, so it is written to a new database, <chain>:evm-balances-erc20@v0.7.4, filled by a full resync from each network's start block; a v0.7.3 database is not reused. On 131 saved Ethereum, BSC and Polygon blocks it keeps every v0.7.3 row with the same value except two wrong rows of Liquorice share tokens, which it drops, and adds 16,363 rows; on two blocks of Origin's OUSD and OETH it drops their rows for the block (history):
- A
balanceOfinput longer than 36 bytes (bots reuse a 68-bytetransferbuffer) is read asbalanceOf(input[16..36])instead of dropping the token for the block, and the cut shape (a 4-byte input or no return data) drops it only where the tracer could have cut the call. - In a block without a
Transferof the contract, a native-backed WETH9 deposit or withdrawal and a TetherTokendestroyBlackFundsvote. - Tether
Issue/Redeemname the sender of the emitting frame, and they andDestroyedBlackFundsexplain the writes whose net change equals their amount. - A
balanceOfvouches for an unexplained write only when it was traced after it. - A FiatToken v2.2 (USDC)
balanceOfthat returns a holder's word without the blacklist bit, which a write in a frame whoseBlacklistedorUnBlacklistednames the holder sets or clears, no longer drops the token for the block; only that holder gets no row. - Polygon's state-sync transaction is ordered by its depth-1 calls.
- Vyper's
HashMapkey order is read (crvUSD, CRV, Curve pools and gauges, Yearn vaults); under it, a contract's own row is never emitted, because a Yearn v3 vault computes its own balance. - A holder's word whose next or second next storage key is also written in the block is a struct field (Curve BoostV2's
Point), and drops its contract for the block unless the holder's ownbalanceOftraced after its last write shows the word. - A traced
scaledBalanceOf(holder)that reads the chosen mapping, keyed to it or returning the holder's stored word, drops its contract for the block: the word is a scaled balance thatbalanceOfconverts. On the 131 saved blocks this removes exactly the two rows of Liquorice's LLCUSDC and LDWETH at Ethereum block 25,852,210, whose share words are about 1000 times theirbalanceOf. - A holder whose word under the chosen mapping moves by a nonzero amount a thousand times more or less than its
Transferflow drops its contract for the block: the word is in another unit for that holder, as Origin's OUSD and OETH keep a rebasing holder's credits. On two Ethereum blocks of OUSD and OETH it removes the rebasing holders' wrong rows and the rows of the tokens' other holders in those blocks; on the 131 saved blocks it removes none. - A block that the persistence rules refuse is retried once, as native v0.7.9 does, with each failed SetCode (EIP-7702) transaction's self-authorization that cannot apply (the sender's own, with the transaction's nonce, which the producer leaves unmarked) marked discarded; any other refusal stands. v0.7.3 refused Arbitrum One blocks 358,023,229, 360,021,045, 382,234,350, 420,239,048 and 472,773,590 on it (producer releases).
- For programs that call the Rust crate:
erc20_balances::run(block)is unchanged. The newerc20_balances::run_sized(block, block_len), whichmap_eventscalls, also takes the byte length of the delivered block (Any.value), one bound on where the tracer could have cut call data;runbounds by the block's re-encoding, which drops unknown fields.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-erc20-v0.7.4.spkg |
map_events, db_out |
map_events: the ERC-20 balances of every contract inferred in the block, as evm.balances.v1.Events. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
erc20_balances |
(contract, address) |
ERC-20 balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote an ERC-20 balance row |
historical_erc20_balances |
view | Open/high/low/close balance bars at 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts, with no token decimals applied. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-erc20@v0.7.4, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-erc20, VERSION: v0.7.4 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-erc20-v0.7.4/evm-balances-erc20-v0.7.4.spkg
The Token API's ERC-20 routes (/balances, /holders, /tokens, /balances/historical) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-erc20-v0.7.4/evm-balances-erc20-v0.7.4.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124). v0.7.4's rules were checked offline, not on a live stream: of the 48,106 rows v0.7.4 gives on 131 saved Ethereum, BSC and Polygon blocks, the 10,572 that have an RPC-era 1-minute bar at their block all equal it; the other 37,534 were not compared, among them 31,555 of the 31,743 rows that v0.7.3 also gives and 360 of the 481 Vyper rows.
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Rows are measured, not qualified. On five captured BSC intervals, the inference source of 2026-10-05 (package v0.2.0) reproduced 58.5–62.8% of the RPC reference rows with 99.92–100% value precision (measured); that measurement was not re-run for later versions, v0.7.4 included. Pairs it does not emit keep their previous value, and computed balances (reward, reflection, rebasing, shares converted by a rate) can be missed: in a block without a traced
balanceOforscaledBalanceOfof such a token, its stored word is emitted (computed balances). Monitor ERC-20 rows per block. - Own rows of Vyper vaults. A Yearn v3 vault's
balanceOf(vault)falls with time while its stored word stays, so v0.7.4 never emits a contract's own row under Vyper's key order, neither from a write nor from a tracedbalanceOf; the RPC era re-read it in nearly every block that touched the vault. A tracedbalanceOf(vault)that returns less than the word after the vault's last write drops all of that vault's rows for the block. - Inference never fails a block. A native refusal no longer stops these rows: native is its own sink.
- Start block. A block that is not Extended stops the stream. Wh...
evm-balances-native-v0.7.8
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.8.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.8, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.8 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.8/evm-balances-native-v0.7.8.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.8/evm-balances-native-v0.7.8.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124).
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. Where a network's Extended blocks begin later, start at the first whole 1,000-block segment of them: Optimism 105,236,000, Arbitrum One 22,208,000 (start blocks). A block with incomplete or ambiguous native data, or a shape no rule pins, stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-erc20-v0.7.3
ERC-20 balances from Firehose Extended blocks, inferred per block from Transfer flows and persisted storage, and written to ClickHouse in the ERC-20 tables of substreams-evm evm-balances v0.3.4. No RPC, no params and no token list; the default network is BSC. Native balances are the separate evm-balances-native package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-erc20-v0.7.3.spkg |
map_events, db_out |
map_events: the ERC-20 balances of every contract inferred in the block, as evm.balances.v1.Events. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
erc20_balances |
(contract, address) |
ERC-20 balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote an ERC-20 balance row |
historical_erc20_balances |
view | Open/high/low/close balance bars at 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts, with no token decimals applied. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-erc20@v0.7.3, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-erc20, VERSION: v0.7.3 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-erc20-v0.7.3/evm-balances-erc20-v0.7.3.spkg
The Token API's ERC-20 routes (/balances, /holders, /tokens, /balances/historical) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-erc20-v0.7.3/evm-balances-erc20-v0.7.3.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124).
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Rows are measured, not qualified. On five captured BSC intervals, the inference reproduced 58.5–62.8% of the RPC reference rows with 99.92–100% value precision (measured). Pairs it does not emit keep their previous value, and computed balances (reward, reflection, rebasing) can be missed. Monitor ERC-20 rows per block.
- Inference never fails a block. A native refusal no longer stops these rows: native is its own sink.
- Start block. A block that is not Extended stops the stream. Where a network's Extended blocks begin after genesis, start at the first whole 1,000-block segment of them: Optimism 105,236,000, Arbitrum One 22,208,000 (start blocks).
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-native-v0.7.7
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.7.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1m, 5m, 10m, 30m, 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history by partition. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.7, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.7 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.7/evm-balances-native-v0.7.7.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.7/evm-balances-native-v0.7.7.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124).
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. A block with incomplete or ambiguous native data stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-native-v0.7.6
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.6.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1m, 5m, 10m, 30m, 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history by partition. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.6, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.6 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.6/evm-balances-native-v0.7.6.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.6/evm-balances-native-v0.7.6.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124).
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. A block with incomplete or ambiguous native data stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-native-v0.7.5
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.5.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1m, 5m, 10m, 30m, 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history by partition. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.5, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.5 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.5/evm-balances-native-v0.7.5.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.5/evm-balances-native-v0.7.5.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124).
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. A block with incomplete or ambiguous native data stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-native-v0.7.4
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.4.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1m, 5m, 10m, 30m, 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history by partition. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.4, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.4 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.4/evm-balances-native-v0.7.4.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.4/evm-balances-native-v0.7.4.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124).
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. A block with incomplete or ambiguous native data stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.
evm-balances-native-v0.7.3
Native account balances from Firehose Extended blocks, written to ClickHouse in the native tables of substreams-evm evm-balances v0.3.4. No RPC and no params; the default network is BSC. ERC-20 balances are the separate evm-balances-erc20 package, with their own database.
Included
| File | Modules | Contents |
|---|---|---|
evm-balances-native-v0.7.3.spkg |
map_events, db_out |
map_events: every account whose balance changed in the block, with its balance after the block, as evm.balances.v1.NativeEvents; block 0 carries the genesis allocations. db_out: those balances as ClickHouse rows, with the ClickHouse schema embedded. The sink needs only this file. |
ClickHouse tables
| Table | Key | Contents |
|---|---|---|
native_balances |
address |
Native balance after a block; the latest with FINAL |
blocks |
block_num |
Every block that wrote a native balance row |
historical_native_balances |
view | Open/high/low/close balance bars at 1m, 5m, 10m, 30m, 1h, 4h, 1d and 1w |
Balances are raw UInt256 amounts in wei. Addresses and block hashes are 0x + lowercase hex. The tables and rows match the RPC-era database's, so a new database can copy its history by partition. No table stores a chain id: use one database per network.
Token API live sink
The BSC database is bsc:evm-balances-native@v0.7.3, next to the RPC-era bsc:evm-balances@v0.3.x. The live sink takes ASSET: evm, TYPE: balances-native, VERSION: v0.7.3 and this release's package as SPKG_URL:
https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.3/evm-balances-native-v0.7.3.spkg
The Token API's native routes (/balances/native, /holders/native, /tokens/native, /balances/historical/native) read this database.
Deploy
Use pinax-network/substreams-sink-sql v4.13.0 (commit 933a187, image ghcr.io/pinax-network/substreams-sink-sql:v4.13.0). StreamingFast's own v4.13.0 lacks its fixes: substreams-sink-sql --version must name commit 933a187.
On BSC, with the flags of the Token API's BSC balances live sink:
export SUBSTREAMS_SINK_DSN='clickhouse://<user>:<password>@<host>:9000/<database>' # create <database> first
export SUBSTREAMS_API_KEY=...
PKG=https://github.com/pinax-network/substreams-evm-balances/releases/download/evm-balances-native-v0.7.3/evm-balances-native-v0.7.3.spkg
substreams-sink-sql setup "$SUBSTREAMS_SINK_DSN" "$PKG"
substreams-sink-sql run "$SUBSTREAMS_SINK_DSN" "$PKG" <start-block>: \
-e bsc.substreams.pinax.network:443 \
--undo-buffer-size=5 \
--live-block-flush-interval=20 \
--batch-block-flush-interval=1000 \
--batch-row-flush-interval=50000 \
--live-block-time-delta=3m0s \
--idle-timeout=5m \
--on-module-hash-mistmatch=errorsetup is idempotent and creates the tables, the state table, the materialized view, the view and the sink's cursors table. Other chains use other buffer and flush values; see Token API live sinks and sink behaviour.
Before you deploy
- Not live-qualified. No dated live evidence exists for this build yet (#124).
- Reorgs. The sink holds the newest 5 blocks back instead of waiting for finality. A fork deeper than that stops the sink; after a restart it continues on the canonical chain, but the rows it wrote for the orphaned blocks stay. This is an accepted risk (reorgs).
- Start block. A sync can start at block 0: it writes the genesis allocations. A block with incomplete or ambiguous native data stops the stream instead of writing a guess; only this sink stops, not the ERC-20 one.
- Native rows cover only accounts with a persisted balance change. The RPC era also wrote unchanged accounts.
- Cutover from the RPC-era database: follow the cutover steps and the cutover contract.