Description
There is no way to query all contributions ever made by a specific payer address across all invoices. An indexed payment history keyed by payer should allow wallets and dashboards to retrieve a full contribution history without off-chain indexing.
Technical Context
Store PayerHistory(payer) -> Vec<(invoice_id: u64, amount: i128, ledger: u32)> in storage::persistent in contracts/split/src/lib.rs. Append to this list on every successful contribute. Add get_payer_history(payer: Address, offset: u32, limit: u32) -> Vec<PaymentRecord> with pagination support. Define PaymentRecord in types.rs.
Acceptance Criteria
Description
There is no way to query all contributions ever made by a specific payer address across all invoices. An indexed payment history keyed by payer should allow wallets and dashboards to retrieve a full contribution history without off-chain indexing.
Technical Context
Store
PayerHistory(payer) -> Vec<(invoice_id: u64, amount: i128, ledger: u32)>instorage::persistentincontracts/split/src/lib.rs. Append to this list on every successfulcontribute. Addget_payer_history(payer: Address, offset: u32, limit: u32) -> Vec<PaymentRecord>with pagination support. DefinePaymentRecordintypes.rs.Acceptance Criteria
contributeappends a record toPayerHistory(payer)get_payer_historyreturns paginated results usingoffsetandlimitinvoice_id,amount, andledgerfor each entry