Car Dealership

FINANCIALUTILITYTOOLS

Exposed Methods

addCar constructor in order to point the owner

parameter nametypedetails
_modestringmodel of the car
_horsepoweruinthorsepower of the car
_hadaccidentboolchecks if the car was in an accident
_mileageuintmileage of the car
_priceuintprice of the car
_vinstringVIN of the car

buyCar enables the customer to buy a car

parameter nametypedetails
_vinstringVIN of the car

getCarInfo gives information regarding a car

parameter nametypedetails
_vinstringVIN of the car

getCarOwner returns the VIN of a customer that bought a car

parameter nametypedetails
_addraddressaddress of the car buyer

withdraw withdraw function for the owner

###Events

CarAdded event that listens when a car was added

CarPurchased event that listens when a car was purchased

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract