-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
functions selling any item at a fix price #98
Merged
0xandee
merged 8 commits into
Flex-NFT-Marketplace:main
from
mubarak23:ft_strategy_any_item
Sep 4, 2024
Merged
functions selling any item at a fix price #98
0xandee
merged 8 commits into
Flex-NFT-Marketplace:main
from
mubarak23:ft_strategy_any_item
Sep 4, 2024
Conversation
This file contains 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
@0xandee This PR is available for Review |
Can you adding comments or quick docs so I can have better understanding how it works @mubarak23 |
sure, i will add it |
i added description on how the contract work |
0xandee
reviewed
Sep 2, 2024
marketplace/src/strategy_any_item_from_collection_for_fixed_price.cairo
Outdated
Show resolved
Hide resolved
marketplace/src/strategy_any_item_from_collection_for_fixed_price.cairo
Outdated
Show resolved
Hide resolved
0xandee
reviewed
Sep 3, 2024
marketplace/src/strategy_any_item_from_collection_for_fixed_price.cairo
Outdated
Show resolved
Hide resolved
0xandee
reviewed
Sep 3, 2024
0xandee
reviewed
Sep 4, 2024
0xandee
reviewed
Sep 4, 2024
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 for issue: #83
The function implements a Cairo contract named
StrategySaleAnyItemAtFixedPrice
This contract manages the sale of items (identified bytoken_id
) at a fixed price, with specific features such as setting prices, handling bids, and upgrading the contract.Key functionalities:
Initialization (
constructor
):Updating Protocol Fee (
update_protocol_fee
):Getting Protocol Fee (
protocol_fee
):Setting an Item for Sale (
set_item_sale
):token_id
to list it for sale. It checks if the caller is the token owner and emits an event once the item is listed.Setting Price for an Item (
set_price_for_item
):Executing Buyer Bids (
can_execute_buyer_bid
):Contract Upgrading (
upgrade
):ClassHash
, ensuring only the owner can perform this action.Events:
This contract integrates with StarkNet's components for ownership (
OwnableComponent
) and upgradability (UpgradeableComponent
), ensuring that only authorized users can perform sensitive operations like updating the protocol fee and upgrading the contract.