Skip to content

Job Registry Contract Implementation #3

@soomtochukwu

Description

@soomtochukwu

Description
The contracts/job_registry/src/lib.rs stubs out on-chain job lifecycle management. Job metadata (IPFS CIDs) and state transitions are stored on-chain for auditability.

Requirements

  • post_job(env, job_id, client, metadata_hash, budget) — require client auth; guard duplicate job_id; store JobRecord and empty bids vec
  • submit_bid(env, job_id, freelancer, proposal_hash) — require freelancer auth; verify job status is Open; append BidRecord
  • accept_bid(env, job_id, client, freelancer) — require client auth; set freelancer and status to InProgress
  • submit_deliverable(env, job_id, freelancer, hash) — require freelancer auth; verify status InProgress and correct freelancer; set status to DeliverableSubmitted; persist hash
  • mark_disputed(env, job_id) — no auth guard (called cross-contract from escrow); set status to Disputed

Acceptance Criteria

  • Contract compiles to WASM
  • Full lifecycle (post → bid → accept → deliverable) passes as a single Soroban test
  • Submitting a bid on a non-Open job panics with a clear message
  • mark_disputed can only transition from InProgress or DeliverableSubmitted

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions