You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depends on: Issue 3 Primary outcome: The indexer can discover SO4 contracts, tokens, and markets from deployment outputs instead of hardcoded IDs.
Background
The contracts repo writes deployment outputs to .deployed/<NETWORK>.env, .stellar/contract-ids/<NETWORK>.json, .stellar/wasm-hashes/<NETWORK>.json, and frontend exports such as .deployed/frontend-<NETWORK>.env and .deployed/frontend-<NETWORK>.ts. The indexer must consume these outputs for testnet and local runs.
Implementation checklist
Add a manifest ingestion script under apps/s03-indexer/scripts/.
Support a configurable contracts repo path, defaulting to ../contracts or an env var, not a hidden absolute path.
Read deployment files from /home/sunny/zero/so4-market-project/contracts when using the default local repo layout.
Generate an indexer-local JSON config such as apps/s03-indexer/config/contracts.testnet.json.
Include network name and network passphrase in the generated config.
Include Horizon and Soroban RPC endpoints in the generated config.
Include core contracts: role_store, data_store, oracle, market_factory, deposit_handler, withdrawal_handler, order_handler, liquidation_handler, adl_handler, fee_handler, referral_storage, reader, and exchange_router.
Include test token contracts: TUSDC, TWBTC, TETH, TXLM, and faucet.
Include market tokens and their index/long/short token triplets.
Validate every contract ID shape before writing config.
Fail with actionable errors when deployment files are missing or incomplete.
Allow missing MARKET_TOKEN_* values only before bootstrap, and report them clearly.
Add package scripts such as sync:contracts:testnet and sync:contracts:local.
Update project.ts to read contract IDs and endpoints from generated config/env.
Acceptance checklist
A contributor can deploy/bootstrap contracts, run one sync command, and see indexer config update.
Local and testnet configs can coexist without overwriting each other.
The indexer no longer relies on the starter template's generic hardcoded transfer filter.
Missing or malformed deployment data fails fast with useful error text.
Verification commands
Run bun run --cwd apps/s03-indexer sync:contracts:testnet.
Depends on: Issue 3
Primary outcome: The indexer can discover SO4 contracts, tokens, and markets from deployment outputs instead of hardcoded IDs.
Background
The contracts repo writes deployment outputs to
.deployed/<NETWORK>.env,.stellar/contract-ids/<NETWORK>.json,.stellar/wasm-hashes/<NETWORK>.json, and frontend exports such as.deployed/frontend-<NETWORK>.envand.deployed/frontend-<NETWORK>.ts. The indexer must consume these outputs for testnet and local runs.Implementation checklist
apps/s03-indexer/scripts/.../contractsor an env var, not a hidden absolute path./home/sunny/zero/so4-market-project/contractswhen using the default local repo layout.apps/s03-indexer/config/contracts.testnet.json.role_store,data_store,oracle,market_factory,deposit_handler,withdrawal_handler,order_handler,liquidation_handler,adl_handler,fee_handler,referral_storage,reader, andexchange_router.TUSDC,TWBTC,TETH,TXLM, and faucet.MARKET_TOKEN_*values only before bootstrap, and report them clearly.sync:contracts:testnetandsync:contracts:local.project.tsto read contract IDs and endpoints from generated config/env.Acceptance checklist
Verification commands
bun run --cwd apps/s03-indexer sync:contracts:testnet.bun run --cwd apps/s03-indexer build.