Reference / Contract functions
Contract functions
Every callable function, with permissions.
Profiles
| Function | Who | Effect |
|---|---|---|
| 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 human | edits every profile field |
| setActive(bool) | registered human | toggles visibility in the network browse |
Tasks
| Function | Who | Effect |
|---|---|---|
| createJob(title, description, amount, deadline, directWorker) | anyone with USDG | escrows 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) | poster | assigns an applicant; task becomes Assigned |
| acceptJob(id) | invited worker (gate applies) | accepts a direct-hire task |
| submitWork(id, proofURI) | assigned worker | posts the proof; starts the 5-day review window |
| approveWork(id) | poster | releases payment: fee to treasury, rest to worker |
| rejectWork(id, reason) | poster | sends work back for revision (3 times max) |
| claimPayment(id) | worker | self-payout once the review window has passed |
| cancelJob(id) | poster | refund while Open, or while Assigned after the deadline with no submission |
| abandonJob(id) | worker | walks away from an Assigned task; poster refunded |
| rateWorker(id, 1-5) | poster, once, after Completed | adds to the worker's on-chain rating |
Reads
| Function | Returns |
|---|---|
| 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)
| Function | Bounds |
|---|---|
| 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 |