Skip to main content

Module data_source

Module data_source 

Source
Expand description

data_source module — mirrors graph-ts dataSource

PHASE C BLOCKER: Both functions below are stubs. They need runtime context from graph-node that is only available when the plugin is loaded by RuntimeHost::process_mapping_trigger:

  • network() needs the deployment’s network string from DataSourceDetails
  • create() needs to register a dynamic data source with the SubgraphRunner via BlockState::created_data_sources

Until Phase C wiring, any handler using these will get wrong results. The transpiler should mark handlers using data_source::create() as unsupported (WASM fallback).

Tests for these functions are also blocked on Phase C — they require mocking graph-node’s deployment context.

Functions§

create
STUB: No-op. Phase C will wire to BlockState::created_data_sources.
network
STUB: Returns hardcoded “mainnet”. Phase C will read from DataSourceDetails.