Crash Record

Under Review

FINANCIALTOOLSUTILITY

Exposed Methods

setCost sets the price to show the accident history

parameter nametypedetails
_costuintthe price to show the accident history

getPrice returns the price to show the accident history

addVehicle owner adds a vehicle to the array

parameter nametypedetails
_VINuintvehicle's VIN

registerAccident adds an accident to a vehicle

parameter nametypedetails
_VINuintvehicle's VIN
_accidentdescstringshort summary of the accident
_timeofaccidentstringtime of the accident

getVehicleAccidents returns the accidents of a vehicle if the user pays the cost

parameter nametypedetails
_VINuintvehicle's VIN
_indexuintindex of the accident

getVehicleAccidentsOwner returns the accidents of a vehicle free for the owner;

parameter nametypedetails
_VINuintvehicle's VIN
_indexuintindex of the accident

getLengthAccident returns the length of the accidents array for the dapp in order to show all the accidents

parameter nametypedetails
_VINuintvehicle's VIN

withdraw withdraw function for the owner

Reviewed by Modex
Buy
Buy Contract

Create an account or login to purchase this smart contract