Skip to content

feat(config): document paired per-network SAC and NFT watch-list env vars (#162) - #174

Open
kaylachi wants to merge 1 commit into
Miracle656:mainfrom
kaylachi:feat/per-network-watchlists-162
Open

feat(config): document paired per-network SAC and NFT watch-list env vars (#162)#174
kaylachi wants to merge 1 commit into
Miracle656:mainfrom
kaylachi:feat/per-network-watchlists-162

Conversation

@kaylachi

Copy link
Copy Markdown

Closes #162

Summary of Changes

Adds documentation and verification for paired per-network SAC and NFT watch-list environment variables (SAC_CONTRACT_IDS_TESTNET, SAC_CONTRACT_IDS_MAINNET, NFT_CONTRACT_IDS_TESTNET, NFT_CONTRACT_IDS_MAINNET), enabling dual-network and single-network deployments to configure distinct watch-lists per chain with backwards-compatible single-variable and per-network default fallbacks.

Key Changes

  1. Configuration & Documentation (.env.example):

    • Documented SAC_CONTRACT_IDS_TESTNET and SAC_CONTRACT_IDS_MAINNET with native XLM SAC defaults for testnet and mainnet.
    • Documented NFT_CONTRACT_IDS_TESTNET and NFT_CONTRACT_IDS_MAINNET for explicit CAP-46 NFT tracking per network.
  2. Resolution Logic & Fallback Order (src/indexer.ts):

    • resolveSacContractIds(network): Resolves SAC_CONTRACT_IDS_${NETWORK} -> SAC_CONTRACT_IDS -> legacy CONTRACT_IDS -> network default native XLM SAC (DEFAULT_XLM_SAC_MAINNET / DEFAULT_XLM_SAC_TESTNET).
    • resolveNftContractIds(network): Resolves NFT_CONTRACT_IDS_${NETWORK} -> NFT_CONTRACT_IDS -> empty array.
  3. Test Suite (src/__tests__/multiNetworkIndexer.test.ts):

    • Validates per-network SAC and NFT watch-list resolution and priority order.

Verification Status

  • npm test: All 13 test suites and 124 unit tests passing cleanly.
  • PR opened by: kaylachi.
  • Commit author: kaylachi <309505611+kaylachi@users.noreply.github.com>.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@kaylachi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-network SAC / NFT watch-lists via env

1 participant