TaxiService

TOOLSFINANCIALUTILITY

Exposed Methods

priceSet sets the price of a mile

parameter nametypedetails
_priceuintstores the the price for a mile
_cutuintstores the the cut for the owner for every trip

addDriver adds a driver to the array

parameter nametypedetails
_namestringname of the driver
_cariduintid of the car
_addraddressethereum address of the driver

signup registers an address to be used to call and pay taxis

callTaxi calls a taxi at a certain address

parameter nametypedetails
_locationstringstores the location where the taxi is needed

respond function for the the taxi driver to respond to a call

parameter nametypedetails
_clientaddressethereum address of the client

endTrip function called by the driver when a trip has ended

parameter nametypedetails
_clientaddressethereum address of the client
_milesuintmiles travelled during the trip

pay pay for the previous trip, removing the debt

checkPrice shows the price for a number of miles

parameter nametypedetails
_milesuintmiles travelled during the trip

getDriverInfo returns information about a driver

parameter nametypedetails
_indexuintposition of a driver in the array

getNoOfDrivers returns the number of drivers registered

withdraw withdraw function for the owner

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract