Skip to content

Add refund mechanism for canceled events #27

@manoahLinks

Description

@manoahLinks

Description

The event_manager has a cancel_event function that sets is_canceled = true, but there is no refund logic. Attendees who purchased tickets for a canceled event have no way to get their funds back.

Expected Behavior

When an event is canceled:

  1. Ticket holders should be able to claim refunds
  2. Or the organizer should be able to batch-refund all ticket holders
  3. The refund amount should match the ticket_price paid

Implementation Options

  • Pull model: Add claim_refund(event_id) — attendee calls to get refund
  • Push model: Organizer calls process_refunds(event_id) to refund all holders
  • Track payment token address per event to refund in the correct token

Files

  • soroban-contract/contracts/event_manager/src/lib.rs

Acceptance Criteria

  • Refund function implemented (pull or push model)
  • Only works for canceled events
  • Prevents double-refund claims
  • Tests for refund flow

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions