Skip to content

feat: add get_tickets_by_buyer read function#219

Merged
martinvibes merged 1 commit intoLumenTix-HQ:mainfrom
CHEF-SAVY:feat/get-tickets-by-buyer
Mar 28, 2026
Merged

feat: add get_tickets_by_buyer read function#219
martinvibes merged 1 commit intoLumenTix-HQ:mainfrom
CHEF-SAVY:feat/get-tickets-by-buyer

Conversation

@CHEF-SAVY
Copy link
Copy Markdown
Contributor

close #180

Adds a new read-only function to LumentixContract that returns all tickets owned by a given buyer.

What changed

  • get_tickets_by_buyer(env, buyer: Address) -> Vec — iterates ticket IDs 1..TICKET_CTR, filters by ticket.owner == buyer, returns empty Vec if none found. No auth required.
  • Fixed pre-existing clippy::too_many_arguments on EventCreated::emit and rustfmt issues that would have failed CI.

Testing
All 88 existing tests pass. cargo fmt --check and cargo clippy -- -D warnings clean.

image

Iterates ticket IDs 1..TICKET_CTR, reads from persistent storage,
and filters by ticket.owner == buyer. Returns empty Vec if none found.

Also fixes pre-existing clippy::too_many_arguments on EventCreated::emit
and pre-existing rustfmt issues to make CI pass.
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@CHEF-SAVY 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! 🚀

Learn more about application limits

@martinvibes
Copy link
Copy Markdown
Contributor

LGTM

@martinvibes martinvibes merged commit a398170 into LumenTix-HQ:main Mar 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add get_tickets_by_buyer read function to list all tickets owned by a buyer

2 participants