Package Logo
xarb-spoke
xarb-spoke@v0.1.1
Total Downloads
76
Published
8 hours ago
Network
sepolia sepolia
Publisher
User Avatar rladyd818

Readme

xarb-substreams-spoke

Substreams package for xArb spoke-side events on:

  • Ethereum Sepolia (11155111)
  • Polygon Amoy (80002)

Directory

xarb-substreams-spoke/
  substreams.yaml
  .env.example
  src/
  build.rs

Build

cd /Users/kd/substreams/xarb-substreams/xarb-substreams-spoke
cp -n .env.example .env
substreams build

Run (Events Only)

map_events_only is the default output module used by current propagator flow.

Sepolia:

cd /Users/kd/substreams/xarb-substreams/xarb-substreams-spoke
substreams run substreams.yaml map_events_only

Amoy:

cd /Users/kd/substreams/xarb-substreams/xarb-substreams-spoke
substreams run substreams.yaml map_events_only --network polygon-amoy

Optional Run (Events + Calls)

Use map_events_calls only when you need call-level output.

cd /Users/kd/substreams/xarb-substreams/xarb-substreams-spoke
set -a
source .env
set +a

substreams run substreams.yaml map_events_calls \
  -p "map_calls=${XARB_SPOKE_TRACKED_CONTRACTS_SEPOLIA}"

Tracked Address Sync

When contracts are re-deployed, run the monorepo sync script:

cd /Users/kd/substreams/xarb-substreams
./scripts/redeploy_and_sync_contracts.sh

It updates .env, deployment JSONs, and substreams.yaml filters to latest addresses.

Notes

  • substreams.yaml has static blockFilter values for call indexing modules.
  • If manual edits are made to tracked addresses, rebuild with substreams build.

Documentation

Modules

Maps icon
Maps

map
map_tx_indices

c8e9b6826064f53986deeee63b9f4a283526e8b1
map map_tx_indices (
blocksf.ethereum.type.v2.Block
)  -> contract.v1.TxIndices
substreams gui xarb-spoke@v0.1.1 map_tx_indices

map
map_events

89c13ca5da04727f8e374848a7a3f0e650631ffa
substreams gui xarb-spoke@v0.1.1 map_events

map
map_calls

fce46c4dbacfee154dbeaa6f7c2571bb4cb9cd5e
map map_calls (
paramsstring
)  -> contract.v1.Calls
substreams gui xarb-spoke@v0.1.1 map_calls

map
map_events_calls

d7eeff952e95c0c19a89a841be0b148136a6ef58
substreams gui xarb-spoke@v0.1.1 map_events_calls

map
map_events_only

2ff747863c9cd376deb703b1a523469e75888903
substreams gui xarb-spoke@v0.1.1 map_events_only

map
ethcommon:all_events

433686393b184c57628660f7dbe6cfed4d72a9e9
map ethcommon:all_events (
)  -> sf.substreams.ethereum.v1.Events

all_events gives you all the events in a block (from successful transactions), with basic block hash/number/timestamp and transaction hash

substreams gui xarb-spoke@v0.1.1 ethcommon:all_events

map
ethcommon:all_calls

24025f6e747a1e5fcee9a308f132a566d7a3e771
map ethcommon:all_calls (
)  -> sf.substreams.ethereum.v1.Calls

all_calls gives you all the calls in a block (including internal calls), with basic block hash/number/timestamp and transaction hash

substreams gui xarb-spoke@v0.1.1 ethcommon:all_calls
Block Indexes icon
Block Indexes

blockIndex
ethcommon:index_calls

3905aca0b839f90a6e4a024f963c327839e71143

index_calls sets the following keys on the block:

  • Call contract call_to:0x0123456789abcdef0123456789abcdef01234567 (contract address in hex, prefixed by 0x)
  • Caller call_from:0x0123456789abcdef0123456789abcdef01234567 (caller address in hex, prefixed by 0x)
  • Call method call_method:0x01234567 (4 bytes of method signature in hex, prefixed by 0x)
substreams gui xarb-spoke@v0.1.1 ethcommon:index_calls
Protobuf

Protobuf Docs Explorer

sf.ethereum.substreams.v1
sf.ethereum.transform.v1
sf.ethereum.type.v2
contract.v1