Skip to content

feat: add ISSUE-190 Soroban transaction event monitor example - #265

Merged
Dantama022 merged 1 commit into
Dantama022:mainfrom
Olisachukwuma1:feat/190-soroban-transaction-event-monitor
Aug 31, 2026
Merged

feat: add ISSUE-190 Soroban transaction event monitor example#265
Dantama022 merged 1 commit into
Dantama022:mainfrom
Olisachukwuma1:feat/190-soroban-transaction-event-monitor

Conversation

@Olisachukwuma1

Copy link
Copy Markdown
Contributor
  • Add src/examples/190-soroban-transaction-event-monitor.ts
    • Validates transaction hash (64 hex chars)
    • Polls until terminal state with configurable interval/maxInterval/timeout
    • Retries on transient RPC failures without terminating
    • Retrieves contract events and diagnostic events by ledger window
    • Decodes ScVal topics and data with formatNativeValue (JSON-safe)
    • Groups events by contract and event type/name
    • Preserves raw XDR alongside decoded values
    • Handles no-event, failed tx, timeout, and unsupported ScVal cases
    • Supports JSON output via params.json or JSON_OUTPUT env var
  • Add tests/soroban-transaction-event-monitor.test.ts
    • Covers hash validation, polling, timeout, transient errors
    • Covers event parsing, topic/value decoding, grouping
    • Covers empty events, failed tx, JSON output
    • Covers runner registration and README documentation
  • Register example in src/runner/catalog.ts with rpcUrl/txHash prompts
  • Add entry to README example catalog

Summary

Describe the changes introduced by this Pull Request.

Related Issue

Closes #250

Type of Change

  • 🚀 New example script added
  • 🐛 Bug fix (fixes an execution error in an example)
  • 📝 Documentation update (updates inline commentary or README)
  • 🧪 Test improvement

Changes Made

  • List changes made
  • Note any testnet addresses or networks tested against

Testing

  • The example runs successfully on Testnet (npm run run-example <name>)
  • Linter check passes (npm run lint)
  • Type check passes (npm run typecheck)

CLI Output

Paste successful execution logs from your terminal here.

- Add src/examples/190-soroban-transaction-event-monitor.ts
  - Validates transaction hash (64 hex chars)
  - Polls until terminal state with configurable interval/maxInterval/timeout
  - Retries on transient RPC failures without terminating
  - Retrieves contract events and diagnostic events by ledger window
  - Decodes ScVal topics and data with formatNativeValue (JSON-safe)
  - Groups events by contract and event type/name
  - Preserves raw XDR alongside decoded values
  - Handles no-event, failed tx, timeout, and unsupported ScVal cases
  - Supports JSON output via params.json or JSON_OUTPUT env var
- Add tests/soroban-transaction-event-monitor.test.ts
  - Covers hash validation, polling, timeout, transient errors
  - Covers event parsing, topic/value decoding, grouping
  - Covers empty events, failed tx, JSON output
  - Covers runner registration and README documentation
- Register example in src/runner/catalog.ts with rpcUrl/txHash prompts
- Add entry to README example catalog
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@Olisachukwuma1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Dantama022
Dantama022 merged commit 44a18e0 into Dantama022:main Aug 31, 2026
1 of 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.

ISSUE-190: Add Soroban Transaction Event Monitor Example

2 participants