Skip to content

Epic: Soroban stream storage, events, and errors #124

@ogazboiz

Description

@ogazboiz

Summary

Strengthen how StreamContract stores data, defines keys, emits events, and surfaces errors so that off chain indexers and clients can reliably interpret stream state.

Scope

  • Introduce a DataKey enum or similar pattern for:
    • Global stream id counter.
    • Individual stream records.
  • Replace ad hoc storage keys with a single convention.
  • Ensure all public methods use the same storage helpers.
  • Extend StreamError to cover:
    • Missing stream.
    • Inactive stream.
    • Unauthorized sender or recipient.
  • Ensure events are emitted for create, top up, withdraw, and cancel with all relevant fields.

Acceptance Criteria

  • No duplicate helper functions like get_stream or top_up_stream.
  • All storage access goes through a centralized key strategy.
  • Tests assert on error variants for invalid operations.
  • Events can be filtered by stream id and event type in indexers.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcontractsSmart contract related tasksenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions