Output
world.v1.EventsInputs
Package ref
world-predict@v0.1.0Run package
CLI
Run map_events from the command line.
substreams run world-predict@v0.1.0 map_events -e solana --start-block -1substreams auth or directly on thegraph.market (see docs).README
Substreams package that indexes World (world.xyz) prediCt prediction-market instructions on Solana mainnet, shaped for a ClickHouse from-proto SQL sink (StreamingFast hosted on thegraph.market).
World’s market program prediCtPZCttYMvm2W3PtxmMxLmT1dtN7riU6Cxh6tM holds collateral (CASH), mints YES/NO outcome tokens as complete sets (split / merge), and is driven through lifecycle instructions (initialize_market, determine_outcome, redeem_outcome_for_user, close_market). This package walks top-level and CPI instructions (walk_instructions), matches Anchor discriminators, and emits one typed protobuf message per instruction (and one ClickHouse table per type).
Decoding layouts follow independent mainnet reverse-engineering (prediCt publishes no IDL). Account maps for split / merge / determine_outcome are well verified; initialize_market data layout is decoded; redeem/close account labels are best-effort.
| Module | Kind | Output | Description |
|---|---|---|---|
map_events | map | proto:world.v1.Events | Decodes high-value prediCt instructions into typed events for SQL |
| Table | Instruction | Notes |
|---|---|---|
splits | split | Amount + market / mints / vault / ATAs |
merges | merge | Mirror of split |
initialize_markets | initialize_market | Market id, window, YES/NO metadata |
determine_outcomes | determine_outcome | Outcome u16 (0 = NO, 10000 = YES) |
redeem_outcome_for_users | redeem_outcome_for_user | Operator payout push |
close_markets | close_market | Post-settlement teardown |
initialBlock: 431000000 (launch-day window; program deploy is ~429950041).
substreams auth / The Graph Market API key)wasm32-unknown-unknown, bufsubstreams build
# Data-plane auth once
# substreams auth
substreams run ./substreams.yaml map_events \
--network solana \
-s 431000000 -t +100 \
-o jsonl
Inspect JSONL for splits/merges/lifecycle rows before deploying a sink.
substreams run output quality (stdout only — not a local DB sync).substreams publish and usehttps://api.substreams.dev/v1/packages/world-predict/<version>spkg.url.solanaoutput_module: map_eventsmodule_output_type: proto:world.v1.Eventssecure: true for ClickHouse Cloud)StreamingFast hosts the sink runner only; you supply a reachable ClickHouse.
| Item | Value |
|---|---|
| Program | prediCtPZCttYMvm2W3PtxmMxLmT1dtN7riU6Cxh6tM |
| Collateral | CASHx9KJUStyftLFWGvEVf59SGeG9sh5FfcnZMVPCASH (Token-2022, 6 decimals) |
| Network | solana |
Modules
Output
world.v1.EventsInputs