feat: implement dynamic service fee adjustments for job postings#648
Merged
soomtochukwu merged 1 commit intoMay 29, 2026
Merged
Conversation
|
@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. |
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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