Skip to content

Contract squad-rewards: add team payout coverage and claim-readiness accessor #843

@CMI-James

Description

@CMI-James

Background

Contributors need implementation-ready contract backlog items so work can be picked up without reconstructing scope from scattered context.

Feature Focus

Add the contract read or workflow support described in the title.

Where to Implement (Exact Targets)

  • contracts/squad-rewards/src/lib.rs
  • contracts/squad-rewards/src/storage.rs
  • contracts/squad-rewards/src/types.rs
  • contracts/squad-rewards/src/test.rs

What to Implement

  • Add the public read-only methods or supporting contract behavior described in the issue title.
  • Return structured output that frontend and backend consumers can use directly.
  • Handle empty, missing, paused, or not-yet-configured states explicitly.
  • Preserve current contract mutation paths and storage invariants.

Interface / Endpoint / Method Details

  • Prefer named response types over opaque tuples where practical.
  • Reuse existing storage aggregates when possible instead of duplicating counters.
  • Document fallback values, zero-state behavior, and any rounding conventions in generated docs.

Acceptance Criteria

  • Consumers can retrieve the new state through stable contract reads or clearly defined public methods.
  • Unknown ids and empty states return predictable results.
  • Existing write flows remain backward compatible.

Required Tests

  • Add unit tests for the main success path.
  • Add coverage for at least one empty, blocked, or missing-state path.

Definition of Done

  • The contract change is implemented and covered by tests.
  • Generated contract docs remain in sync with the public interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions