Skip to content

feat: emit TicketPurchased event on successful ticket purchase#220

Merged
martinvibes merged 2 commits intoLumenTix-HQ:mainfrom
CHEF-SAVY:feat/ticket-purchased-event
Mar 28, 2026
Merged

feat: emit TicketPurchased event on successful ticket purchase#220
martinvibes merged 2 commits intoLumenTix-HQ:mainfrom
CHEF-SAVY:feat/ticket-purchased-event

Conversation

@CHEF-SAVY
Copy link
Copy Markdown
Contributor

close #190

purchase_ticket previously returned a ticket ID with no on-chain signal. This adds a TicketPurchased event emitted after the ticket is stored and escrow updated.

Event payload (tktbuy):

  • ticket_id — newly assigned ticket ID
  • event_id — event the ticket belongs to
  • buyer — purchaser address
  • amount — total amount paid
  • platform_fee — fee deducted by the platform
  • organizer_amount — amount added to escrow

Changes:

  • events/mod.rs — added TicketPurchased struct following existing event patterns
  • lumentix_contract.rs — imported and emitted TicketPurchased at the end of purchase_ticket

All 88 tests pass.

image

@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 81940a9 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 TicketPurchased event emission to purchase_ticket function

2 participants