VibeKiosk Contract
The VibeKiosk contract is a standalone ERC-721 NFT contract that manages ticket sales for all vibestreams. It provides a centralized ticketing system with automatic revenue distribution.Contract Overview
Address:0x5ac3193b6DD7B520D63EbE65b59f97a2dF4ee686Standard: ERC-721 (NFT)
Token Symbol:
VIBE-TIXFeatures: Centralized ticketing, revenue distribution, ticket validation
Core Data Structures
Ticket Configuration
Each vibestream registered with VibeKiosk has an associated configuration:Ticket Data
Each minted ticket contains detailed information:Core Functions
Vibestream Registration
Only VibeFactory can register vibestreams for ticket sales:vibeId: Unique vibestream identifier from VibeFactorycreator: Address that will receive ticket sale revenueticketsAmount: Total number of tickets available (must be > 0)ticketPrice: Price per ticket in weidistance: Geographic constraint in meters
- Validates input parameters
- Ensures vibestream is not already registered
- Creates ticket configuration
- Emits
VibestreamRegisteredevent
Ticket Purchase
Users can purchase tickets for registered vibestreams:- Vibestream must be registered and active
- Must send sufficient tMETIS (≥ ticket price)
- Tickets must still be available
- Validates vibestream and payment
- Mints ERC-721 ticket NFT
- Records ticket data and ownership
- Updates user and vibestream mappings
- Distributes revenue (80% creator, 20% treasury)
- Refunds excess payment
- Returns unique ticket ID
Revenue Distribution
Automatic 80/20 split on all ticket sales:Ticket Management
Ticket Information Retrieval
User Ticket Queries
Vibestream Queries
Ticket Validation
Availability Check
Ownership Validation
Standard ERC-721 functions for ownership verification:Events
Registration Event
Purchase Event
Security Features
Reentrancy Protection
All payable functions use OpenZeppelin’snonReentrant modifier:
Access Control
- Only VibeFactory can register vibestreams
- Only contract owner can update configuration
- Standard ERC-721 transfer controls apply to tickets
Input Validation
Comprehensive validation on all operations:Administrative Functions
Configuration Updates
Emergency Functions
Token URI Generation
Tickets have automatically generated token URIs:Usage Examples
Purchasing a Ticket
Checking Ticket Ownership
Getting Sales Information
Integration with VibeFactory
VibeKiosk integrates with VibeFactory through automatic registration:Dual Monetization
Vibestreams can simultaneously support both ticket sales and real-time streaming:- Ticket Sales: One-time purchase for access/perks
- PPM Streaming: Ongoing payments for active participation