Package Logo
starknet_foundational
starknet-foundational@v0.1.3
Total Downloads
1282
Published
3 months ago
Network
starknet starknet
Publisher
User Avatar streamingfast
Docs
README

Substreams in Go with tinygo

First test is to receive a Clock in Go, and ship it to the Substreams engine, and have it run over there.

  • Craft a first map_mod that prints something to logs.

First test is to unpack a raw Ethereum Block, from within tinygo.

Build

tinygo build -o wasm.wasm -target wasi -gc leaking -scheduler none .

Usage

substreams gui ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test
# or
substreams run ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test
buf generate --exclude-path sf/substreams-starknet/v1,sf/substreams-starknet/rpc,google/,sf/substreams-starknet/sink,sf/substreams-starknet
)
Documentation
Modules
Maps icon
Maps

map
all_transactions

d22e9bf310f0c87039c4aa45176cf760b0e0f8dd
map all_transactions (
blocksf.starknet.type.v1.Block
)  -> sf.substreams.starknet.type.v1.Transactions

all_transaction reads from the sf.starknet.type.v1.Block source and outputs a list of all transactions in the block.

substreams gui starknet-foundational@v0.1.3 all_transactions

map
filtered_transactions

48733b8e2dc213a944b4263501e92a8215105833
Default param : (rc:execution_status:1)

filtered_transactions reads from all_transactions and applies a filter on keys, only outputting the transactions that match the filter. Example usage: (tx:class_hash:0x0000000 && rc:type:0)

substreams gui starknet-foundational@v0.1.3 filtered_transactions
Block Indexes icon
Block Indexes

blockIndex
index_transactions

b52788088cd39b868849082285b0e00f80c4744c

index_events sets the keys corresponding to all event 'types' and 'attribute keys' in the block

substreams gui starknet-foundational@v0.1.3 index_transactions
Protobuf

Protobuf Docs Explorer

sf.starknet.type.v1