Theater Ticketing

Exposed Methods

setPrice sets a price for a normal ticket and a vip

parameter nametypedetails
_priceuintprice for a normal ticket
_vippriceuintprice for vip

checkPrice shows the prices for normal and vip

buyTicket enables the customer to buy a ticket

parameter nametypedetails
_playstringname of the play
_seatnumberuintnumber of the seat
_isvipbooltracks if the ticket is for vip

watchPlay function called when the customer watches the play, making the ticket expired

checkTicket returns the status of a ticket

withdraw withdraw function for the owner


TicketPurchased tracks the purchase of a ticket

Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract