You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Overview
Implement admin-only functions to create, update availability, and close events in the
event_ticketingcontract. Work insidecontracts/sandbox/event_ticketing/.Acceptance Criteria
create_event(env, caller, id, name, capacity, ticket_price, start_time, end_time)is admin-gatedstart_time < end_timeandcapacity > 0andticket_price > 0Error::AlreadyInitializedif event ID already existscancel_event(env, caller, event_id)sets event status toCancelled(admin only)close_event(env, caller, event_id)sets status toClosedafter event ends (admin only)EventListcargo build