A Starknet smart contract system for managing decentralized work agreements and payments between employers and workers.
NOTE: These smart contracts have not been audited are not ready for production usage.
WorkCore is a contract that facilitates:
- Creation of work agreements
- Secure escrow of payments
- Work submission and verification
- Automated payment release upon work completion
WorkCore.cairo
: Main contract implementationinterfaces/i_work_core.cairo
: Interface defining core functionality
- Secure Payment Escrow: Employer funds are held in contract until work is verified
- Work Status Tracking: Full lifecycle management from creation to completion
- Verification System: Hash-based verification of submitted work
- Event Emission: Comprehensive event system for tracking state changes
- Created
- Funded
- HashSubmitted
- FullySubmitted
- ApprovalPending
- SubmissionDenied
- Completed
- Refunded
- Closed
let work = Work {
id: work_id,
employer_address: employer,
employer_negotiation_signature: sig1,
worker_address: worker,
worker_negotiation_signature: sig2,
reward: amount,
status: WorkStatus::Created
};
contract.create_work(work);
contract.submit(work_id, verification_hash);
contract.verify_and_complete(work_id, solution_hash);
- Starknet
- OpenZeppelin (for ERC20 interface)