Skip to content

Add local DB support for fetching dotrain source #2447

@findolor

Description

@findolor

Summary

Currently, fetch_dotrain_source() always queries the metaboard subgraph (a remote GraphQL service) to resolve dotrain source code, even when the local DB is available and syncing on-chain events. This creates an unnecessary dependency on an external service and adds latency.

Goal

Enable the local DB sync pipeline to index MetaV1_2 events from the metaboard contract, so dotrain sources can be resolved locally without hitting the subgraph. This follows the same "local first, remote fallback" pattern already established for order fetching.

Implementation Steps

  1. Add contract address to metaboard configAdd contract address field to MetaboardCfg #2444
  2. Index metaboard events in the sync pipelineIndex metaboard contract events in the sync pipeline #2445
  3. Use local DB in fetch_dotrain_source()Use local DB for fetching dotrain source #2446

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions