Skip to content

feat: implement Soroban event XDR decoder in StellarIndexerService#14

Open
JHON12091986 wants to merge 1 commit into
coopfinance:mainfrom
JHON12091986:feat/issue-2-xdr-decoder
Open

feat: implement Soroban event XDR decoder in StellarIndexerService#14
JHON12091986 wants to merge 1 commit into
coopfinance:mainfrom
JHON12091986:feat/issue-2-xdr-decoder

Conversation

@JHON12091986

Copy link
Copy Markdown

Closes #2
/claim #2

Changes

  • Implemented Soroban event XDR decoder using @stellar/stellar-sdk
  • Added handlers for contribution, loan_requested, and loan_approved events
  • Added lastSyncedLedger tracking to avoid duplicate processing
  • Added unit tests for event processing

Testing

  • ✅ Contribution events upserted correctly
  • ✅ Loan requested events handled
  • ✅ Loan approved events update status
  • ✅ Duplicate events handled gracefully

Technical Details

  • Uses scValToNative from @stellar/stellar-sdk to decode XDR payloads
  • Implements lastSyncedLedger map to track processed ledgers
  • Handles events with upsert operations to avoid duplicates

Ready for review | @coopfinance/maintainers

Payment wallet (USDC on Ethereum): 0x46243c949f30280771c0675Bc8A16155A9B96e51

@JHON12091986

Copy link
Copy Markdown
Author

@Vyacheslav-Tomashevskiy Great work on #18! Your implementation is more complete and includes tests. I'm closing my PR (#14) since yours covers everything needed.

@Mona-i I'm closing #14 in favor of #18, which has a more thorough implementation.

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.

[API] Implement Soroban event XDR decoder in StellarIndexerService

1 participant