Skip to content

feat: implement dynamic service fee adjustments for job postings#648

Merged
soomtochukwu merged 1 commit into
DXmakers:mainfrom
extolkom:feat/sc-reg-040-job-registry-edge-case-tests
May 29, 2026
Merged

feat: implement dynamic service fee adjustments for job postings#648
soomtochukwu merged 1 commit into
DXmakers:mainfrom
extolkom:feat/sc-reg-040-job-registry-edge-case-tests

Conversation

@extolkom
Copy link
Copy Markdown
Contributor

closes #394

Summary
Implements the Job Registry smart contract with comprehensive edge-case unit tests for the Lance marketplace ecosystem.
Changes

Scaffolded JobRegistryContract with full job lifecycle management
Implemented IPFS CID-based job storage to minimize on-chain footprint
Designed bid storage mapping from Job IDs to dynamic bid structures
Strict ownership validation — only job creator can accept proposals
All arithmetic uses checked_add and checked_mul for overflow safety
env.require_auth enforced on all state-modifying functions

Tests Added

test_happy_path — full lifecycle: post → bid → accept → Assigned
test_unauthorized_accept_bid — non-owner accept panics
test_submit_bid_on_assigned_job — bid on closed job panics
test_invalid_bid_index — out-of-bounds bid index panics
test_double_initialize — duplicate init panics
test_duplicate_job_id — duplicate job panics
test_negative_budget — invalid budget panics
test_close_job — job closes cleanly
test_multiple_jobs_isolated — jobs don't interfere
test_get_bid — bid data stored correctly

Requirements Checklist

Contract logic scaffolded in contracts/job_registry/src/lib.rs
Heavy strings compressed to IPFS CIDs before on-chain storage
Job ID to bid structure mappings implemented
Only job creator can accept proposals

Acceptance Criteria

Contract compiles within Soroban WASM size limits
Status transitions cleanly to Assigned on bid acceptance
Out-of-bounds and invalid inputs return specific error codes

@extolkom extolkom requested a review from soomtochukwu as a code owner May 29, 2026 13:21
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

@extolkom is attempting to deploy a commit to the mAzI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@extolkom Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@soomtochukwu soomtochukwu merged commit d4a9199 into DXmakers:main May 29, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SC-REG-040] Job Registry and Proposal Scaling Validation - Step 40

2 participants