Description:
The contract maintains a fixed-size min-heap of the top 50 payers by reputation score (in contracts/invoice_liquidity/src/top_payers.rs). This data is valuable for LPs evaluating which payers to fund, but the CLI has no command to query it.
The get_top_payers(limit) function returns up to limit payers sorted by descending score. The heap is maintained automatically when payer scores change.
The CLI command should:
- Accept
--limit parameter (default 10, max 50)
- Display payers in a formatted table with address and score
- Sort by descending score
Why it matters: LPs need to quickly identify high-reputation payers to make informed funding decisions. A CLI command provides instant access without writing code.
Acceptance Criteria:
Relevant Files: contracts/invoice_liquidity/src/top_payers.rs, cli/src/index.ts
Description:
The contract maintains a fixed-size min-heap of the top 50 payers by reputation score (in
contracts/invoice_liquidity/src/top_payers.rs). This data is valuable for LPs evaluating which payers to fund, but the CLI has no command to query it.The
get_top_payers(limit)function returns up tolimitpayers sorted by descending score. The heap is maintained automatically when payer scores change.The CLI command should:
--limitparameter (default 10, max 50)Why it matters: LPs need to quickly identify high-reputation payers to make informed funding decisions. A CLI command provides instant access without writing code.
Acceptance Criteria:
cli/src/commands/top-payers.ts--limitparameter with validation (1-50)cli/src/index.tsasiln top-payersRelevant Files:
contracts/invoice_liquidity/src/top_payers.rs,cli/src/index.ts