Skip to content

Automated Testnet E2E script (deploy → create → withdraw → cancel → bump_many) #2

Description

@gbengaeben

Category: Testing | Priority: High | Dependencies: none | Out of scope: Mainnet coverage, keeper scheduler wiring

Description & Context: The on-chain flow was verified manually (deploy v4, streams, bump_many, atomic revert) but no committed script exists — judges can't reproduce it and nothing guards contract regressions between versions.

Acceptance Criteria / DoD:

  • scripts/e2e-testnet.mjs (Node + @stellar/stellar-sdk): friendbot-funded ephemeral accounts, stellar contract deploy of stream_core.wasm
  • Asserts, in order: version() == 4; two streams created (ids 0,1); TTL probe shows instance re-armed to max after bump_many([0,1]); bump_many([0,99]) reverts with Error(Contract, #2) and stream 0 is untouched; partial withdraw; cancel with sender-refund + receiver-payout summing to total_amount
  • Handles flakiness: per-request RPC timeout (≥30s) + retry, friendbot pacing ≥1s between fund calls, poll-to-terminal-state for every tx
  • Exits non-zero with the failing assertion named; npm run e2e script added to backend/package.json
  • Documented in README Quick start (Testnet only)

How to verify: cd backend && npm run e2e against Testnet — passes end-to-end twice in a row; kill RPC mid-run and confirm a named failure, not a hang.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    e2eEnd-to-end / live networktestingTest coverage & QA

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions