-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
Description
Depends On: #4
🎯 What You're Building
Implement the event creation and management logic. This contract is the main entry point for organizers to create events.
📋 What to Implement
File: soroban-contracts/contracts/event_manager/src/lib.rs
-
Event Structure
struct Event { id: u32, theme: String, organizer: Address, event_type: String, total_tickets: u128, tickets_sold: u128, ticket_price: i128, start_date: u64, end_date: u64, is_canceled: bool, ticket_nft_addr: Address, }
-
Create Event Function
fn create_event( theme: String, event_type: String, start_date: u64, end_date: u64, ticket_price: i128, total_tickets: u128 ) -> u32 // Returns event_id
- Validate caller is not zero address
- Call Ticket Factory to deploy NFT contract
- Store event data
- Increment event counter
- Return event_id
✅ Acceptance Criteria
- Can create events
- Deploys ticket NFT via factory
- Event data stored correctly
- Getters work
💡 Why This Matters
This is where the event lifecycle begins. Organizers create events here, which triggers ticket NFT deployment. Later, users will buy tickets and claim refunds through this contract.