Skip to content

[CT-09] Implement event creation and management functions (admin) #773

@yusuftomilola

Description

@yusuftomilola

Overview

Implement admin-only functions to create, update availability, and close events in the event_ticketing contract. Work inside contracts/sandbox/event_ticketing/.

Acceptance Criteria

  • create_event(env, caller, id, name, capacity, ticket_price, start_time, end_time) is admin-gated
  • Validates start_time < end_time and capacity > 0 and ticket_price > 0
  • Returns Error::AlreadyInitialized if event ID already exists
  • cancel_event(env, caller, event_id) sets event status to Cancelled (admin only)
  • close_event(env, caller, event_id) sets status to Closed after event ends (admin only)
  • Events are indexed in EventList
  • Emits events on creation and status change
  • Code compiles with cargo build

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions