feat(job_registry): SC-REG-029 multi-currency bidding matrix#601
Open
Favourejiro wants to merge 1 commit into
Open
feat(job_registry): SC-REG-029 multi-currency bidding matrix#601Favourejiro wants to merge 1 commit into
Favourejiro wants to merge 1 commit into
Conversation
- 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 is attempting to deploy a commit to the mAzI's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@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! 🚀 |
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.
PR Description:
Summary
Implements SC-REG-029: Construct Multi-Currency Supported Bidding Matrix in Registry.
Extends the
job_registrySoroban 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— addedamount: i128andcurrency: SymbolfieldsJobRegistryError— addedInvalidAmount = 18error variantsubmit_bid— updated signature to acceptamountandcurrency; rejects zero/negative amounts withInvalidAmountbefore any storage writesTests
7 new unit tests added (24 total, all passing):
test_submit_bid_stores_currency_and_amounttest_multiple_bids_different_currenciestest_submit_bid_zero_amount_panicsInvalidAmountguardtest_submit_bid_negative_amount_panicsInvalidAmountguardtest_accept_bid_transitions_to_assignedAssignedtest_non_owner_cannot_accept_bidtest_submit_bid_on_assigned_job_panicsVerification
cargo test -p job_registry→ 24/24 passedcargo build --target wasm32-unknown-unknown -p job_registry --release→ 27 KB (within Soroban limits)Closes #383