Decode all Raydium CLMM instructions (program CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK) using walk_instructions (CPI-safe). Structured fields from the official Anchor IDL.
Output
raydium.clmm.v1.EventsInputs
Package ref
raydium-clmm-events@v0.1.0Run package
CLI
Run map_events from the command line.
substreams run raydium-clmm-events@v0.1.0 map_events -e solana --start-block -1substreams auth or directly on thegraph.market (see docs).README
Solana mainnet Substreams package that decodes all Raydium CLMM instructions into structured protobuf tables for a ClickHouse sink (StreamingFast hosted SQL / from-proto).
| Item | Value |
|---|---|
| Network | solana (mainnet) |
| Program | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK |
| Layout source | Anchor IDL (idl/raydium_clmm.json) |
| Output | map_events → raydium.clmm.v1.Events |
| Sink | ClickHouse via from-proto (SQL annotations on proto) |
initialBlock | 432400000 (~1 day before head as of scaffold) |
map_events walks successful transactions with walk_instructions() (includes CPI/inner instructions) and emits:
| Proto field | ClickHouse table | Instructions |
|---|---|---|
swaps | raydium_clmm_swaps | swap, swap_v2, swap_router_base_in |
positions | raydium_clmm_positions | open / increase / decrease / close position variants |
pools | raydium_clmm_pools | create_pool, create_customizable_pool |
configs | raydium_clmm_configs | amm/dynamic fee/operation/support mint updates |
fees | raydium_clmm_fees | collect_fund_fee, collect_protocol_fee |
rewards | raydium_clmm_rewards | reward lifecycle instructions |
limit_orders | raydium_clmm_limit_orders | limit order open/increase/decrease/settle/close |
Every row includes id (signature + ordinal), slot, signature, ordinal, is_inner, instruction, named accounts from the IDL, and typed instruction args (u128 as decimal strings).
wasm32-unknown-unknown (rustup target add wasm32-unknown-unknown)substreams build)substreams auth (thegraph.market)Without auth, substreams run fails with Unauthenticated / missing JWT or API key.
substreams build
# ~100 slots near initialBlock
substreams run -s 432400000 -t +100 map_events -o jsonl
# GUI
substreams gui -s 432400000 -t +100 map_events
Schema is generated from schema.table / schema.field annotations in proto/events.proto.
Self-managed:
substreams-sink-sql from-proto "clickhouse://default:@localhost:9000/default" ./substreams.yaml
StreamingFast hosted sink: publish/pack the .spkg, then create a hosted SQL deployment against ClickHouse pointing at module map_events (Portal). The sink type is already declared in substreams.yaml.
Query tip: filter reorg-deleted rows with _deleted_ = 0 when using the sink’s ReplacingMergeTree layout.
Discriminators and account indexes come from raydium-idl. Nested args (CreateCustomizableParams, InitializeRewardParam) are flattened into typed fields.
Modules
Decode all Raydium CLMM instructions (program CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK) using walk_instructions (CPI-safe). Structured fields from the official Anchor IDL.
Output
raydium.clmm.v1.EventsInputs