Skip to content

Add SDK getTopPayers method #422

Description

@Levi-Ojukwu

Description:

The contract has get_top_payers(limit) (at top_payers.rs:163-199) that returns up to limit top payers from the maintained heap, sorted by descending score. The SDK does not expose this method.

The function returns a Vec<TopPayerEntry> where each entry contains an address: Address and score: u32.

Why it matters: Frontend applications need to display top payers for marketplace features.

Acceptance Criteria:

  • Create a function that calls the contract's get_top_payers view
  • Accept a limit parameter (default 10)
  • Return an array of { address: string, score: number }
  • Add tests

Relevant Files: contracts/invoice_liquidity/src/top_payers.rs:163-199, sdk/src/index.ts


Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions