Skip to content

feat(commitment_marketplace): cannot-buy-own-listing-additional-edge-cases-and-fuzz-inputs#459

Merged
1nonlypiece merged 4 commits intoCommitlabs-Org:masterfrom
Tijesunimi004:feature/commitment-marketplace-cannot-buy-own-listing-additional-edge-cases-and-fuzz-inputs
Apr 1, 2026
Merged

feat(commitment_marketplace): cannot-buy-own-listing-additional-edge-cases-and-fuzz-inputs#459
1nonlypiece merged 4 commits intoCommitlabs-Org:masterfrom
Tijesunimi004:feature/commitment-marketplace-cannot-buy-own-listing-additional-edge-cases-and-fuzz-inputs

Conversation

@Tijesunimi004
Copy link
Copy Markdown
Contributor

@Tijesunimi004 Tijesunimi004 commented Mar 30, 2026

Closes #273. Added checks and SafeMath integrations to mitigate integer overflows and prevent purchasing or offering on self-owned listings.

Copilot AI review requested due to automatic review settings March 30, 2026 13:23
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the commitment_marketplace Soroban contract to tighten “cannot buy/offer on own listing” edge cases and to use shared safe-math helpers in fee calculations.

Changes:

  • Add self-owned listing/auction checks to make_offer and a self-offer guard to accept_offer.
  • Replace fee arithmetic in buy_nft, accept_offer, and end_auction with shared_utils::math::SafeMath.
  • Add tests covering the new self-owned offer/accept edge cases.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

File Description
contracts/commitment_marketplace/src/lib.rs Adds self-owned offer checks; switches fee computation to SafeMath; adds overflow-safe ends_at calculation.
contracts/commitment_marketplace/src/tests.rs Adds new panic-assertion tests for self-owned listing/auction offer cases.
contracts/commitment_marketplace/Cargo.toml Adds a path dependency on shared_utils.
Cargo.lock Updates lockfile to include shared_utils dependency for the marketplace crate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Tijesunimi004 and others added 3 commits March 30, 2026 14:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…own-listing-additional-edge-cases-and-fuzz-inputs
@1nonlypiece 1nonlypiece merged commit d9137fb into Commitlabs-Org:master Apr 1, 2026
0 of 2 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.

Cannot buy own listing \u2014 additional edge cases and fuzz inputs

3 participants