ArkProject is a liquidity layer for digital assets, uniting markets, empowering creators, and bridging the gap to mass adoption. Built on top of Starknet, ArkProject is designed to provide a fully decentralized and trustless orderbook on-chain.
This pull request introduces significant updates to the Orderbook contract, focusing on the implementation of listing order fulfillment and the enhancement of testing scenarios.
Key Additions:
Fulfilling Listing Order Functionality:
A new function, fulfill_order, has been added to handle the process of fulfilling orders. This function takes in execution_info and signer as parameters and follows these steps:
Verifies the signer.
Validates the existence of the order and its status.
Checks if the order is open and not fulfilled by the same offerer.
Distinguishes the order type and proceeds with the fulfillment process for listing orders.
Private Function for Listing Order Fulfillment:
The _fulfill_listing_order private function has been implemented to specifically handle listing orders. It checks the order's expiration date and updates the order status to 'Fulfilled' upon successful execution.
Enhanced Test Coverage:
New test scenarios have been added to validate the functionality:
test_create_listing_order_and_fulfill_non_existing_order: Ensures the system correctly handles attempts to fulfill non-existing orders.
test_create_listing_order_and_fulfill: Tests the successful creation and fulfillment of a listing order.
test_create_listing_order_and_fulfill_with_same_fulfiller: Validates that an order cannot be fulfilled by the same entity that created it.
These updates aim to streamline the order fulfillment process, particularly for listing orders, while ensuring robustness through comprehensive testing.
What type of PR is this? (check all applicable)
[x] 🍕 Feature (feat:)
[ ] 🐛 Bug Fix (fix:)
[ ] 📝 Documentation Update (docs:)
[ ] 🎨 Style (style:)
[ ] 🧑💻 Code Refactor (refactor:)
[ ] 🔥 Performance Improvements (perf:)
[ ] ✅ Test (test:)
[ ] 🤖 Build (build:)
[ ] 🔁 CI (ci:)
[ ] 📦 Chore (chore:)
[ ] ⏩ Revert (revert:)
[ ] 🚀 Breaking Changes (BREAKING CHANGE:)
Related Tickets & Documents
Added tests?
[x] 👍 yes
[ ] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help
Added to documentation?
[ ] 📜 README.md
[ ] 📓 Documentation
[x] 🙅 no documentation needed
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
PR Title and Description Guidelines:
Ensure your PR title follows semantic versioning standards. This helps automate releases and changelogs.
Use types like feat:, fix:, chore:, BREAKING CHANGE: etc. in your PR title.
Description
This pull request introduces significant updates to the
Orderbook
contract, focusing on the implementation of listing order fulfillment and the enhancement of testing scenarios.Key Additions:
Fulfilling Listing Order Functionality:
fulfill_order
, has been added to handle the process of fulfilling orders. This function takes inexecution_info
andsigner
as parameters and follows these steps:Private Function for Listing Order Fulfillment:
_fulfill_listing_order
private function has been implemented to specifically handle listing orders. It checks the order's expiration date and updates the order status to 'Fulfilled' upon successful execution.Enhanced Test Coverage:
test_create_listing_order_and_fulfill_non_existing_order
: Ensures the system correctly handles attempts to fulfill non-existing orders.test_create_listing_order_and_fulfill
: Tests the successful creation and fulfillment of a listing order.test_create_listing_order_and_fulfill_with_same_fulfiller
: Validates that an order cannot be fulfilled by the same entity that created it.These updates aim to streamline the order fulfillment process, particularly for listing orders, while ensuring robustness through comprehensive testing.
What type of PR is this? (check all applicable)
feat:
)fix:
)docs:
)style:
)refactor:
)perf:
)test:
)build:
)ci:
)chore:
)revert:
)BREAKING CHANGE:
)Related Tickets & Documents
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
PR Title and Description Guidelines:
feat:
,fix:
,chore:
,BREAKING CHANGE:
etc. in your PR title.Closing Issues