Skip to content

feat: add escrow_stats() view — total count, active count, and settled count #825

Description

@BigBen-7

Description

The admin panel needs a quick count of escrow states without iterating all escrows. A simple stats view gives this in one call.

What to do

Confirm escrow_stats(e: Env) exists and returns { total_count, active_count, settled_count }. If missing or incomplete, implement it reading from DataKey::EscrowCount and the active escrow index.
Add a test: 3 created, 1 released, 1 refunded → { total: 3, active: 1, settled: 2 }.

Files touched

  • src/contract.rs
  • src/escrow_test.rs

PR requirement

  • Closes #[issue_id] — Timeframe: 24 hours

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

    enhancementNew feature or requestescrowEscrow module

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions