Repository navigation
feat: paginate client history, add address counters, and include token in events (#152, #153) - #202
Open
Bilalishaq7 wants to merge 2 commits into
Open
Bilalishaq7 wants to merge 2 commits into
Bilalishaq7 wants to merge 2 commits into
Conversation
|
@Bilalishaq7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@Bilalishaq7 is attempting to deploy a commit to the yormee-103's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
fix conflicts |
Bilalishaq7
force-pushed
the
feat/issue-152-153-pagination-events
branch
from
November 28, 2026 13:50
bd26115 to
8d35f0c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request addresses issues #152 and #153:
InvoiceCreatedandInvoicePaidevent schemas with token contracts and due dates to allow indexers to consume self-contained events without redundant RPC queries.Closes #152
Closes #153
Changes
1. Client History Pagination and Count Accessors (#152)
get_client_invoice_range(client: Address, start: u32, len: u32) -> Vec<Invoice>for bounded client history reads.freelancer_invoice_count(freelancer: Address) -> u32andclient_invoice_count(client: Address) -> u32for pagination metadata.get_client_historyandget_invoice_historyfunctions for full backward compatibility.contracts/invoice/src/test.rs:get_client_invoice_range_respects_bounds: verifies pagination offsets, length limits, and ordering across multiple pages.get_client_invoice_range_for_unknown_client_is_empty: verifies empty responses for non-existent addresses.per_address_invoice_counts_track_totals: verifies count increments, cross-party counts, and zero counts for unknown addresses.contracts/invoice/README.md.2. Event Schema Enrichment for Indexers (#153)
InvoiceCreatedevent to includetoken: Addressanddue_date: u64.InvoicePaidevent to includetoken: Address.create_invoice_innerandfund_invoice.event_emission_includes_token_and_due_dateasserting emitted event topics and map fields.contracts/invoice/README.md.Verification
cargo fmt --check: passedcargo clippy --all-targets: passed (0 warnings)cargo test: all 31 tests passed