Skip to content

Enhance Stream Status Management and Reporting #56

@Utilitycoder

Description

@Utilitycoder

Description

Our current IPaymentStream implementation has limited functionality for checking and reporting stream status. We should provide more comprehensive status information and calculations. We need to add theses capabilities to improve monitoring and user experience.

Requirements

  1. Add status_of function to return the current stream status
  2. Implement accrued_debt_of to calculate debt accrued since snapshot
  3. Add covered_debt_of and uncovered_debt_of as public functions
  4. Improve documentation and status reporting

Implementation Details

  • Function signatures:
    • fn status_of(self: @TContractState, stream_id: u256) -> StreamStatus
    • fn ongoing_debt_scaled_of(self: @TContractState, stream_id: u256) -> u256
    • fn covered_debt_of(self: @TContractState, stream_id: u256) -> u128
    • fn uncovered_debt_of(self: @TContractState, stream_id: u256) -> u128
  • Ensure consistent status reporting across all functions
  • Provide clear documentation for what each status means
  • Handle edge cases like zero balances appropriately

Acceptance Criteria

  • All new status functions correctly report stream state
  • Debt calculations are accurate for both covered and uncovered portions
  • The functions work with all stream states (active, paused, etc.)
  • Documentation is comprehensive and clear

References

Metadata

Metadata

Assignees

Labels

May Be RewardedThe issue may be rewarded depending on algorithmODBuildODHack12OnlyDust related label for open-source contributionsenhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions