Cleaning Service

Contract purpose

This Smart Contract manages cleaning services provided by a company. There are more services available, introduced by the system manager, from which the clients can choose what fits best to their needs.

Exposed methods and variables

manager the ethereum address of system manager, given as parameter at contract creation

serviceList returns the details about a particular cleaning service identified by a unique id

addService function called by the manager to adda new cleaning service to the list

parameter nametypedetails
_idintegerunique identifier of a cleaning service
_descriptionstringthe description of the provided cleaning service
_priceintegerthe price of the service

cleanLocation function called by a client who wished to employ the services of this cleaning company. He has to send to the contract an amount equal to the price of the selected cleaning service. It emits the CleanLocation event.

parameter nametypedetails
_addrstringthe address of the location where the cleaning service is required
_serviceIDintegerthe id of the selected cleaning service

getLocationDetails returns the details about the last entered location of a particular owner

parameter nametypedetails
ownerethereum addressaddress of the location owner

transferMoney allows the owner to transfer money from the contract's balance to his own account

parameter nametypedetails
amountintegerthe sum the manager wants to transfer

getBalance returns the balance of the contract when called by the manager



parameter nametypedetails
addrstringthe physical address of the location to be cleaned
ownerethereum addressthe account address of the location owner
serviceIDintegerthe id of the selected service
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract