Skip to content

Event response pagination not implemented #6

Description

@DeFiVC

What

fetchContractEvents calls server.getEvents with limit: 100 (100 events max per response). If a contract emits more than 100 events across the fetched ledger range, the Soroban RPC returns only the first 100 and provides a cursor field for pagination. The code never checks for or follows this cursor.

Why

The remaining events are silently dropped and never indexed. On a busy network (e.g., a token with many simultaneous transfers), this causes permanent data loss because the cursor advances past those ledgers.

Scope

  • Implement pagination by following the cursor from the response
  • Process all events in the ledger range

Acceptance Criteria

  • All events in the ledger range are fetched and processed
  • Pagination is handled correctly

Technical Context

  • File: src/indexer/event-listener.ts, lines 142-152
  • The Soroban RPC getEvents response includes a cursor field when there are more results

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions