Skip to content

[108] ISSUE-081: Add Soroban Transaction Preflight Example - #148

Merged
Dantama022 merged 2 commits into
Dantama022:mainfrom
esthertitilayo-dev:fix/108-add-soroban-transaction-preflight-example
Jul 29, 2026
Merged

[108] ISSUE-081: Add Soroban Transaction Preflight Example#148
Dantama022 merged 2 commits into
Dantama022:mainfrom
esthertitilayo-dev:fix/108-add-soroban-transaction-preflight-example

Conversation

@esthertitilayo-dev

Copy link
Copy Markdown
Contributor

Summary

  • Adds src/examples/81-transaction-preflight.ts, demonstrating the full Soroban preflight workflow: connect to RPC, fund an ephemeral fee-payer, build an invocation, run preflight simulation, extract the ledger footprint/authorization entries/resource fee, assemble the final transaction, then sign, submit, and poll for confirmation.
  • Unlike 68-soroban-contract-simulation (which stops after assembly), this example completes the lifecycle and explicitly explains how a full preflight differs from an ordinary read-only simulation.
  • Preflight failures are handled gracefully via a pure, testable describePreflightFailure helper that never throws and always returns actionable guidance.
  • Registers the example in src/runner/catalog.ts and documents it in README.md (roadmap entry + Direct Run section).
  • Adds tests/transaction-preflight.test.ts covering footprint extraction (against a real constructed xdr.SorobanTransactionData), auth summarization, resource fee formatting, failure guidance, the preflight-vs-simulation explanation, runner registration, and README docs.
  • Adds a validation.config.json exclusion entry for the new example (requires live Soroban RPC + deployed contract).
  • Also fixes a pre-existing JSON syntax bug in src/validation/validation.config.json (a missing }, / { between the 67-soroban-contract-events and 50-asset-issuer-discovery exclusion entries) that was breaking tests/ledger-effects.test.ts and the full test suite.

Test plan

  • npx eslint "src/**/*.ts" "tests/**/*.ts" clean on all changed/added files
  • npx tsc --noEmit — no new errors introduced (pre-existing unrelated errors in 72/73/75 example files remain, untouched by this PR)
  • npx jest tests/transaction-preflight.test.ts tests/ledger-effects.test.ts tests/runner.test.ts — all passing
  • npm test — full suite green (22 suites, 261 tests)

Closes #108

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@esthertitilayo-dev 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 3eb5aef into Dantama022:main Jul 29, 2026
0 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-081: Add Soroban Transaction Preflight Example

2 participants