SubwayTicketing

FINANCIALTOOLSUTILITY

Exposed Methods

setPrice sets the price for a ticket

parameter nametypedetails
_ridepriceuintprice for one ride
_unlimitedpriceuintprice for unlimited rides

buyTicket function to buy a ticket

parameter nametypedetails
_ridepriceuintprice for one ride
_unlimitedpriceuintprice for unlimited rides

checkTicket checks if a ticket has rides left or in case of the unlimited, if it has time left on it

withdraw function for the owner to withdraw the etherum from the contract

takeSubway function called when the customer uses the sub

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract