Skip to content

feat(job_registry): SC-REG-029 multi-currency bidding matrix#601

Open
Favourejiro wants to merge 1 commit into
DXmakers:mainfrom
Favourejiro:feat/sc-reg-029-multi-currency-bidding-matrix
Open

feat(job_registry): SC-REG-029 multi-currency bidding matrix#601
Favourejiro wants to merge 1 commit into
DXmakers:mainfrom
Favourejiro:feat/sc-reg-029-multi-currency-bidding-matrix

Conversation

@Favourejiro
Copy link
Copy Markdown

PR Description:

Summary

Implements SC-REG-029: Construct Multi-Currency Supported Bidding Matrix in Registry.

Extends the job_registry Soroban contract to support currency-denominated bids, allowing freelancers to submit proposals in any currency (e.g. USDC,
XLM) alongside a validated bid amount.

Changes

  • BidRecord — added amount: i128 and currency: Symbol fields
  • JobRegistryError — added InvalidAmount = 18 error variant
  • submit_bid — updated signature to accept amount and currency; rejects zero/negative amounts with InvalidAmount before any storage writes
  • Test snapshots — updated existing snapshots and added new ones for all new test cases

Tests

7 new unit tests added (24 total, all passing):

Test Covers
test_submit_bid_stores_currency_and_amount Fields persisted correctly
test_multiple_bids_different_currencies USDC + XLM bids on same job
test_submit_bid_zero_amount_panics InvalidAmount guard
test_submit_bid_negative_amount_panics InvalidAmount guard
test_accept_bid_transitions_to_assigned Status transition to Assigned
test_non_owner_cannot_accept_bid Ownership validation
test_submit_bid_on_assigned_job_panics Late bid rejection

Verification

  • cargo test -p job_registry24/24 passed
  • cargo build --target wasm32-unknown-unknown -p job_registry --release27 KB (within Soroban limits)

Closes #383

- Add amount (i128) and currency (Symbol) fields to BidRecord
- Add InvalidAmount error variant (code 18)
- Update submit_bid to accept amount + currency with >0 validation
- Add 7 new unit tests covering multi-currency bids, ownership,
  invalid amounts, and post-assignment bid rejection
- All 24 tests pass; WASM builds at 27KB
@Favourejiro Favourejiro requested a review from soomtochukwu as a code owner May 27, 2026 17:51
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@Favourejiro 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 27, 2026

@Favourejiro 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

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-029] Job Registry and Proposal Scaling Validation - Step 29

1 participant