Reference / Contract functions

Contract functions

Every callable function, with permissions.

Profiles

FunctionWhoEffect
register(name, bio, skills, contact, ratePerHour)anyone (gate applies)creates your on-chain profile; ratePerHour in USDG units (6 decimals)
updateProfile(name, bio, skills, contact, ratePerHour)registered humanedits every profile field
setActive(bool)registered humantoggles visibility in the network browse

Tasks

FunctionWhoEffect
createJob(title, description, amount, deadline, directWorker)anyone with USDGescrows amount; directWorker = 0x0 for an open task, or a human's address for direct hire; deadline = 0 for none
applyToJob(id)registered human (gate applies)adds you to the applicant list of an open task
assignJob(id, worker)posterassigns an applicant; task becomes Assigned
acceptJob(id)invited worker (gate applies)accepts a direct-hire task
submitWork(id, proofURI)assigned workerposts the proof; starts the 5-day review window
approveWork(id)posterreleases payment: fee to treasury, rest to worker
rejectWork(id, reason)postersends work back for revision (3 times max)
claimPayment(id)workerself-payout once the review window has passed
cancelJob(id)posterrefund while Open, or while Assigned after the deadline with no submission
abandonJob(id)workerwalks away from an Assigned task; poster refunded
rateWorker(id, 1-5)poster, once, after Completedadds to the worker's on-chain rating

Reads

FunctionReturns
humanCount() / humanList(i) / getHuman(addr)enumerate profiles and read one (name, bio, skills, contact, rate, stats)
jobCount() / getJob(id)enumerate tasks and read full task state
getApplicants(id) / hasApplied(id, addr)applicant list and membership
averageRatingX100(addr)average rating times 100 (450 = 4.50 stars)
isRegistered(addr) / passesGate(addr) / gateActive()profile and gate checks
feeBps() / treasury() / reviewPeriod() / usdg()protocol parameters

Admin (owner only)

FunctionBounds
setGate(token, minHold)token = 0x0 with minHold = 0 disables
setFee(bps)0 to 1000 (10% hard cap)
setTreasury(addr)non-zero address
setReviewPeriod(seconds)1 to 30 days