Skip to content

Ticketing: implement transfer/resale and organizer check-in logic#280

Merged
codebestia merged 2 commits into
ShadeProtocol:mainfrom
josephchimebuka:feat/ticket-transfer-checkin-251-253
Apr 29, 2026
Merged

Ticketing: implement transfer/resale and organizer check-in logic#280
codebestia merged 2 commits into
ShadeProtocol:mainfrom
josephchimebuka:feat/ticket-transfer-checkin-251-253

Conversation

@josephchimebuka
Copy link
Copy Markdown
Contributor

@josephchimebuka josephchimebuka commented Apr 29, 2026

Summary

This PR implements two ticket lifecycle capabilities in the ticketing contract:

  • Ticket transfer/resale flow via transfer_ticket with ownership updates
  • Organizer-driven ticket validation/check-in via check_in with consumed-state enforcement

Issues Closed

Closes #253
Closes #251

What Changed

  • Added missing Soroban event macro import so ticketing contract events compile and publish correctly.
  • Enforced organizer authorization in check_in:
    • Caller must authenticate
    • Caller must be the organizer of the ticket's event
    • Duplicate check-ins are still rejected
    • Consumed state and check-in record are persisted
  • Kept transfer logic aligned with resale/transfer acceptance criteria:
    • Only current holder can transfer
    • Ownership (ticket.holder) is updated on successful transfer
    • Checked-in tickets cannot be transferred
  • Updated ticketing tests to reflect organizer-only check-in behavior for the check-in/transfer scenarios.

Acceptance Criteria Mapping

#253 Implement Ticket Transfer and Resale

  • transfer_ticket is implemented and enforced
  • Ticket ownership mapping (ticket.holder) updates on transfer
  • Tickets are transferable before check-in

#251 Implement Ticket Validation and Check-in Logic

  • check_in(ticket_id) behavior is implemented
  • Ticket consumed state (checked_in, check_in_time) is updated at check-in
  • Reuse is prevented: already checked-in tickets fail subsequent check-in attempts

Verification

  • Contract crate build/test command run:
    • cargo test -q in contracts/ticketing (build succeeds in current repo wiring)

Notes

  • The repository's existing standalone src/test.rs in contracts/ticketing is not currently wired as an active module in this codebase baseline; this PR updates it for behavior parity but does not change baseline test wiring strategy.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@josephchimebuka 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

@codebestia codebestia merged commit db2ffd7 into ShadeProtocol:main Apr 29, 2026
2 of 4 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.

Implement Ticket Transfer and Resale Implement Ticket Validation and Check-in Logic

2 participants