Flex-NFT-Marketplace / Flex-Marketplace-Contract

9 stars 30 forks source link

feat: Implement strategy_highest_bidder_auction_sale contract #85

Closed 0xandee closed 1 week ago

0xandee commented 3 weeks ago

This strategy will basically an auction sale for NFTs, like many other marketplaces.

Read more on README, marketplace/deployment.ts and strategy_standard_sale_for_fixed_price.cairo for references and to understand more how strategy works with marketplace contract.

od-hunter commented 3 weeks ago

Hi @0xandee , can I be assigned this please? I’m ready to work.

onlydustapp[bot] commented 3 weeks ago

Hi @od-hunter! Maintainers during the ODHack # 7.0 will be tracking applications via OnlyDust. Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

onlydustapp[bot] commented 3 weeks ago

Hi @Iwueseiter! Maintainers during the ODHack # 7.0 will be tracking applications via OnlyDust. Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

ShantelPeters commented 3 weeks ago

Hi @0xandee please can I be assigned to this issue

martinvibes commented 3 weeks ago

hi @0xandee can I be assigned

onlydustapp[bot] commented 3 weeks ago

Hi @mubarak23! Maintainers during the ODHack # 7.0 will be tracking applications via OnlyDust. Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

onlydustapp[bot] commented 3 weeks ago

Hi @Shoetan! Maintainers during the ODHack # 7.0 will be tracking applications via OnlyDust. Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

onlydustapp[bot] commented 3 weeks ago

Hi @Shoetan! Maintainers during the ODHack # 7.0 will be tracking applications via OnlyDust. Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

ScottyDavies commented 3 weeks ago

Hi @0xandee, can I be assigned this issue

manlikeHB commented 3 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, I’m a Cairo Devloper and I’ve had experiences contributing to lots of open source Cairo projects, I’m confident I can implement this feature.

How I plan on tackling this issue

- I will go through the repo and ask questions to clear about the requirements of this feature

This is simply a basic approach, I'll be okay to fine tune my implementation to meet the specific requirements after discussing it.

Shoetan commented 3 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, I am Emmanuel not so new contributor to OD hack. Recent basecamp garduate.

How I plan on tackling this issue

I would love to work on this. I have implemented something like this before during my base camp link: https://github.com/Shoetan/auction-dApp/blob/main/auction_contract/src/lib.cairo

I understand how an auction works In very brief terms we want to collect bids and sell to the highest bidder. Here are a few steps I will take to solve this issue

I am going to ask a lot of questions so I am clear about the requirements of this feature keep track of the bid amount in storage to hold bid that amount that changes with a new high bid. Let's say the initial bid was 2 STRK and someone else bade 4 STRK the bid amount has to change to the current highest bid. Keep track of the bidder's address and bid amount. I think a dictionary Felt252Dict will be perfect for this. Emit an event whenever a new bid is received. If no more bids and auction ends transfer the asset to the highest bidder. Emit an event when the auction has ended. Test the contract functions extensively using SN foundry.

ScottyDavies commented 3 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am front end developer with 6 years experience. i have worked with microsoft on several projects, this will be my first time contributing to the hackathon and i am ready to work

How I plan on tackling this issue

I would approach this issue with following steps Understand the Existing Marketplace and Strategy: Review the README file to gain a high-level understanding of how the marketplace contract and the various sales strategies work. Examine the marketplace/deployment.ts file to see how the marketplace contract is currently being deployed and configured. Analyze the strategy_standard_sale_for_fixed_price.cairo file to understand the implementation of the existing fixed-price sale strategy. Design the Auction Sale Strategy: Determine the key components and requirements of the auction sale strategy, such as: Auction duration Bid incrementing rules Handling of the highest bid Auction end conditions and winner determination Integration with the marketplace contract Sketch out the high-level logic and data structures needed to implement the auction sale strategy. Implement the Auction Sale Strategy: Create a new Cairo file, e.g., strategy_auction_sale.cairo, to implement the auction sale strategy. Define the necessary data structures and storage variables to keep track of the auction details, such as: Auction start and end times Current highest bid and bidder Bid increment rules Implement the core auction logic, including: Accepting bids and updating the highest bid Enforcing the bid increment rules Determining the auction winner upon auction end Handling the transfer of the NFT and funds Integrate the Auction Sale Strategy with the Marketplace: Modify the marketplace/deployment.ts file to include the new auction sale strategy alongside the existing fixed-price sale strategy. Ensure that the marketplace contract can properly interact with the auction sale strategy, including: Passing the necessary parameters to the auction strategy Handling the execution of the auction sale Integrating the auction outcome (winner, price) with the overall marketplace functionality Update the Documentation: Enhance the README file to include detailed documentation on the new auction sale strategy, covering the following aspects: Overview of the auction sale strategy and its key features Integration with the marketplace contract Step-by-step instructions on how to use the auction sale strategy Examples of auction setup and execution Considerations and potential edge cases Test and Validate the Auction Sale Strategy: Thoroughly test the auction sale strategy, including various scenarios such as: Multiple bidders participating in an auction Handling bid increments and the highest bid Auction end conditions and winner determination Edge cases, such as auction cancellation or timeouts Ensure that the auction sale strategy integrates seamlessly with the marketplace contract and that the overall system behaves as expected. Deploy and Communicate the Changes: Once the auction sale strategy is tested and validated, deploy the updated marketplace contract to the production environment. Communicate the new auction sale functionality to the marketplace users, providing clear instructions and examples on how to participate in and manage auctions. Gather feedback from the users and be prepared to address any issues or concerns that arise during the initial deployment.

raizo07 commented 3 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I'll like to be assigned to work on this. I would love to be given the opportunity.

jrmncos commented 3 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

hey! I'm a Software Engineer backend SSR. It's not my first time writing an smart contract with Cairo, but yes one of my first contributions to Onlydust.

How I plan on tackling this issue

I will take a look to the suggested code and I will try to find another in github related to that. I don't wanna reinvent the wheel.

ShantelPeters commented 3 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With my frontend development background, I can effectively design and implement the auction strategy for NFTs by leveraging my experience with integrating contract functionalities and understanding user interactions. My skills in coding and UI/UX will ensure a smooth integration with the marketplace contract.

How I plan on tackling this issue

  1. Review Documentation: Examine README, deployment.ts, and strategy_standard_sale_for_fixed_price.cairo to understand the current setup.
  2. Design Auction Strategy: Implement auction logic for NFTs, integrating with the existing marketplace contract.
  3. Update Contracts: Modify or create smart contracts as needed for auction functionality.
  4. Test and Deploy: Ensure thorough testing of the auction strategy and deploy it to the marketplace.
onlydustapp[bot] commented 2 weeks ago

The maintainer 0xandee has assigned raizo07 to this issue via OnlyDust Platform. Good luck!