Background
startIndexer() runs a single loop with module-global state (totalIndexed, pollCycleCount, startedAt) and resolves one set of watched contracts. Depends on W070 (network column) and W071 (per-network RPC). To index both networks in one process, the loop must run once per network with isolated state and its own RPC + watch-list + passphrase.
What to build
Parameterize the indexer by network and launch one loop instance per configured network.
Key files
src/indexer.ts — startIndexer() (206-286), resolveSacContractIds() (51-71), DEFAULT_XLM_SAC_MAINNET/TESTNET (35-38)
src/ingester/nft.ts — passphrase selection (122-124)
Suggested execution
git checkout -b feat/multi-network-indexer
- Make
startIndexer(network) take a network; move per-loop counters into local state
- Use
getRpc(network) (W071) and the network's passphrase (Networks.PUBLIC/TESTNET)
- Read the enabled networks from env (e.g.
NETWORKS=testnet,mainnet) and start a loop for each
- Ensure writes tag
network (W070)
Acceptance criteria
Drips Wave · Complexity: Advanced · 200 points
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
Background
startIndexer()runs a single loop with module-global state (totalIndexed,pollCycleCount,startedAt) and resolves one set of watched contracts. Depends on W070 (network column) and W071 (per-network RPC). To index both networks in one process, the loop must run once per network with isolated state and its own RPC + watch-list + passphrase.What to build
Parameterize the indexer by network and launch one loop instance per configured network.
Key files
src/indexer.ts—startIndexer()(206-286),resolveSacContractIds()(51-71),DEFAULT_XLM_SAC_MAINNET/TESTNET(35-38)src/ingester/nft.ts— passphrase selection (122-124)Suggested execution
startIndexer(network)take a network; move per-loop counters into local stategetRpc(network)(W071) and the network's passphrase (Networks.PUBLIC/TESTNET)NETWORKS=testnet,mainnet) and start a loop for eachnetwork(W070)Acceptance criteria
/statusreports per-network progressRequired: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk