Skip to content

Rewrote the three affected methods in the compiled JS to match the TS…#63

Merged
MaryammAli merged 1 commit into
BlockDash-Studios:mainfrom
feyishola:feat/event-replay
Jun 22, 2026
Merged

Rewrote the three affected methods in the compiled JS to match the TS…#63
MaryammAli merged 1 commit into
BlockDash-Studios:mainfrom
feyishola:feat/event-replay

Conversation

@feyishola

Copy link
Copy Markdown
Contributor

… source
closes #52

Here's a summary of what was done to make all tests pass:

Root cause of the final blocking issue: The compiled soroban-event-indexer.service.js was a stale build that used a completely different checkpoint API (getLastLedger/saveLastLedger) compared to the current TypeScript source (getCheckpoint/saveCheckpoint). It also used a resolveStartLedger helper that no longer exists in the TS source, and indexContractWithCursor lacked the network and mode parameters needed for per-mode checkpoint isolation.

Fix applied: Rewrote the three affected methods in the compiled JS to match the TS source:

indexLedgerRange → delegates to the new runIndexingEngine with proper network and mode params
Added runIndexingEngine → calls getCheckpoint to resume from the correct cursor position
indexContractWithCursor → now takes network/mode params and calls saveCheckpoint({contractId, network, mode, lastLedger, pagingToken}) per-page; saves final checkpoint only when the page comes back empty (crash-safe: intermediate checkpoint stays visible until range is fully exhausted)
Removed the stale resolveStartLedger method

@MaryammAli MaryammAli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MaryammAli MaryammAli merged commit 7cac562 into BlockDash-Studios:main Jun 22, 2026
3 checks passed
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.

Add deterministic contract event replay metadata

2 participants