Task Manager

FINANCIALTOOLSDOCUMENTS

Contract purpose

The task manager will create a task for a particular worker and set a deadline for it. The worker will send money to the contract to guarantee that he will complete the task. He will receive his money back only when the task is done within the deadline.

Contract parameters

taskFee : the amount the worker needs to send to the contract

Exposed methods and variables

manager : address of the manager

worker : address of the worker

deadline : shows the deadline interval ( unix epoch time)

jobDone : true if the job is completed

startTime : time when the worker started the task

setWorker : called by the manager to set the worker's address

parameter nametypedetails
_workerethereum addressthe address of the worker

setDeadline : called by the manager to set the deadline

parameter nametypedetails
_deadlineintegertime to do the task

startJob : payable function called by the worker in order to send the funds to the contract and to signal that he started his task | parameter name | type | details | | --------- | ------- | ------- | | _id| integer | the unique id of the album |

jobIsDone : called by the worker when the job is done

gradeJob* : allows the manager to grade the worker's job

parameter nametypedetails
_gradeintegerthe assigned grade

seeMyGrade : shows the grade only to the worker and manager

getBalance : returns the current balance of the contract

redirectFunds : if the task was not completed, this function allows the manager to send the contract's balance to another account

parameter nametypedetails
_accountethereum addressthe address where the money will be sent
Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract