Car Rental

Under Review

UTILITYTOOLSDOCUMENTS

Contract purpose

This Smart Contract keeps a record of car rentals for a company.

Exposed methods and variables

manager : address of the manager (contract creator)

cars : shows if a particular car is available for rent

parameter nametypedetails
_idintegerunique id of the car

addCar : allows the manager to introduce a new car to the list

parameter nametypedetails
_carIdintegerunique id of the car
_availablebooltrue if the car is available, false otherwise

addClientToCar : enables the manager to introduce details about the client who rented a particular car

parameter nametypedetails
_carIdintegerunique id of the car
_addrethereum addressaddress of the client
_idintegerthe unique id of the client
_namestringclient's name

makeCarAvailable : allows the manager to set the availability of a car to true

parameter nametypedetails
_carIdintegerunique id of the car

hadCar : called by the manager to see if a particular client rented a specific car

parameter nametypedetails
_carIdintegerunique id of the car
_clientIdintegerunique id of the client

getClientDetails : shows to the manager the details about a client who rented a particular car

parameter nametypedetails
_carIdintegerunique id of the car
_clientIdintegerunique id of the client
Reviewed by Modex
Buy

Copyright © Modex Marketplace