CarLeasing

UTILITYFINANCIALTOOLS

Exposed Methods

addCar owner adds a car to be leased

parameter nametypedetails
_modelstringmodel of the car
_horsepoweruinthorsepower of the car
_leaseuintlease payment per month

setFirstDepositandLeaseTime owner sets how much the first deposit is for every model and the lease time

parameter nametypedetails
_modelstringmodel of the car
_deposituintstores how much is the first deposit is for every model
_leasetimeuintsets the lease time in months for the cars

aquireCar enables the customer to lease a car

parameter nametypedetails
_vinstringVIN of the car

checkLease function for the customer to check if his lease is due

parameter nametypedetails
_vinstringVIN of the car

payLease enables the customer to pay for the lease

parameter nametypedetails
_vinstringVIN of the car

CheckCar returns the info of a car

parameter nametypedetails
_vinstringVIN of the car

checkLeese checks if an address already has a car leased

parameter nametypedetails
_addraddressaddress of the leasee

withdraw withdraw function for the owner

Events

ParametersSet event that keeps track of the parameters added by the owner

CarAdded event that listens when a car was added

CarLeased event that listens when a car was lease

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract