Skip to content

Develop Stellar/Soroban Event Listener Indexer Service #3

Description

@Luluameh
  • Labels: backend, indexer, stellar, soroban

Description

To keep the database in sync with on-chain interactions, we need a backend service that polls the Stellar Horizon / Soroban RPC endpoint for events emitted by our Escrow and Dispute smart contracts.

Technical Scope & Steps

  1. Set up a polling interval script using the @stellar/stellar-sdk to monitor ledger state.
  2. Filter transaction events by contract ID and event topics (e.g., fund_session, pause_session, refund_session, complete_session).
  3. Decode contract XDR event payloads into readable JSON data.
  4. Update the corresponding Session and Transaction status in the PostgreSQL database based on event content.
  5. Track and store the last processed ledger sequence to prevent double-processing or missed sequences on restart.

Acceptance Criteria

  • Simulating a contract event triggers the database update within 5 seconds.
  • Restarts continue processing from the last saved ledger sequence.
  • Failures in decoding event payloads do not crash the service.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions