Decoded data

Get the swap.
Not the log.

Transactions arrive as the entities your product already talks about, instead of raw events you decode yourself.

  • Business entities
  • Composable modules
  • Reusable packages
  • Open source
≪SF / 01
FirehoseBlockchain extraction
HistoricalStreaming
≫SF / 02
SubstreamsParallel transformation
ComposableRust
Ethereum → Firehose → Substreams → PostgreSQL
Interactive illustration
Built in the open. Explore the code A core developer on The Graph

StreamingFast
ecosystem

The GraphMessariDecentralandAirstack

01 Decoded data

Looks familiar?

Want to see your own contracts decoded?

Get an API key
RUST → WEBASSEMBLY

Decoding is a layer, not a step.

Turning logs into entities is not a one-off script. It is a layer you version, test and keep correct as contracts change. Substreams packages are that layer, written once and reused: you start from a module that already decodes what you need, and spend your time on the rules that are specific to your product.

Read the guide
FilterMapAggregateDeliver
▧ substreams.yamlPACKAGE STRUCTURE
01 specVersion: v0.1.0
02 package:
03   name: token_transfers
04   version: v0.1.0
05
06 modules:
07   - name: map_transfers
08     kind: map
09     inputs:
10       - source: sf.ethereum.type.v2.Block
11     output:
12       type: proto:transfers.Transfers
Illustrative excerpt Build a complete package ↗

What you get

01 /

Modules you did not write

Start from an existing package for the protocol instead of decoding it again.

02 /

Composability

Modules feed modules. The output of one is the input of the next.

03 /

Your entities, not ours

Map decoded events onto a swap, a position, a holder, whatever your product calls it.

04 /

Open source

You can read the decoding logic you depend on.

05 /

One output, many destinations

The same stream lands in a database, a file or your own consumer.

02 Decoded data

How it works

FROM HISTORY TO THE CHAIN HEAD
Historical blocks
New blocks
TRANSACTIONS
TRACES & LOGS
STATE CHANGES
Rich block data. One continuous stream.
01

Pick a module

Find the package that already handles the protocol you care about.

02

Model your entities

Write only the rules that are yours.

03

Stream the result

Send it where you consume it, continuously rather than on a schedule.

Want to see your own contracts decoded?

Get an API key

03 Decoded data

What you stop owning

[01]

A decoder per contract, and the day a proxy upgrade breaks it

[02]

A test suite for other people's ABIs

[03]

The gap between a decoded event and a correct balance