Skip to content

aid-contract: query API and pagination for aid records #12

Description

@memplethee-lab

Labels: type:feature, priority:medium, module:aid

Description
Backends and indexers need read APIs to fetch aid records by ID, donor, or recipient, and to enumerate records efficiently without unbounded reads.

Direction

  • Implement get_aid(aid_id), get_aids_by_donor(donor, cursor, limit), get_aids_by_recipient(recipient, cursor, limit).
  • Maintain index keys on create/settle/refund.
  • Cap limit to a documented maximum to bound gas.

Acceptance Criteria

  • Getters return correct records/empty for unknown IDs.
  • Pagination returns a cursor and respects the max limit.
  • Indexes stay consistent across create/claim/refund transitions.
  • Tests cover single fetch, pagination boundaries, and empty results.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions