Skip to content

Add Soroban transaction status polling example (ISSUE-189) - #264

Merged
Dantama022 merged 1 commit into
Dantama022:mainfrom
Olisachukwuma1:feature/189-soroban-transaction-polling
Aug 31, 2026
Merged

Add Soroban transaction status polling example (ISSUE-189)#264
Dantama022 merged 1 commit into
Dantama022:mainfrom
Olisachukwuma1:feature/189-soroban-transaction-polling

Conversation

@Olisachukwuma1

@Olisachukwuma1 Olisachukwuma1 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Description

Implements a production-oriented Soroban transaction-status polling workflow as requested in ISSUE-189.

Changes

  • src/examples/189-soroban-transaction-polling.ts: New example demonstrating:

    • Configurable polling interval with exponential backoff
    • Support for multiple transaction states (not found, pending, success, failed)
    • Timeout handling and graceful cancellation
    • Retry logic for temporary RPC failures
    • JSON output support
    • Transaction hash validation
    • Real-time polling progress display
  • src/runner/catalog.ts: Registered example in the interactive runner

  • src/validation/validation.config.json: Excluded from automated validation (requires live RPC)

  • README.md: Updated with example documentation and usage instructions

Key Features

✅ Configurable polling interval and exponential backoff
✅ Support for all transaction states (not found, pending, success, failed)
✅ Timeout handling and graceful cancellation
✅ Temporary RPC failure retry with permanent error detection
✅ Transaction hash validation
✅ Real-time progress display with attempt numbers and elapsed time
✅ JSON output format
✅ Environment variable and CLI argument support

Usage

npm run run-example 189-soroban-transaction-polling

# With environment variables
SOROBAN_RPC_URL=https://... TRANSACTION_HASH=abc... npm run run-example 189-soroban-transaction-polling

Acceptance Criteria Met

  • ✅ Runnable example polls until final state or timeout
  • ✅ Transaction hashes are validated
  • ✅ Pending transactions continue to be polled
  • ✅ Successful transactions terminate polling
  • ✅ Failed transactions terminate polling
  • ✅ Not-found responses handled appropriately
  • ✅ Exponential backoff configured correctly
  • ✅ Maximum polling interval respected
  • ✅ Overall timeout enforced
  • ✅ Temporary RPC failures retried safely
  • ✅ Permanent errors handled with useful message
  • ✅ Graceful cancellation supported
  • ✅ Polling progress displayed
  • ✅ JSON output works
  • ✅ Registered in interactive runner
  • ✅ Documented in README

Closes #249

- Create src/examples/189-soroban-transaction-polling.ts with production-oriented polling workflow
- Implement configurable polling interval and exponential backoff
- Support timeout handling, transaction state detection, and graceful cancellation
- Register example in runner catalog
- Exclude from automated validation due to live RPC dependency
- Update README with example documentation
- Support both CLI arguments and environment variables for RPC endpoint and transaction hash
@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 b71ee3e 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-189: Add Soroban Transaction Status Polling Example

2 participants