Skip to content

Add Offer Management to Market Component#34

Merged
codebestia merged 4 commits intomainfrom
feat/offer-and-listing
Aug 9, 2025
Merged

Add Offer Management to Market Component#34
codebestia merged 4 commits intomainfrom
feat/offer-and-listing

Conversation

@codebestia
Copy link
Contributor

Summary

Introduce offer management to the market module by defining offer data structures, extending the market interface with offer-related APIs, and adding template implementations in the market component. Also includes minor formatting cleanups.

Key Changes

  • Data types:
    • Added Offer and OfferStatus in src/types.cairo.
  • Interface:
    • Extended IMarket in src/interfaces/imarket.cairo with offer APIs:
      • make_offer, accept_offer, close_offer, get_offer, get_offers, get_open_offers.
  • Component:
    • Implemented template/stub functions for offer management in src/components/market.cairo:
      • Added the above offer methods with placeholder logic and default return values.
    • Updated imports to include Offer and OfferStatus.
  • Chore:
    • Formatting updates to market.cairo and imarket.cairo.

Files Changed

  • Modified: src/components/market.cairo
  • Modified: src/interfaces/imarket.cairo
  • Modified: src/types.cairo

Notes

  • Current implementations are templates/stubs to scaffold the offer flow; storage and state transitions for offers are not yet wired.
  • No breaking changes; all changes are additive.

Testing

  • No functional logic added yet; follow-up PR will add storage, state transitions, and tests for offer lifecycle.

@codebestia codebestia merged commit 9dc411e into main Aug 9, 2025
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.

1 participant