Skip to content

[contract] Event Manager - Create Event #5

Description

@manoahLinks

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

  1. 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,
    }
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions