GistPin — GrantFox bounty issue. Reviewed against the acceptance criteria below. Read contracts/README.md first — it has the full ABI, event schema, and error codes for the deployed contract.
Context
GistPin's design intent (see Backend/README.md) is that the chain is the
source of truth — gists posted directly on-chain (e.g. by a future
wallet-direct frontend) must still show up via the API. That requires an
indexer that polls Soroban and reconciles into Postgres. The module exists
but is inert.
Problem
Backend/src/indexer/indexer.module.ts and indexer.service.ts exist but
IndexerModule is never imported into AppModule. It currently does
nothing when the app runs.
Scope
In scope:
- Import
IndexerModule into AppModule so its poll loop actually runs.
- Implement/complete the poll loop: track the last-processed ledger
(persist it — don't reprocess from genesis on every restart), fetch new
events since that ledger via SorobanService.getEventsSince, and hand
each decoded event off to a handler (the persistence logic is a separate
issue — this issue is the polling/scheduling plumbing).
- Sensible polling interval (use
@nestjs/schedule, already a dependency)
and basic error handling (a single bad event/ledger must not permanently
wedge the loop).
Out of scope: the actual DB writes for each event type (next issue) —
stub/log them here if that issue isn't merged yet, or coordinate order.
Acceptance Criteria
How to verify your own work
cd Backend && npm run start:dev
# post a gist directly via the contract CLI (bypassing the API) and confirm
# the indexer's logs show it being picked up on the next poll
stellar contract invoke --id CCOVX5S3SYHVKUKM3NUXLH6COIYLV5BL3XD6HPFLLR4VLQEQGINJMDRV --source <your-identity> --network testnet --send=yes -- post_gist --location_cell "idxtest" --content_hash "QmIdx"
Depends on: the event-decoding issue.
Blocks: the "persist events to Postgres" issue.
Estimated effort: Medium (1-2 days). NestJS scheduling knowledge helpful.
Context
GistPin's design intent (see
Backend/README.md) is that the chain is thesource of truth — gists posted directly on-chain (e.g. by a future
wallet-direct frontend) must still show up via the API. That requires an
indexer that polls Soroban and reconciles into Postgres. The module exists
but is inert.
Problem
Backend/src/indexer/indexer.module.tsandindexer.service.tsexist butIndexerModuleis never imported intoAppModule. It currently doesnothing when the app runs.
Scope
In scope:
IndexerModuleintoAppModuleso its poll loop actually runs.(persist it — don't reprocess from genesis on every restart), fetch new
events since that ledger via
SorobanService.getEventsSince, and handeach decoded event off to a handler (the persistence logic is a separate
issue — this issue is the polling/scheduling plumbing).
@nestjs/schedule, already a dependency)and basic error handling (a single bad event/ledger must not permanently
wedge the loop).
Out of scope: the actual DB writes for each event type (next issue) —
stub/log them here if that issue isn't merged yet, or coordinate order.
Acceptance Criteria
IndexerModuleruns as part of the app on startupreprocessing from scratch every time)
subsequent ledgers from being processed
event is skipped without halting the loop
npm run build && npm testpassHow to verify your own work
Depends on: the event-decoding issue.
Blocks: the "persist events to Postgres" issue.
Estimated effort: Medium (1-2 days). NestJS scheduling knowledge helpful.