FEEDBACK
This repo features the blockbuster video renting shop where users can rent videos like the good old days of the 90s
Hey mononoke, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
withdraw_from_shop function to use this error code if the recipient address is invalid.rent_item Functionburn FunctionItem struct before deletion.return_item Functionin_store_item instead of inStoreItem.assert_valid_withdrawal_amount, assert_correct_payment, assert_item_listed, etc., to maintain code readability and validation checks.The School Management Smart Contract module facilitates the decentralized management of educational institutions, providing functionalities to manage schools, students, fees, subjects, and lecturers. This module leverages blockchain technology to ensure transparency, security, and efficiency in school administration processes.
Hey pertie, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
transfer_student_to_another_school that allows transferring a student from one school to another. This function updates the student's school ID to reflect the new school.create_school function initializes a new school with specified attributes and creates a SchoolCap for administrative access.enroll_student function enrolls a new student in the specified school, ensuring that the gender is valid.generate_fee, pay_fee, and get_fee_amount handle fee creation, payment, and retrieval of fee amounts for students.withdraw, add_funds_to_school, and refund_funds_from_school manage the school's balance, including adding and refunding funds.add_subject, assign_lecturer_to_subject, add_lecturer, update_subject_info, and update_lecturer_info.get_student_details and get_lecturer_details provide detailed information about specific students and lecturers.get_school_balance and get_student_status provide access to the school's balance and student payment status.The project is designed to simplify and optimize the currency exchange process by enabling direct conversion from SUI, a cryptocurrency, to Kenyan Shilling (KES) without the intermediary step of converting to USD. This innovative approach addresses the inefficiencies typically associated with traditional exchange methods, where converting through a third currency (often USD) can result in higher fees, longer transaction times, and additional complexity. By bypassing the need for USD conversion, the project offers a more streamlined, cost-effective, and user-friendly solution for individuals and businesses looking to exchange SUI directly into KES. The platform is tailored to meet the needs of the Kenyan market, providing a seamless experience for users who want to engage in cryptocurrency transactions with minimal friction and maximum efficiency.
Hey Kaltush, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
is_active flag to the Pool struct to manage the pool's active state, ensuring that operations can only occur in active pools.deactivate_pool and reactivate_pool functions to allow the admin to control the pool's active status.get_coupon_for_testing to facilitate the creation of specific coupon objects for testing purposes.The Digital Art Gallery is a blockchain-based application designed to manage and transact digital art assets using the Sui blockchain platform. It allows users to securely and transparently manage digital artwork ownership, listing, updates, and sales, ensuring the traceability of ownership changes and transactions.
Hey Sammydev, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This PR introduces several improvements and bug fixes to the digital_art_gallery contract:
Bug Fixes: Added a check for insufficient funds during artwork creation. Ensured only the artwork owner can update or delete their artwork. Fixed potential issues with incorrect assertions.
Enhancements: Improved event emissions with more detailed information. Added the ability to change the price of artwork separately. Introduced a feature to change the artist of a gallery. Optimized code by removing unnecessary imports and ensuring consistent naming conventions.
Testing: Provided a init_for_testing function to assist with testing setups
# Event Management Decentralized Platform ## Overview This decentralized platform, built on the Sui Move blockchain, facilitates the creation, management, and participation in events. It offers a robust set of features for event organizers and participants, including event creation, ticket sales, participant registration, notifications, and event reporting. The platform ensures security and transparency through the use of smart contracts and decentralized principles. ## Key Structures and Components ### AdminCap - **AdminCap**: Structure representing the administrative capabilities, containing a unique identifier (UID). ### EventDetails - **EventDetails**: Structure containing detailed information about an event, such as the event name, details, ticket price, total tickets, sold tickets, start and end times. ### Ticket - **Ticket**: Structure representing a ticket for an event, including event ID, owner address, and refund status. ### Participant - **Participant**: Structure containing information about a participant, including registered events and notifications. ### Profile - **Profile**: Structure representing a user profile, including user address, verification status, and reputation score. ### Event Types - **TicketMintedEvent**: Event emitted when a ticket is minted. - **EventCreatedEvent**: Event emitted when an event is created. ## Error Codes - **EInsufficientFunds (1)**: Indicates insufficient funds for ticket purchase. - **EEventNotActive (2)**: Indicates the event is not currently active. - **EInvalidCall (4)**: Indicates an invalid function call. - **EFundingReached (5)**: Indicates that the funding or ticket limit for an event has been reached. - **ENotRegistered (6)**: Indicates the participant is not registered for the event. - **EAdminOnly (10)**: Indicates that the action is restricted to the admin. ## Functions ### Initialization - **init**: Initializes the module by transferring AdminCap to the sender. ### Event Management - **create_event**: Allows the creation of a new event, emitting an `EventCreatedEvent` and sharing the event details. - **update_event_details**: Allows the admin to update event details. - **cancel_event**: Allows the admin to cancel an event, emitting an `EventCreatedEvent` indicating cancellation. ### Ticket Management - **buy_ticket**: Allows users to buy tickets for an event, emitting a `TicketMintedEvent` and transferring the ticket to the buyer. - **refund_ticket**: Allows the admin to refund tickets, transferring the funds back to the user. - **validate_ticket**: Validates if a ticket is legitimate and if the event is currently active. - **resell_ticket**: Allows users to resell tickets to a new owner. ### Participant Management - **register_for_event**: Registers a participant for an event. - **check_in**: Allows participants to check in for an event. - **rate_event**: Allows participants to rate an event. ### Notification Management - **subscribe_to_event_notifications**: Allows participants to subscribe to event notifications. - **send_notification**: Sends notifications to participants. ### User Profile Management - **register_profile**: Registers a user profile on the platform. - **verify_profile**: Allows the admin to verify a user profile. - **update_reputation**: Allows the admin to update a user’s reputation score. - **authenticate_user**: Placeholder function for user authentication. ### Financial Management - **transfer_funds**: Transfers funds within the platform. - **get_event_attendance**: Returns the number of sold tickets for an event. - **get_ticket_sales**: Calculates total ticket sales for an event. - **generate_event_report**: Generates a report for an event, including attendance and sales. ### Event Listing - **list_events**: Lists all events on the platform. ## Usage 1. **Initialization**: Deploy the smart contract and call the `init` function to set up the AdminCap. 2. **Event Creation**: Use `create_event` to create new events with detailed information. 3. **Ticket Purchase**: Participants can buy tickets using the `buy_ticket` function, ensuring they have sufficient funds. 4. **Event Management**: Admins can update or cancel events using `update_event_details` and `cancel_event`. 5. **Participant Engagement**: Participants can register, check-in, rate events, and subscribe to notifications using the respective functions. 6. **Financial Transactions**: Manage funds and refunds using `transfer_funds` and `refund_ticket`. 7. **Event Reports**: Generate reports and view event details using `generate_event_report`. ## Conclusion This platform leverages the power of blockchain to provide a decentralized solution for event management. It ensures transparency, security, and ease of use for both event organizers and participants. By utilizing smart contracts, the platform automates many aspects of event management, making it efficient and reliable.
Hey Vinicius, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
cancel_event function to handle event cancellation and ticket refunds.get_event_details function to retrieve event details.check_in function to allow participants to check in for events.rate_event function to allow participants to rate events.register_profile, verify_profile, and update_reputation functions to handle user profiles and reputation scores.# DreamStarter: The Future of Crowdfunding on Blockchain for Events and Startups ## Introduction DreamStarter revolutionizes the crowdfunding landscape, extending beyond the realms of traditional event organization to embrace a wide spectrum of initiatives, from groundbreaking physical and digital events to innovative startups, gaming ventures, comics, and company launches. Powered by the Sui blockchain, this platform forges a direct connection between Contributors and Idea Creators (Event Organizers and Startup Visionaries), facilitating the birth of event ideas and pioneering projects. By integrating the stability and transparency of blockchain with the dynamism of NFTs and stablecoins, DreamStarter empowers communities to transform imaginative concepts into reality, ensuring every project not only starts strong but also has a community to support its growth. **Roles:** 1. **Proposal Creators** : Individuals or entities responsible for creating and managing events on the platform. 2. **Contributors (Product Users)**: Individuals interested in contributing to events by purchasing NFTs representing their contributions. - In DreamStarter there are two types of NFT’s : - 1. **DreamStarter Collab** : - This NFTs provide contributors with additional benefits returns for supporting projects/ideas and DreamStarter Holder NFTs will surpass traditional bank interest rates, because it is offering profits in a short period 2. **DreamStarter Holde**r : - It signify a regular contribution or ticket purchase, donation for a idea with no financial returns - In the crowdfunding process, proposal creators are required to stake up to 20% of the crowdfunding goal. However, this staking requirement is significantly more advantageous than seeking a loan from a bank, as it entails a lower down payment and fosters a more collaborative funding model. - Contributors will get Proof of Attendance Tokens (POAPs) as a gesture of appreciation once events, regardless of NFT type, have finished and through which community creation can be done. For a startup venture, contributors may also gain early access to products or services. WIN WIN FOR ALL ## Overview ### Proposal Submission: - **Login & Create:** Users log in and submit a detailed proposal for an event, including duration for voting and the crowdfunding goal. - **Community Voting:** Proposals are open for community voting for the specified duration. Proposals meeting the required vote threshold proceed to crowdfunding. ### Crowdfunding Phase: - **Funding Goals:** If the proposal is approved, it moves to the crowdfunding phase where users can contribute funds. - **Goal Achievement:** If the crowdfunding goal is reached within the set timeframe, the project moves forward. If not, contributions are refunded. ### Project Execution: - **Initial Funding Access:** Post successful crowdfunding, the project initiator accesses the first milestone funds up to the staked amount without needing an expense report. - **Expense Reporting:** For subsequent withdrawals, an expense report is necessary. This triggers the dispute period. ### Dispute Resolution: - **Validation Period:** A one-week dispute period allows contributors to review and contest the expense reports. - **Community Decision:** Discrepancies lead to a community vote. If the community votes against the expenses, the initiator loses the staked amount. If approved, the project continues. ### Project Conclusion: - **Feedback & Review:** After the event, participants provide feedback, influencing the initiator’s future proposals and reputation on the platform.### Project Conclusion: - **Feedback & Review:** After the event, participants provide feedback, influencing the initiator’s future proposals and reputation on the platform. ### Cycle Repeat or Exit: - **New Proposals:** Satisfied organizers may propose new events, using their success and feedback as leverage for future projects. ## The Problem Navigating the traditional crowdfunding realm can be fraught with challenges: opaque financial management, uncertain community engagement, and limited support for diverse projects. For creators, whether they’re planning an immersive concert or launching a gaming startup, these barriers can dampen innovation and hinder the realization of their visions. ## The Solution DreamStarter reimagines crowdfunding with a blockchain backbone, supporting a vast array of projects from entertainment events to startup ventures. It democratizes the funding process, offering transparent financial tracking, community-driven governance, and innovative funding mechanisms through NFTs. This approach not only guarantees transparency and security but also cultivates a vibrant community around each project, ensuring a dedicated user base and sustainable growth. ## Key Features - **Crowdfund any Idea**: DreamStarter caters to a wide range of proposals, including sports events, concerts, pool parties, DJ events, gaming startups, corporate launches, and more. It is the go-to place for anyone with an idea who needs funding and who wants to build a community to support their business. It can be launched by individuals or organizations. - **Proposal and Voting System**: A gateway for individuals to pitch ideas or organizations to submit diverse project ideas. Three types of voting will then take place: 1. Specified Users 2. Everyone using the application 3. Dependent on location. If it received a sufficient number of votes, say 51%, they may move on to the next round, which is to start their own smart contracts for fundraising. - **NFT-Driven Funding and Rewards**: Unique utilization of NFTs for funding, offering DreamStarter Holder and DreamStarter Collab options, providing contributors with tangible benefits and a stake in the project’s success. - **Enhanced Trust and Accountability**: Creators stake a portion of the funding goal, there would be less chances of rug pool. Users can only fundraise up to a certain amount. - **Milestone based funding**: Where Proposal creator can only take that much amount funds which less than the staked amount and there will be milestones given by proposal creator, funds cannot be taken in one go. - **Transparent and Secure Financial Operations**: Leveraging blockchain for a clear, auditable trail of financial transactions, ensuring integrity and building trust among all participants. On-chain expense tracker for unmatched security and fraud prevention. Every financial action is transparent, keeping organizers in check. - **Dispute Period**: Users have the option to raise a dispute if they discover any discrepancies in the spending report. A 1 week dispute window will be available for the user to stake money and file a dispute. The staked amount will be removed and dispersed if the proposal creator is unable to provide evidence and the public votes against them, or vice versa if users fail. - **Stablecoin & Democracy**: Utilize stablecoins for minimal volatility and maximum financial stability. - **Profit Sharing and Incentivization**: With DreamStarter Holder NFTs, will get financial returns for project/event completion as a reward for early supporter. - **Inclusive Community Building and Engagement**: Not just a funding platform, DreamStarter nurtures a supportive ecosystem around projects, by helping them to create communities. ## DreamStarter Technical Architecture ## Frontend Technology Stack: - **Next.js**: A React framework that enables functionality such as server-side rendering and generating static websites for React-based web applications. - **Tailwind CSS**: A utility-first CSS framework for rapidly building custom designs. - **zk-Login for Authentication**: Allows users to connect to the dApp without already having a Sui wallet, enhancing accessibility and user experience. ### Website Screenshot  ## Smart Contracts ### NFT Contract - Manages the minting, trading, and ownership of NFT tickets. - Governs the creation of DreamStarter Holder and Collab NFTs, ensuring their uniqueness and linking them to specific events or projects. ### Stake Contract - Facilitates the staking mechanism for event organizers, including the locking of funds as a commitment to project success. - Handles the distribution of profits back to NFT holders. - Manages the refund process in case an event does not meet its crowdfunding goal. ### Interaction with the Sui Blockchain - Deployed on the Sui blockchain, benefiting from its high throughput and low transaction costs. - The contracts interact with the blockchain to record transactions, manage NFTs, and ensure the integrity of the crowdfunding process. - Leverages Sui's capabilities for scalability and security. ## App Technology Stack: - **Android SDK and Java**: Utilized for the mobile app development to ensure robust performance and compatibility across a wide range of Android devices. - Ensures that users have reliable access to DreamStarter’s features anytime, anywhere. ## Important Time Limits - **Creating Proposals/Ideas:** Remember, voting on proposals is only available within the designated timeframe set during submission. - **Crowdfunding Events:** Contributions through NFT purchases must be made within the event’s specific crowdfunding window to count towards the project's goal. ## Demo - **Link to a Live Demo:** [DreamStarter Live Demo](https://dream-starter-ashen.vercel.app/) ## DreamStarter Roadmap: Future Development Plans Our journey with DreamStarter is just beginning. As we continue to build and improve, here are some of the key milestones and features we're excited to work towards: ## Short-Term Goals (Next 6 Months) - **Enhanced User Interface:** We'll focus on refining the UI/UX of DreamStarter to ensure an even more intuitive and engaging experience for all users. Expect cleaner designs, smoother transitions, and additional customization options. - **Open Source Contributions:** Opening up DreamStarter for community contributions is a priority. We'll establish guidelines for open-source involvement, allowing developers around the world to contribute code, suggest features, and help us improve the platform. ## Mid-Term Goals (6-12 Months) - **Rating System Implementation:** To foster trust and transparency, we will introduce a rating system for individuals and organizations. Based on their performance, event success rates, and community feedback, entities can earn ratings that influence their staking requirements. Higher-rated users may enjoy reduced staking percentages for initiating projects, making it easier for reputable organizers to bring their ideas to life. - **Integration of ZkMap or Proof-of-Location:** We plan to enhance community interaction by incorporating zero-knowledge proofs for location verification. This feature will enable users to connect and chat with others who share similar interests without compromising their privacy. Whether you're at a large event or looking to meet up with local community members, our proof-of-location service will make it seamless and secure. ## Long-Term Goals (1 Year and Beyond) - **Advanced Crowdfunding Models:** Looking further ahead, we aim to explore and implement more sophisticated crowdfunding mechanisms. This could include dynamic pricing for NFTs, secondary market support, and even DAO-driven event funding. - **Expansion of Event Categories:** While DreamStarter currently focuses on events and startups, we envision expanding into more categories. This could encompass funding for community projects, educational programs, and much more, broadening the scope of what can be achieved through our platform. - **Global Community Engagement Initiatives:** As DreamStarter grows, we'll launch initiatives aimed at building our global community. These may include hackathons, workshops, and partnerships with other platforms and organizations in the blockchain ecosystem. Our roadmap reflects our commitment to making DreamStarter a leading platform for blockchain-based crowdfunding. By continuously innovating and listening to our community, we aim to break down barriers to funding and event organization, making it more accessible, transparent, and engaging for everyone involved.
Hey Soumalya04, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
NFTMintedEvent is emitted when an NFT is minted, capturing details such as the object ID, creator, name, and URL. Events improve transparency and traceability, making it easier to track the contract's activities and debug if necessary.AdminCap and State. The initialize function takes input parameters for the target amount, end time, and NFT price amount, setting up the initial state with relevant timestamps and financial targets.State struct.The Learning Management System (LMS) module facilitates decentralized management of educational institutes, courses, student enrollments, and grant approvals within a blockchain ecosystem. It provides functionalities for creating and managing institutes, adding courses, enrolling students, handling grant requests, managing balances, and ensuring secure transactions between stakeholders.
Hey miri, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Certificate struct to manage course completion certificates.Course struct to include course descriptions and duration.Enrollment struct to include grades and completion status.Introduced a feature to issue certificates to students upon course completion.
Implemented a system for managing grant requests and approvals.
Enhanced functionalities for updating student and course information, including enrollment and balances.
Added functions to generate reports for students, courses, and institute financials.
Enhanced error codes and messages for better clarity and debugging.
Added checks to ensure authorized access and the atomicity of transactions.
The `food_share` module on the Sui blockchain platform is designed to facilitate the sharing and distribution of surplus food through a decentralized network. This module allows donors to post surplus food, receivers to claim and assign deliveries, drivers to accept and deliver, and manage payments and disputes efficiently.
Hey alvindev, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
## Project Description: SuiStream is a decentralized subscription platform built on the Sui blockchain, allowing creators to offer paid subscriptions for their content or services. Subscribers can purchase these subscriptions and access the content for a specified duration. ## Key Features: - Subscription Creators: Individuals or organizations can become subscription creators by creating a SubscriptionCreator object on the platform. - Subscriptions: Creators can create and offer subscriptions, each with a name, description, price, duration, and content (represented as a vector of bytes). - Subscription Purchase: Users can purchase subscriptions by sending the required payment in SUI coins to the creator. - Access Control: Subscribers can access the subscription content as long as their subscription is active (before the expiration time). - Events: The platform emits events for subscription creation and purchase, enabling transparency and tracking. ### This project provides a decentralized and transparent way for creators to offer paid subscriptions for their content or services, while giving subscribers control over their subscriptions and access to the content they've paid for. ### The unique aspects of this project include the ability for creators to offer time-limited subscriptions with custom content, and the use of the Sui blockchain to ensure secure and transparent transactions and access control.
Hey Crewspherexcu, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
cancel_subscription that allows subscribers to cancel their subscriptions. This function removes the subscriber from the subscription and emits a SubscriptionCancelledEvent.create_creator function initializes a new subscription creator, setting up the necessary structures and transferring the capability to manage subscriptions.create_subscription function allows the creator to create a new subscription with specified attributes and content.purchase_subscription function enables users to purchase subscriptions, updating the subscriber list and handling payment.access_content function provides subscribers access to subscription content, ensuring the subscription is valid and not expired.cancel_subscription function allows subscribers to cancel their subscriptions, removing them from the subscriber list and emitting a cancellation event.## Decentralized Micro Tasks: Sui Move Library for Task and Training Management This Move library implements a decentralized micro task and training management system on the Sui blockchain. It defines structures for tasks and training sessions, along with functions for creating, assigning, completing, verifying, and resolving tasks, as well as managing training certifications. ### Key Features - Secure and transparent task and training management system on the Sui blockchain. - Role-based access control with creator and assignee capabilities. - Manages task assignments, completions, and disputes. - Manages training sessions and certifies users. - Provides functions for querying task and training details. ### Library Management: - Creating tasks with associated rewards and descriptions. - Assigning tasks to assignees and verifying completion. - Managing disputes and releasing rewards based on resolution. - Withdrawing funds from the task escrow balance. ### Task Management: - Adding tasks to the platform with details like description, reward, and assignee. - Completing and verifying tasks, including handling disputes and reward distribution. - Viewing task details and listing available tasks. ### Training Management: - Creating training sessions with descriptions and rewards. - Completing training sessions and certifying users. - Managing refunds for incomplete tasks. ### Usage This library can be integrated into your Sui Move projects to implement a secure and decentralized micro task and training management system. You can use the provided functions to manage tasks, assign and complete tasks, resolve disputes, manage training sessions, and access relevant data. ### Summary of Key Components - **Task Structure:** Represents a task with attributes like creator, assignee, description, reward, escrow balance, and status flags. - **Training Structure:** Represents a training session with attributes like creator, description, reward, escrow balance, completion status, and certified users. - **Task Functions:** - `create_task`: Creates a new task. - `assign_task`: Assigns a task to an assignee. - `complete_task`: Marks a task as completed by the assignee. - `verify_task_completion`: Verifies the completion of a task by the creator. - `release_reward`: Releases the reward to the assignee upon task verification. - `dispute_task`: Marks a task as disputed by the creator. - `resolve_dispute`: Resolves a task dispute, either awarding the assignee or returning the escrow to the creator. - `view_task_details`: Views the details of a task. - `list_available_tasks`: Lists all available tasks that are not assigned. - **Training Functions:** - `create_training`: Creates a new training session. - `complete_training`: Marks a training session as completed by a user. - `certify_user`: Certifies a user for completing a training session. - `request_refund`: Requests a refund for an incomplete task by the creator. ### Integration Integrate this library into your Sui Move projects to manage micro tasks and training sessions in a decentralized manner. Use the provided functions to handle task creation, assignment, completion, dispute resolution, and training certification efficiently and securely on the Sui blockchain.
Hey EmmanuelOdera, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Task and Training structs is initialized but never actually funded or used, which makes the reward distribution logic incomplete.release_reward function doesn't handle scenarios where the escrow is not funded. The escrow should be filled when a task is created or at least before the task is assigned.complete_training function allows any user who is not the creator to mark training as completed, which might not be ideal.Gift Coin (GFT) is a decentralized token built on the Sui blockchain, designed for gifting friends and family. This smart contract allows users to securely mint, burn, and transfer GFT tokens, while also providing administrative controls for managing authorized minters and maintaining balance updates. The project aims to offer a simple and efficient way to share value within a trusted network.
Hey boyw, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
get_managers that allows viewing the list of authorized managers. This feature enhances transparency and administrative control over the token management system.init function initializes the MAIN token with specified properties, sets up the supply, and shares the storage object with the network. It also transfers the admin capability to the sender and freezes the metadata object.mint and burn handle the minting of new tokens and burning of existing tokens, ensuring that only authorized publishers can perform these actions.transfer function facilitates transferring tokens from the sender to a recipient while updating the respective balances.update_account_balance function allows authorized publishers to update the balance of specific accounts, either increasing or decreasing them.add_manager and remove_manager manage the list of authorized publishers by adding or removing IDs from the set of managers.mint_admin and burn_admin allow administrative minting and burning of tokens, useful for testing purposes.get_supply, get_balance, and get_managers provide access to the current token supply, the balance of specific addresses, and the list of authorized managers.This contract implements a decentralized exchange (DEX) where users can trade ETH and USDC tokens. * It also includes functionality to reward users with a custom DEX token every 2 swaps. * The contract manages the creation of the DEX coin, the storage of user swap and minting data, * and the execution of market and limit orders.
Hey oduoronyina, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This project is a blockchain-based event ticketing system built on the SUI platform. The system allows for the creation of events, the sale of tickets, and the handling of ticket purchases and refunds using SUI coins. The use of blockchain ensures transparency, security, and immutability of transactions.
Hey Diefre, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
entry modifier to functions that modify state.Hotel_booking Sui Move module provides a secure and efficient system for managing hostel bookings within an educational institution. It allows institutions, students, and administrators to interact through a set of well-defined functions, ensuring data integrity and transparent transactions on the Sui blockchain.
Hey Jerryj, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This pull request includes several bug fixes and improvements to the hostel_booking module:
The School Management Smart Contract is a decentralized application (DApp) built on the SUI (Move) programming language for the Move blockchain. It provides a comprehensive solution for managing various aspects of a school, including student enrollment, attendance tracking, fee management, and more. Features: Student Enrollment: Allows administrators to register new students, storing their personal information such as name, age, gender, and contact details. Attendance Tracking: Enables teachers to mark attendance for students, keeping track of their attendance records securely on the blockchain. Fee Management: Facilitates the collection of fees from students and tracks their payment status. It generates detailed bills for students and records payment transactions. Academic Records: Stores academic records such as grades, exam results, and class assignments securely on the blockchain. User Permissions: Implements role-based access control, allowing administrators, teachers, and students to access specific functionalities based on their roles.
Hey fils, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This pull request includes several bug fixes and improvements to the school_monitor::school_management module:
new_student function to use "FEMALE" instead of "FAMALE".remove function logic to handle student removal based on payment status.# Insurance Module The Insurance module facilitates the creation and management of insurance policies within a decentralized system. This module allows for the creation of policies, addition of policy holders, premium payments, and the calculation of coverage and claims. By leveraging the Move smart contracts, the Insurance module ensures transparent, secure, and efficient handling of insurance operations. ## Struct Definitions ### INSURANCE Represents the main insurance module. - **INSURANCE**: Main struct with the `drop` ability. ### AdminCap Defines administrative capabilities. - **id**: Unique identifier for the admin capability. ### Policy Represents an insurance policy. - **id**: Unique identifier for the policy. - **premiums_per_second**: Rate of premiums accumulated per second. - **start_timestamp**: Timestamp marking the start of the policy. - **last_update_timestamp**: Timestamp of the last update. - **accrued_coverage_per_share**: Accrued coverage per share. - **balance_cover_coin**: Balance of cover coins in the policy. - **balance_premium_coin**: Balance of premium coins in the policy. - **cover_coin_decimal_factor**: Decimal factor for cover coins. - **owned_by**: Identifier of the owner of the policy. ### PolicyCap Defines capabilities related to policy management. - **id**: Unique identifier for the policy capability. - **policy**: ID associated with the specific policy. ### Holder Represents a policy holder. - **id**: Unique identifier for the holder. - **policy_id**: ID of the associated policy. - **coverage_amount**: Amount of coverage held. - **claim_debt**: Outstanding claim debt. ## Public - Entry Functions ### `init` Initializes the insurance module. - **Parameters**: - `_wtn`: The insurance module instance. - `ctx`: Transaction context. ### `new_policy` Creates a new insurance policy. - **Parameters**: - `cover_coin_metadata`: Metadata of the cover coin. - `c`: Clock instance. - `premiums_per_second`: Premium rate per second. - `start_timestamp`: Start time of the policy. - `ctx`: Transaction context. - **Returns**: A tuple containing the `Policy` and `PolicyCap`. ### `new_holder` Creates a new holder for an existing policy. - **Parameters**: - `policy`: The policy to which the holder will be added. - `ctx`: Transaction context. - **Returns**: The created `Holder`. ### `pending_coverage` Calculates the pending coverage for a holder. - **Parameters**: - `policy`: The associated policy. - `holder`: The holder whose pending coverage is being calculated. - `c`: Clock instance. - **Returns**: The pending coverage amount. ### `purchase_coverage` Allows a holder to purchase coverage. - **Parameters**: - `policy`: The policy to which coverage is being added. - `holder`: The holder purchasing coverage. - `cover_coin`: The coin used for coverage. - `c`: Clock instance. - `ctx`: Transaction context. - **Returns**: A coin of premium type. ### `withdraw_coverage` Allows a holder to withdraw coverage. - **Parameters**: - `policy`: The policy from which coverage is being withdrawn. - `holder`: The holder withdrawing coverage. - `amount`: Amount to withdraw. - `c`: Clock instance. - `ctx`: Transaction context. - **Returns**: A tuple containing coins of cover and premium types. ### `add_premiums` Adds premiums to a policy. - **Parameters**: - `policy`: The policy to which premiums are being added. - `c`: Clock instance. - `premium`: The premium coin. ## Private Functions ### `clock_timestamp_s` Gets the current timestamp in seconds. - **Parameters**: - `c`: Clock instance. - **Returns**: Current timestamp in seconds. ### `calculate_pending_coverage` Calculates the pending coverage for a holder. - **Parameters**: - `holder`: The holder whose pending coverage is being calculated. - `cover_factor`: Decimal factor for cover coins. - `accrued_coverage_per_share`: Accrued coverage per share. - **Returns**: Pending coverage amount. ### `update` Updates the policy state. - **Parameters**: - `policy`: The policy being updated. - `now`: Current timestamp. ### `calculate_accrued_coverage_per_share` Calculates the accrued coverage per share. - **Parameters**: - `premiums_per_second`: Premium rate per second. - `last_accrued_coverage_per_share`: Last accrued coverage per share. - `total_covered_token`: Total covered token value. - `total_premium_value`: Total premium value. - `cover_factor`: Decimal factor for cover coins. - `timestamp_delta`: Difference between current and last update timestamps. - **Returns**: Updated accrued coverage per share. ### `calculate_claim_debt` Calculates the claim debt for a holder. - **Parameters**: - `coverage_amount`: Coverage amount. - `cover_factor`: Decimal factor for cover coins. - `accrued_coverage_per_share`: Accrued coverage per share. - **Returns**: Calculated claim debt. ### `min` Finds the minimum of two u256 values. - **Parameters**: - `x`: First value. - `y`: Second value. - **Returns**: The minimum value. ### `min_u64` Finds the minimum of two u64 values. - **Parameters**: - `x`: First value. - `y`: Second value. - **Returns**: The minimum value. ### Build and Deploy 1. Clone the Insurance module repository and navigate to the project directory. 2. Compile the smart contract code using: sui move build 3. Deploy the compiled smart contract to your local SUI blockchain node using the SUI CLI or other deployment tools. 4. Note the contract address and other relevant identifiers for interacting with the deployed contract. ### Usage #### Creating a New Policy Call the `new_policy` function with the required parameters to create a new policy. #### Adding a Holder Use the `new_holder` function to add a holder to an existing policy. #### Managing Coverage - **Purchase Coverage**: Call the `purchase_coverage` function to allow a holder to purchase coverage. - **Withdraw Coverage**: Use the `withdraw_coverage` function to withdraw coverage for a holder. #### Adding Premiums Call the `add_premiums` function to add premiums to a policy. ### Interacting with the Smart Contract #### Using the SUI CLI Utilize the SUI CLI to interact with the deployed smart contract, providing function arguments and transaction contexts as required. Monitor transaction outputs and blockchain events to track policy management, coverage, and premium payments. ## Conclusion The Insurance module provides a comprehensive solution for decentralized insurance management. By leveraging blockchain technology and smart contracts, it ensures secure, transparent, and efficient handling of insurance policies, premium payments, and claims.
Hey TarzanCharles, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
calculate_pending_coverage and calculate_claim_debt functions have overlapping logic that can be consolidated.update function can be optimized to handle different states more efficiently.admin_cap leading to unauthorized actions.calculate_pending_coverage and calculate_claim_debt functions.update function for better performance.Option values before accessing them.admin_cap validation before any administrative actions.EInvalidTimestamp to handle invalid timestamps during policy updates.calculate_pending_coverage and calculate_claim_debt for better clarity and reduced redundancy.update function to handle different states more efficiently, including when no covered value exists.Option values before accessing them.admin_cap in administrative functions to prevent unauthorized actions.PolicyCreated, CoveragePurchased, and CoverageWithdrawn events to log important actions on the blockchain.A decentralized trash collection system with on-chain payments leverages blockchain technology to create a transparent, efficient, and incentive-driven ecosystem for managing waste disposal and recycling initiatives.
Hey kututajohn, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:## Key Bug Fixes: - Fixed Spelling Errors: Corrected error constants. - Improved Validations: Added checks for sender roles and corrected logic for table operations. - Balance and Capacity Checks: Ensured atomic operations for balance deductions and capacity updates. - Consistency: Ensured function definitions are consistent and logical. ## New Features: - Reassign Users: Added function to reassign users to different trucks. - Cancel Collection Request: Added function to cancel collection requests. - Event Emission: Added event logging for significant actions.
The Loyalty Rewards Program module facilitates the management of customer rewards within a decentralized system, enabling businesses to incentivize customer engagement and loyalty effectively. This module offers functionalities for creating rewards, validating them, adding funds, redeeming rewards, and updating reward attributes.
Hey vundi, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
transfer_reward_ownership that allows the current reward owner to transfer ownership of the reward to a new owner, provided the reward is transferable.create_reward function allows the creation of a new reward with specified points, tier, transferability, event trigger, and duration. It calculates the deadline and expiry based on the duration.validate_reward function validates a reward, ensuring that only the owner can validate it.add_funds_to_reward function allows the owner to add funds to the reward's escrow balance.redeem_reward function enables the owner to redeem the reward, transferring the escrow amount to the owner's address and marking the reward as redeemed. It also creates a redemption receipt.update_reward_points, update_reward_deadline, update_reward_expiry, update_reward_tier, update_reward_transferability, update_reward_event_trigger, and update_reward_redeemed allow the owner to update various properties of the reward.get_reward_points, get_reward_deadline, get_reward_expiry, is_reward_validated, is_reward_redeemed, is_reward_transferable, is_event_based_reward, and get_reward_tier provide access to different attributes of the reward.The decentralized_real_estate on the Sui blockchain platform is designed to facilitate the buying, selling, and renting of real estate properties through a decentralized network. This module allows users to create property listings, initiate and verify transactions, manage rental agreements, and handle payments efficiently.
Hey chrispus, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This module implements a carbon credit exchange platform on the Sui blockchain. It allows users to register carbon credits, list them for sale, place bids on listings, and accept bids to transfer ownership
Hey dr_mkelvo, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Contract struct to manage bids, listings, and escrow balance.CarbonCredit to provide more context about the credits.ContractInitialized, CarbonCreditRegistered, CarbonCreditListed, ListingDeactivated, BidPlaced, BidAccepted, and BidWithdrawn) to ensure important actions are logged and traceable.init function initializes a Contract object and transfers it to the sender's address.ContractInitialized event to record the initialization.register_carbon_credit function to register new carbon credits.CarbonCreditRegistered event to record the registration.list_carbon_credit function to ensure that only the owner can list a carbon credit.deactivate_listing function now marks a listing as inactive and emits a ListingDeactivated event.place_bid function to ensure only valid bids are placed and transfers the bid amount to the escrow.accept_bid function now transfers the bid amount to the listing owner and the ownership of the carbon credit to the bidder. It marks the bid as claimed and the listing as inactive, emitting relevant events.withdraw_bid function to allow bidders to withdraw their bids if they haven't been claimed yet, transferring the bid amount back to the bidder and emitting a BidWithdrawn event.## Sui Move Library for Educational Services Welcome to the Sui Move Library for Educational Services! This library is purpose-built to power an advanced educational platform on the Sui blockchain. It offers foundational structures to efficiently manage users, courses, and tutoring services. Packed with powerful functionalities, it aims to: ### User Management - **Registering Users**: Register new users with attributes like username, user type, and public key. ### Course Management - **Creating Courses**: Create new courses with details such as name, description, price, and total supply. - **Enrolling in Courses**: Enroll students in listed courses by handling payment and seat availability. - **Completing Courses**: Mark courses as completed by students. - **Updating Course Details**: Update the details of an existing course. - **Withdrawing Funds**: Withdraw funds from a course's balance to a specified recipient. ### Tutor Management - **Creating Tutor Profiles**: Create tutor profiles with information like tutor name and subjects taught. - **Offering Tutoring Services**: Offer tutoring services with specified rates and subjects. - **Requesting Tutoring Sessions**: Request tutoring sessions from tutors. - **Completing Tutoring Sessions**: Mark tutoring sessions as completed and assign ratings. - **Updating Tutoring Services**: Update the rate and availability status of tutoring services. ### Events - **CourseCreated**: Emitted when a new course is created. - **CourseEnrolled**: Emitted when a student enrolls in a course. - **CourseCompleted**: Emitted when a student completes a course. - **CourseUpdated**: Emitted when course details are updated. - **CourseUnlisted**: Emitted when a course is unlisted. - **FundWithdrawal**: Emitted when funds are withdrawn from a course. - **TutorProfileCreated**: Emitted when a new tutor profile is created. - **TutoringServiceOffered**: Emitted when a new tutoring service is offered. - **TutoringSessionRequested**: Emitted when a tutoring session is requested. - **TutoringSessionCompleted**: Emitted when a tutoring session is completed. - **TutoringServiceUpdated**: Emitted when a tutoring service is updated. ### Key Features - **Secure and transparent educational platform on the Sui blockchain.** - **Management of users, courses, and tutoring services with comprehensive event handling.** - **Efficient enrollment and payment handling for courses.** - **Capability to update course and tutoring service details.** - **Ability to withdraw funds from courses.** ### Usage This library can be integrated into your Sui Move projects to implement a secure and decentralized educational platform. You can use the provided functions to manage users, create and update courses, enroll in courses, complete courses, and handle tutoring services. ### Functions Overview #### Registering Users public fun register_user( user_name: vector<u8>, user_type: u8, public_key: vector<u8>, ctx: &mut TxContext ) - Registers a new user with the provided username, user type, and public key. #### Creating Courses public fun create_course( creator: address, name: vector<u8>, details: vector<u8>, price: u64, supply: u64, ctx: &mut TxContext ) - Creates a new course with the specified details, price, and supply. #### Enrolling in Courses public fun enroll_in_course( course: &mut Course, student: address, payment_coin: &mut Coin<SUI>, ctx: &mut TxContext ) - Enrolls a student in a course, handling payment and seat availability. #### Completing Courses public fun complete_course( enrolled_course: &EnrolledCourse, student: address, ctx: &mut TxContext ) - Marks a course as completed by the enrolled student. #### Updating Course Details public fun update_course_details( course: &mut Course, new_details: vector<u8>, _ctx: &mut TxContext ) - Updates the details of an existing course. #### Withdrawing Funds public fun withdraw_funds( course: &mut Course, amount: u64, recipient: address, ctx: &mut TxContext ) - Withdraws funds from a course's balance to the specified recipient. #### Creating Tutor Profiles public fun create_tutor_profile( tutor_name: vector<u8>, subjects: vector<string::String>, ctx: &mut TxContext ) - Creates a new tutor profile with the specified name and subjects. #### Offering Tutoring Services public fun offer_tutoring_service( tutor_id: u64, subject_id: u64, rate: u64, ctx: &mut TxContext ) - Offers a new tutoring service with the specified rate and subject. #### Requesting Tutoring Sessions public fun request_tutoring( tutor_id: u64, student: address, ctx: &mut TxContext ) - Requests a new tutoring session with the specified tutor. #### Completing Tutoring Sessions public fun complete_tutoring( session: &mut TutoringSession, rating: u8, _ctx: &mut TxContext ) - Marks a tutoring session as completed and assigns a rating. #### Updating Tutoring Services public fun update_tutoring_service( service: &mut TutoringService, new_rate: u64, available: bool, _ctx: &mut TxContext ) - Updates the rate and availability status of a tutoring service. #### Retrieving Course Details public fun get_course_details(course: &Course) : (u64, string::String, string::String, u64, u64, bool, address) - Retrieves details of a specified course. #### Retrieving Enrolled Course Details public fun get_enrolled_course_details(enrolled_course: &EnrolledCourse) : (u64, address) - Retrieves details of an enrolled course. #### Updating Enrolled Course Student public fun update_enrolled_course_student(enrolled_course: &mut EnrolledCourse, student: address) - Updates the student of an enrolled course. ### Conclusion This educational platform provides a comprehensive solution for managing users, courses, and tutoring services on the Sui blockchain. It leverages the features of Sui Move to ensure secure and efficient operations. Integrate this library into your Sui Move projects to create a robust and decentralized educational system.
Hey Denzel, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Defined clear and descriptive error constants at the beginning of the module. This helps in maintaining a consistent error-handling approach across the contract and makes debugging easier.
Improved assertions throughout the contract to ensure that invalid states or operations are caught early. This includes checks for valid prices, supply, enrollment status, and ownership verification.
The User struct now includes the for field, which links the user to a specific course or entity. This enhances the traceability and relationship management between users and courses.
Added the students field as a table to keep track of enrolled students efficiently. This table maps student addresses to a boolean value indicating enrollment status.
This struct acts as an administrative capability, ensuring that only authorized users can perform certain actions on courses.
Ensured these structs have all necessary fields for a comprehensive tutoring service management system.
Refined the register_user function to use sender(ctx) directly for the for field, ensuring that the user is correctly linked to the transaction sender. This function stores user details securely.
Enhanced the create_course function by adding proper assertions to validate the price and supply. This function initializes a new course object with all required details and emits a CourseCreated event.
Fixed logical issues in the enroll_in_course function. This function now correctly checks if the student is already enrolled, ensures sufficient payment, and manages course availability. It also updates the course's balance and emits a CourseEnrolled event.
The complete_course function verifies that the sender is the enrolled student before marking the course as completed and emitting a CourseCompleted event.
Improved the update_course_details function to ensure only authorized users (with CourseCap) can update course details. This function emits a CourseUpdated event with the new details.
The withdraw_funds function allows only the course owner to withdraw funds. It ensures the specified amount is available and transfers it to the recipient, emitting a FundWithdrawal event.
This function initializes a tutor profile with a unique ID and stores the tutor's details. It emits a TutorProfileCreated event.
The offer_tutoring_service function creates a new tutoring service entry and emits a TutoringServiceOffered event.
This function registers a new tutoring session request and emits a TutoringSessionRequested event.
Marks a tutoring session as completed, assigns a rating, and emits a TutoringSessionCompleted event.
Allows updating the rate and availability of a tutoring service and emits a TutoringServiceUpdated event.
Ensured that all state-changing actions emit corresponding events to provide transparency and traceability. Events such as CourseCreated, CourseEnrolled, CourseCompleted, CourseUpdated, FundWithdrawal, TutorProfileCreated, TutoringServiceOffered, TutoringSessionRequested, TutoringSessionCompleted, and TutoringServiceUpdated are consistently emitted.
Introduced the CourseCap struct to manage administrative capabilities securely. This ensures that only authorized users can update course details or withdraw funds. The CourseCap is transferred to the course creator upon course creation.
Added assertions to verify ownership before allowing critical operations such as updating course details and withdrawing funds.
Provided a clear method for user registration, ensuring that each user is linked to the transaction sender and their public key is stored securely.
Enhanced course management functions to handle enrollment, completion, and updates more effectively.
Developed a robust tutoring system with features for creating tutor profiles, offering tutoring services, requesting and completing sessions, and updating service details. This system ensures a seamless experience for both tutors and students.
The Milestone Achiever project aims to provide a decentralized platform on the SUI blockchain for creating, funding, and tracking milestones. Users can define specific goals, contribute funds, and manage progress transparently and securely. The platform ensures only authorized contributions and withdrawals, maintaining milestone integrity and ownership. By leveraging SUI's smart contract capabilities, the project automates the entire lifecycle of milestones, enhancing accountability and collaboration in achieving predefined objectives. This innovation fosters trust and efficiency in collective goal management.
Hey cmlolwa, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
init function initializes the contract by creating an AdminCap object and transferring it to the sender. This ensures that administrative capabilities are correctly set up from the beginning.AdminCap capability. It creates a new milestone with specified parameters and shares the milestone object, ensuring it is publicly accessible.By implementing these changes and enhancements, the contract is now more robust, secure, and functional. It provides better error handling, clear and consistent event logging, and ensures data integrity through rigorous checks and assertions. This makes it a more reliable and efficient solution for managing milestones and contributions.
# Car Rental Services Module This module implements a car rental service on the Sui blockchain using the Sui Move language. It supports creating a rental service, adding cars, renting cars, returning cars, handling expired rentals, and withdrawing funds. ## Table of Contents 1. [Overview](#overview) 2. [Constants](#constants) 3. [Structs](#structs) 4. [Events](#events) 5. [Functions](#functions) 6. [Assertions](#assertions) 7. [Usage](#usage) ## Introduction The `car_rental::Services` module allows users to manage a car rental business on the blockchain, including adding, listing, unlisting, renting, and managing cars. ## Constants - Error codes for various conditions (e.g., `ENotOwner`, `EInvalidWithdrawalAmount`) - `DEPOSIT`: 500 SUI for renting a car ## Structs - **CarRental**: Represents the rental service with properties like balance, deposit, and cars. - **CarOwnerCapability**: Represents the owner's capability. - **Car**: Represents a car being rented. - **ListedCar**: Represents a listed car. ## Events - **CarAdded**: Triggered when a car is added. - **CarRented**: Triggered when a car is rented. - **CarReturned**: Triggered when a car is returned. - **CarExpired**: Triggered when a car rental expires. - **CarUnlisted**: Triggered when a car is unlisted. - **RentalWithdrawal**: Triggered when a withdrawal is made. ## Functions - **create_rental**: Creates a new rental service. - **add_car**: Adds a car to the rental service. - **unlist_car**: Unlists a car from the service. - **rent_car**: Rents a car from the service. - **return_car**: Returns a rented car. - **car_expired**: Handles an expired car rental. - **withdraw_from_rental**: Withdraws funds from the rental service. - **burn**: Burns a car object. ## Assertions Functions to assert various conditions like ownership, valid price, car listing status, valid car index, correct payment, valid withdrawal amount, and car expiry. ## Usage 1. **Create a Rental Service**: ```move create_rental(recipient: address, ctx: &mut TxContext); ``` 2. **Add a Car**: ```move add_car(rental: &mut CarRental, owner_cap: &CarOwnerCapability, title: vector<u8>, description: vector<u8>, price: u64, category: u8, _ctx: &mut TxContext); ``` 3. **Unlist a Car**: ```move unlist_car(rental: &mut CarRental, owner_cap: &CarOwnerCapability, car_index: u64); ``` 4. **Rent a Car**: ```move rent_car(rental: &mut CarRental, car_index: u64, days: u64, recipient: address, payment_coin: coin::Coin<SUI>, clock: &Clock, ctx: &mut TxContext); ``` 5. **Return a Car**: ```move return_car(rental: &mut CarRental, car: Car, clock: &Clock, ctx: &mut TxContext); ``` 6. **Handle an Expired Car**: ```move car_expired(rental: &mut CarRental, car: &Car, clock: &Clock, _: &mut TxContext); ``` 7. **Withdraw Funds**: ```move withdraw_from_rental(rental: &mut CarRental, owner_cap: &CarOwnerCapability, amount: u64, recipient: address, ctx: &mut TxContext); ``` 8. **Burn a Car**: ```move burn(nft: Car, _: &mut TxContext); ``` This module provides a robust framework for managing a car rental service on the Sui blockchain, ensuring secure and efficient operations for car owners and renters.
Hey LewisCarter, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
rating of type u8 (unsigned 8-bit integer) was added to the Car struct. This field will store the rating of the car.extend_rental Function:car: The car being rented, passed by mutable reference.extra_days: The number of extra days to extend the rental.payment_coin: The payment for the extra days, passed as a coin.clock: The clock object to get the current timestamp.ctx: The transaction context.assert_correct_payment.CarRented event with the updated rental period.rate_car Function:car: The car being rated, passed by mutable reference.rating: The rating provided by the user, which must be between 1 and 5.ECarExpired) is now more specific and clear.The Supply Chain module facilitates the management of orders and transactions within a supply chain system. It provides functionalities for creating orders, accepting orders, fulfilling orders, handling disputes, releasing payments, updating orders, and managing escrow balances.
Hey kilonzi, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
My sui submission
Hey Embola, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
deepbook ContractThe Insurance module facilitates the management of insurance policies and claims within a decentralized system. It allows users to create insurance policies, submit claims, validate claims, and process payouts. Additionally, it supports the creation of administrative capabilities for insurers and authorities.
Hey Kendev, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
The Decentralized Yield Aggregator is a smart contract on the Sui blockchain designed to help users maximize their crypto asset yields. By automatically reallocating deposits to the highest-yielding protocols available on Sui, the Yield Aggregator ensures users get the best possible returns on their investments.
Hey NGABO108, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Represents the main aggregator object which holds information about the admin, total deposits, and allocations to different protocols.
Represents an allocation to a specific protocol, including the protocol address, amount allocated, and the yield rate.
The module provides functions for initializing the aggregator, depositing funds, allocating funds, withdrawing funds, and viewing current allocations.
has key and has store to Aggregator and Allocation structs respectively to ensure they conform to the required capabilities for storage and key management.Decent_learner is a decentralized e-learning platform where users can enroll in courses, and educators can offer their expertise. Payments are handled through a decentralized finance (DeFi) mechanism, allowing seamless transactions and financial incentives for both learners and educators. It involves storing of instances of these objects in a persistent store (such as the blockchain state) and provided functions to manipulate them within your module.
Hey Hez_dev, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
portal vs. portal_owner, student vs. student_address).update_course and remove_course functions to manage course details and removal.coin::take and balance::join functions to manage balances safely and consistently.get_course_details function to retrieve course details for enrolled students.add_course, update_course, remove_course, and withdraw.get_certificate function did not check if the course duration was completed before issuing a certificate.get_certificate function to ensure the course duration is completed before issuing a certificate.ENotPortal for invalid portal owner).# Food Delivery Service Platform on Sui Move This module implements a Food Delivery Service Platform using the Sui Move programming language. The platform includes functionalities for managing user profiles, restaurant menus, food orders, payments, and loyalty points. The module also provides error handling, order tracking, and rating systems. ## Introduction This module, `FoodDeliveryService::Platform`, provides a comprehensive set of functionalities for a food delivery service platform. It includes: - Creating and managing user profiles - Creating and managing restaurant menu items - Placing, processing, and tracking food orders - Handling payments and loyalty points - Providing reviews and ratings for restaurants and orders ## Error Constants The following constants are defined to handle various errors in the module: ```move const ERR_INSUFFICIENT_FUNDS: u64 = 1; const ERR_ORDER_ALREADY_PAID: u64 = 2; const ERR_INVALID_RATING: u64 = 3; const ERR_INVALID_ORDER: u64 = 4; const ERR_ORDER_ALREADY_CANCELLED: u64 = 5; const ERR_ORDER_ALREADY_PREPARED: u64 = 6; ``` ## Structs ### UserProfile Represents a user's profile, including personal details, account balance, loyalty points, and order history. ```move public struct UserProfile has key, store { id: UID, user_name: String, account_balance: Balance<SUI>, loyalty_points: u64, order_history: vector<address>, order_ratings: vector<u64>, } ``` ### RestaurantMenuItem Represents a menu item in a restaurant, including item name and price. ```move public struct RestaurantMenuItem has key, store { id: UID, item_name: String, item_price: u64, } ``` ### FoodOrder Represents a food order, including details about the user, menu items, payment status, discount amount, status, delivery person, and rating. ```move public struct FoodOrder has key, store { id: UID, user_id: address, menu_items: vector<UID>, total_cost: u64, payment_status: bool, discount_amount: u64, status: String, delivery_person: address, rating: u64, } ``` ### Restaurant Represents a restaurant, including its name, menu, reviews, and special offers. ```move public struct Restaurant has key, store { id: UID, name: String, menu: vector<address>, reviews: vector<String>, special_offers: vector<String>, } ``` ## Functions ### User Profile Functions #### `create_user_profile` Creates a new user profile. ```move public fun create_user_profile( user_name: String, ctx: &mut TxContext, ): UserProfile ``` #### `get_user_profile` Retrieves details of a user profile. ```move public fun get_user_profile(user: &UserProfile): (String, &Balance<SUI>, u64) ``` #### `add_funds` Adds funds to the user's account balance. ```move public fun add_funds(user: &mut UserProfile, amount: Coin<SUI>) ``` #### `award_loyalty_points` Awards loyalty points to the user. ```move public fun award_loyalty_points(user: &mut UserProfile, points: u64) ``` ### Restaurant Functions #### `create_menu_item` Creates a new menu item for a restaurant. ```move public fun create_menu_item( item_name: String, item_price: u64, ctx: &mut TxContext, ): RestaurantMenuItem ``` #### `list_restaurant` Creates a new restaurant listing. ```move public fun list_restaurant( restaurant_name: String, menu: vector<address>, ctx: &mut TxContext, ): Restaurant ``` #### `update_restaurant_menu` Updates the menu of a restaurant. ```move public fun update_restaurant_menu( restaurant: &mut Restaurant, new_menu: vector<address>, ) ``` #### `leave_restaurant_review` Allows users to leave a review for a restaurant. ```move public fun leave_restaurant_review( restaurant: &mut Restaurant, review: String, ) ``` #### `view_restaurant_reviews` Retrieves the reviews of a restaurant. ```move public fun view_restaurant_reviews( restaurant: &Restaurant, ): vector<String> ``` #### `add_special_offer` Adds special offers and promotions to a restaurant. ```move public fun add_special_offer( restaurant: &mut Restaurant, offer: String, ) ``` ### Order Functions #### `place_food_order` Places a new food order. ```move public fun place_food_order( user: &mut UserProfile, menu_items: vector<UID>, discount_amount: u64, total_cost: u64, ctx: &mut TxContext, ): FoodOrder ``` #### `get_order_details` Retrieves details of a food order. ```move public fun get_order_details(order: &FoodOrder): (&address, &vector<UID>, u64, bool, u64, String, address, u64) ``` #### `order_food` Places a new food order. ```move public fun order_food( order_details: vector<UID>, ctx: &mut TxContext, ): FoodOrder ``` #### `track_order` Tracks the status of a food order. ```move public fun track_order( order: &FoodOrder, ): String ``` #### `assign_delivery` Assigns a delivery person to a food order. ```move public fun assign_delivery( order: &mut FoodOrder, delivery_person: address, ) ``` #### `update_order_status` Updates the status of a food order. ```move public fun update_order_status( order: &mut FoodOrder, status: String, ) ``` #### `complete_order` Marks a food order as completed. ```move public fun complete_order( order: &mut FoodOrder, ) ``` #### `cancel_order` Cancels a food order. ```move public fun cancel_order( user: &mut UserProfile, order: &mut FoodOrder, ctx: &mut TxContext, ) ``` ### Payment Functions #### `process_order_payment_with_balance` Processes payment for an order using the user's account balance. ```move public fun process_order_payment_with_balance( user: &mut UserProfile, order: &mut FoodOrder, restaurant_address: address, ctx: &mut TxContext, ) ``` #### `process_order_payment_with_loyalty_points` Processes payment for an order using loyalty points. ```move public fun process_order_payment_with_loyalty_points( user: &mut UserProfile, order: &mut FoodOrder, restaurant_address: address, ctx: &mut TxContext, ) ``` #### `apply_order_discount` Applies a discount to an order. ```move public fun apply_order_discount(order: &mut FoodOrder, discount_amount: u64) ``` #### `process_partial_order_payment` Processes partial payment for an order. ```move public fun process_partial_order_payment( user: &mut UserProfile, order: &mut FoodOrder, restaurant_address: address, ctx: &mut TxContext, partial_amount: u64, ) ``` #### `make_payment` Processes full payment for an order. ```move public fun make_payment( order: &mut FoodOrder, amount: u64, user: &mut UserProfile, restaurant_address: address, ctx: &mut TxContext, ) ``` #### `issue_refund` Issues a refund for an order. ```move public fun issue_refund( order: &mut FoodOrder, ) ``` ### Review and Rating Functions #### `rate_order` Rates a food order. ```move public fun rate_order( order: &mut FoodOrder, rating: u64, user: &mut UserProfile, ) ``` #### `view_order_history` Views the order history of a user. ```move public fun view_order_history( user: &UserProfile, ): vector<address> ``` ## Usage To use this module, deploy it on the Sui blockchain and interact with the provided functions to manage user profiles, restaurant menus, food orders, payments, and reviews. The module provides a comprehensive set of tools for building a food delivery service platform with rich functionality and robust error handling. ## Conclusion This Sui Move module offers a complete solution for a food delivery service platform, with features for user management, order processing, payment handling, and more. It leverages the capabilities of the Sui blockchain to provide a secure and efficient platform for food delivery services.
Hey Savali85, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
place_order function needs to handle balance updates more robustly.ERR_ITEM_NOT_FOUND for handling cases where a menu item is not found.AdminCap and sharing an Orders object.This SUI smart contract implements a power bill management system on the Sui blockchain. It allows customers to register, request power units, pay bills, and view their usage and billing information. The contract also facilitates late fee application for overdue bills.
Hey derrick25, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
contract_duration and late_fee_percentage to manage contract duration and late fees.notifications to manage customer notifications.breakdown to provide a detailed breakdown of charges.The Library Marketplace is a Sui Move project offering a secure and decentralized book rental system. It empowers users to create libraries, manage book listings, rent and return books, all while ensuring transparency and controlled access through librarian capabilities. This project leverages the Sui blockchain for secure transactions and data management, providing a robust platform for book rentals.
Hey kevin.omiya, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
library_marketplace ContractThe SUI Hospital Management module facilitates the comprehensive management of hospital operations within a decentralized system. It offers functionalities for managing hospital information, staff, patients, appointments, inventory, financial transactions, and more. This module ensures efficient and secure management of hospital resources while maintaining transparency and accountability.
Hey Samkim, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Adding more detailed error messages and additional error codes for better debugging and clarity.
Refactoring similar actions into helper functions.
Adding checks for unauthorized access and ensuring atomicity of transactions.
Enhancing features, such as handling staff leave management, detailed inventory management, and managing hospital expenses.
Hospitals can assign rooms to patients and manage room availability.
is_authorized to reduce code redundancy and improve readability.add_patient_to_hospital to reduce code redundancy and improve readability.add_staff_to_hospital to reduce code redundancy and improve readability.Room to manage hospital rooms.add_room to add new rooms to the hospital.update_room_availability to update the availability status of rooms.assign_room_to_patient to assign rooms to patients.Added more detailed error messages and additional error codes.
Added checks for unauthorized access and ensured the atomicity of transactions.
The Carbon Credit Marketplace module enables the trading of carbon credits on a decentralized platform, allowing users to buy, sell, and dispute carbon credit transactions. It provides functionalities for creating, managing, and resolving disputes related to carbon credit transactions, as well as handling payments and refunds.
Hey Bendev, nice submission.
This pull request includes several improvements to the carbon_credit_marketplace contract. The changes address bug fixes, enhancements, and the introduction of new features to ensure the contract is robust, efficient, and user-friendly. The following key changes have been made:
Bug Fixes: Ensured proper handling of deadlines and expiry checks for carbon credits. Fixed issues with fund transfer during disputes and sale cancellations. Added assertions to prevent operations on expired credits.
Enhancements: Introduced calculate_credit_expiry and check_credit_expiry functions to manage and verify the validity period of carbon credits. Modified buy_credit to accept an amount and add it to the escrow balance. Improved error handling and added a new error EExpiredCredit for expired credit operations.
Feature Additions: Added a function add_funds_to_credit for adding more funds to the escrow. Refined the release_payment function to ensure escrow balance is correctly handled and transaction records are created. Included logic in resolve_dispute to transfer funds based on dispute resolution.
Code Clean-Up: Removed redundant accessor functions for consistency. Ensured all functions have clear and concise logic flow. The changes improve the overall stability and functionality of the carbon credit marketplace, ensuring better handling of transactions, disputes, and credit validity.
This contract provides a basic framework for a lottery system where participants can enter by sending ether, and a winner is randomly chosen from the pool of participants. manager: Stores the address of the manager who deploys the contract. players: An array to store the addresses of players who enter the lottery.
Hey foryouflowerai, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This PR addresses several bugs and logical issues in the lottery contract and introduces necessary improvements to ensure the code functions as intended. The following changes have been made:
execute function to ensure proper winner selection and prize distribution.create_lottery function properly shares the new lottery object.deposit, enter_lottery, and withdraw.This is a Decentralized Payroll Management smart contract system designed to manage employee attendance records, payroll details, and analysis within an organization. It provides a set of functions for adding, retrieving, updating, and deleting employees, attendance records, and payroll details and actions.
Hey PhellyDev, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
d-MALL is a decentralized store management system built on the Sui blockchain. It facilitates secure and transparent transactions between customers and stores using points as currency. The system employs an escrow mechanism to hold points until a transaction is completed or resolved, ensuring protection for both parties. Customers can buy items, raise disputes if needed, rate stores, and leave reviews, while stores can accept, fulfill, and manage transactions efficiently. d-MALL aims to create a trustworthy and efficient marketplace by leveraging blockchain technology to handle store management and transactions seamlessly.
Hey Zei, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Multiple functions perform similar actions, such as resetting the transaction state. This can be refactored into a helper function.
Error codes are used, but error messages would provide better clarity for debugging.
Adding features like handling refunds for fulfilled transactions, partial payments, and better dispute resolution mechanisms.
Adding checks for unauthorized access and ensuring atomicity of transactions.
The new feature allows customers to make partial payments, which can be particularly useful for layaway plans or installment purchases.
reset_transaction to reset transaction state.
partial_payments to handle partial payments.
add_partial_payment to manage partial payment transactions.complete_partial_payment to manage partial payment transactions.Additional error codes and checks for unauthorized access.
Consolidated similar actions into the helper function to reduce code redundancy and improve readability.
The Decentralized Learning System module facilitates the booking, scheduling, management, and dispute resolution of learning sessions between students and teachers in a decentralized manner. This module ensures transparency, fairness, and security in the learning process by leveraging blockchain technology.
Hey mbilo, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Decentralized Intellectual Property (IP) Rights Management System: A decentralized platform for managing intellectual property rights, including copyrights, patents, and trademarks. This system allows creators to register their IP on the blockchain, providing a verifiable and immutable record. It also facilitates licensing agreements, royalty payments, and dispute resolution in a transparent and automated manner. Features: - IP Registration: Creators can register their intellectual property on the blockchain. - License Agreements: Facilitates the creation and management of licensing agreements. - Royalty Payments: Automates royalty payments based on usage and agreements. - Dispute Resolution: Provides mechanisms for resolving disputes over IP rights. - Verification: Ensures authenticity and ownership of registered IP. - Immutable Records: Maintains a transparent and tamper-proof ledger of all IP-related transactions.
Hey LornaWokabi, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
related_licenses field to track licenses associated with the IP.expiration_date field to manage the validity period of licenses.resolution field to store the resolution details of disputes.IP struct now tracks related licenses, providing better management and oversight of IP licenses.resolution field, capturing the outcome of the dispute.related_licenses field to an empty vector.resolution field to an empty vector.The CokeCash Rewards promotion is a loyalty program designed for companies to issue and manage vouchers for their customers. This implementation is based on the SUI blockchain, leveraging smart contracts to handle the creation, activation, deactivation, and redemption of vouchers. Companies can also manage their balance, add customers, and handle withdrawals. The smart contract code is written in Move, a language designed for safe and flexible execution of smart contracts on the SUI blockchain.
Hey telesco, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
create_company, add_funds, and withdraw_funds functions as entry functions for clarity.The SUI Farming SACCO project leverages the innovative SUI blockchain platform to create a robust, transparent, and efficient savings and credit cooperative tailored for the agricultural sector. This decentralized finance (DeFi) solution is designed to empower farmers by providing them with accessible financial services, enhancing transparency, and fostering community growth within the agricultural industry.
Hey Amina25, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
contract_owner field to the SaccoContract struct to manage admin operations securely.LateFeeApplied event).update_sacco_terms function to allow the sacco owner to update unit prices and late fees.This Move code module, `rtb_platform::rtb_platform`, facilitates real-time bidding (RTB) functionalities within the Sui blockchain ecosystem. It enables users to create advertisements, place bids on advertisement slots, and manage user accounts. The module ensures secure and efficient handling of RTB transactions while maintaining integrity and reliability.
Hey EdwinKG, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
FOX Swap is a platform on the Sui blockchain. FOX Swap allows users to engage in transactions and add liquidity, among other activities. A distinctive feature of this project is that users can acquire Liquidity Provider Tokens (LPs) by adding liquidity. Upon acquiring LPs, users are entitled to claim one free lottery ticket each epoch. FOX Swap features multiple lottery pools, with each offering a unique drawing method. Users can choose to receive lottery tickets from any of these pools. Should a user win in a lottery draw, they are rewarded with Fox tokens as their prize.
Hey vv1133, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
get_pool_b_participants that allows users to view all participants (addresses) in Lottery Pool B, enhancing transparency and allowing users to see who else is participating in the lottery.create_lottery_pool_a and create_lottery_pool_b are used to create lottery pools with provided coins and public keys, ensuring the initial coin amount is greater than zero.add_pool_a_bonus and add_pool_b_bonus are used to add additional coins to the respective lottery pools.draw_pool_a_instant_lottery handles the logic for drawing an instant lottery in Pool A, including verifying the lottery number and distributing the bonus based on the lucky number generated.place_bet_to_pool_b allows users to place bets in Lottery Pool B using a coupon, which is validated for type and epoch.pool_b_close_betting freezes the pool to prevent further betting and records the current epoch.pool_b_draw_and_distribute handles the drawing of the lottery and distributing the prize to the winner based on the generated lucky number.created an article smart contract
Hey pgichuki, lovely submission I've reviewed your articles module and made several improvements to enhance its functionality, security, and readability. The updated code includes:
Table to manage articles effectively.ArticlesTableArticlesTable struct that holds all articles in a centralized Table<u64, Article>. This approach ensures efficient storage and retrieval of articles by their unique IDs.ArticlesTable to automatically assign unique IDs to new articles, ensuring uniqueness and ease of reference.init function to initialize the ArticlesTable. This function should be called once during deployment to set up the storage structure.ArticleCreated, DonationReceived, FundsWithdrawn, ArticleDeleted, ArticleLiked, ArticleDisliked, CommentAdded) to enable transparent tracking and auditing of operations.assert! statements throughout the code to validate inputs and state conditions, preventing invalid operations and ensuring data integrity.Clock module, enabling accurate tracking of when actions occurred.# Dacade Simple Bank by YOY ## Description A simple banking system with features including: - user registration - admin approval - user deposit - user withdrawal - uer transfer. ## Functions ### 1 register ```rust public entry fun register ( simpleBank: &mut SimpleBank, ctx: &mut TxContext) ``` ### 2 approve ```rust public entry fun approve ( _: &AdminCap, simpleBank: &mut SimpleBank, users: vector<address>) ``` ### 3 deposit ```rust public entry fun deposit ( simpleBank: &mut SimpleBank, amount: &mut Coin<SUI>, ctx: &mut TxContext) ``` ### 4 withdraw ```rust public entry fun withdraw ( simpleBank: &mut SimpleBank, amount: u64, ctx: &mut TxContext) ``` ### 5 transfer ```rust public entry fun transfer ( simpleBank: &mut SimpleBank, amount: u64, recipient: address, ctx: &mut TxContext) ``` ## UNITTEST ```bash $ sui --version sui 1.25.0-c1dfdcdb3d8a $ sui move test Running Move unit tests [ PASS ] 0x0::dacade_simple_bank_tests::test_simple_bank Test result: OK. Total tests: 1; passed: 1; failed: 0 ```
Hey yoyruan, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
simple_bank ContractDecentralized Insurance Platform on Sui Blockchain This smart contract module implements a decentralized insurance platform on the Sui blockchain using the Move programming language. It allows users to create, buy, and manage insurance policies for various assets. The platform also supports the creation and verification of claims, and manages community liquidity pools to back insurance policies.
Hey aaroncharo, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
policy_id in Claim struct to UID to ensure unique identification.ClaimCreated, ClaimVerified, ClaimPaid, PremiumPaid, PoolStaked, PoolWithdrawn).pay_claim function to handle coin transfers correctly and emit relevant events.tx_context::sender(ctx) across functions.sui code project
Hey Legacy, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This PR addresses several bugs and logical issues in the car booking contract and introduces necessary improvements to ensure the code functions as intended. The following changes have been made:
list, delist, and purchase functions to ensure proper functionality.withdraw and purchase.The Secure_wheels module on the Sui blockchain offers a comprehensive system for managing secure car loans. It establishes distinct roles for borrowers and lenders through dedicated structs: Borrower and Lender. These structs encapsulate relevant information like addresses, credit scores, and loan history.
Hey Thomas, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Bug Fixes: Fixed issues with overdue payment calculation. Ensured proper handling of loan payments and term completion. Added assertions to prevent operations on loans that are already paid off or not due.
Enhancements: Introduced calculate_monthly_payment function to calculate the monthly payment based on loan amount, interest rate, and term length. Improved error handling and added a new error Error_LoanNotDue for overdue
loan operations. Feature Additions: Added functions add_coin_to_escrow and add_loan_amount_to_loan for adding funds to the escrow and loan amount, respectively. Included logic in claim_overdue_payment to transfer overdue payments based on the due date. Enhanced make_payment to check the remaining balance and mark the loan as paid off when appropriate.
Code Clean-Up: Removed redundant accessor functions for consistency. Ensured all functions have clear and concise logic flow.
# JobMarket Module ## Overview The jobMarket module is designed to facilitate the creation and management of an online job marketplace. This module provides a robust framework for administrators to create and manage job listings, handle job applications and completions by freelancers, and manage financial transactions within the marketplace. Key functionalities include listing jobs, accepting job applications, marking jobs as completed, and managing the marketplace balance, ensuring a smooth and efficient operation for both administrators and freelancers. This module aims to streamline the job marketplace process, making it easier for administrators to manage job listings and for freelancers to find and complete jobs. It provides a comprehensive set of tools and functionalities to create a vibrant and efficient job marketplace ecosystem. ## Key Features - Create Marketplace: Allows the creation of a new job marketplace. - Add Job: Enables administrators to add jobs to the marketplace. - Unlist Job: Allows administrators to unlist a job from the marketplace. - Accept Job: Facilitates the acceptance of jobs by freelancers. - **Complete Job: Allows freelancers to mark jobs as completed. - Withdraw from Marketplace: Enables administrators to withdraw funds from the marketplace balance. - Query Functions: Provides details about the marketplace, jobs, and accepted jobs. ## Structs ### Marketplace Represents the job marketplace. - `id: UID` - `admin_cap: ID` - `balance: Balance<SUI>` - `jobs: vector<Job>` - `job_count: u64` ### AdminCapability Represents administrative capabilities within the marketplace. - `id: UID` - `marketplace: ID` ### Job Represents a job in the marketplace. - `id: u64` - `title: String` - `description: String` - `price: u64` - `url: Url` - `listed: bool` - `category: u8` - `total_supply: u64` - `available: u64` ### AcceptedJob Represents a job that has been accepted by a freelancer. - `id: UID` - `marketplace_id: ID` - `job_id: u64` ### Events - `MarketplaceCreated` - `JobAdded` - `JobAccepted` - `JobCompleted` - `JobUnlisted` - `MarketplaceWithdrawal` ## Functions ### Public Functions create_marketplace - Creates a new marketplace. - Parameters: `recipient: address`, `ctx: &mut TxContext` add_job - Adds a job to the marketplace. - Parameters: `marketplace: &mut Marketplace`, `admin_cap: &AdminCapability`, `title: vector<u8>`, `description: vector<u8>`, `url: vector<u8>`, `price: u64`, `supply: u64`, `category: u8` unlist_job - Unlists a job from the marketplace. - Parameters: `marketplace: &mut Marketplace`, `admin_cap: &AdminCapability`, `job_id: u64` accept_job - Accepts a job in the marketplace. - Parameters: `marketplace: &mut Marketplace`, `admin_cap: &AdminCapability`, `job_id: u64`, `quantity: u64`, `freelancer: address`, `payment_coin: &mut Coin<SUI>`, `ctx: &mut TxContext` complete_job - Completes a job in the marketplace. - Parameters: `marketplace: &mut Marketplace`, `accepted_job: &AcceptedJob`, `freelancer: address`, `ctx: &mut TxContext` withdraw_from_marketplace - Withdraws a specific amount from the marketplace balance. - Parameters: `marketplace: &mut Marketplace`, `admin_cap: &AdminCapability`, `amount: u64`, `recipient: address`, `ctx: &mut TxContext` withdraw_all_from_marketplace - Withdraws the entire balance from the marketplace. - Parameters: `marketplace: &mut Marketplace`, `admin_cap: &AdminCapability`, `recipient: address`, `ctx: &mut TxContext` get_marketplace_details - Retrieves the details of the marketplace. - Parameters: `marketplace: &Marketplace` - Returns: `(&UID, ID, &Balance<SUI>, &vector<Job>, u64)` get_job_details - Retrieves the details of a specific job. - Parameters: `marketplace: &Marketplace`, `job_id: u64` - Returns: `(u64, String, String, u64, Url, bool, u8, u64, u64)` get_accepted_job_details - Retrieves the details of an accepted job. - Parameters: `accepted_job: &AcceptedJob` - Returns: `(&UID, ID, u64)` update_accepted_job_freelancer - Updates the freelancer of an accepted job. - Parameters: `accepted_job: &mut JobAccepted`, `freelancer: address` ## Error Codes - `Error_Not_Admin: u64 = 1` - `Error_Invalid_WithdrawalAmount: u64 = 2` - `Error_Invalid_Quantity: u64 = 3` - `Error_Insufficient_Payment: u64 = 4` - `Error_Invalid_JobId: u64 = 5` - `Error_Invalid_Price: u64 = 6` - `Error_Invalid_Supply: u64 = 7` - `Error_JobIsNotListed: u64 = 8` - `Error_Not_Freelancer: u64 = 9` ## Usage ### Creating a Marketplace jobmarket::create_marketplace(recipient_address, &mut ctx); ### Adding a Job jobmarket::add_job(&mut marketplace, &admin_cap, title, description, url, price, supply, category); ### Accepting a Job jobmarket::accept_job(&mut marketplace, &admin_cap, job_id, quantity, freelancer_address, &mut payment_coin, &mut ctx); ### Completing a Job jobmarket::complete_job(&mut marketplace, &accepted_job, freelancer_address, &mut ctx); ### Withdrawing from the Marketplace jobmarket::withdraw_from_marketplace(&mut marketplace, &admin_cap, amount, recipient_address, &mut ctx); ###Getting Marketplace Details let details = jobmarket::get_marketplace_details(&marketplace); ### Getting Job Details let job_details = jobmarket::get_job_details(&marketplace, job_id); ## Conclusion The jobmarket module provides a comprehensive and efficient way to manage an online job marketplace. By leveraging this module, administrators can easily create and manage job listings, accept job applications, and handle job completions by freelancers. Additionally, the module provides robust financial management tools to handle marketplace balances. The provided functions and error handling ensure a smooth and secure operation, making it an essential tool for any job marketplace platform.
Hey BrianKareithi, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
unlist function is almost identical to the unlist_job function. This redundancy can be removed to make the code cleaner.Option, but in some places, it is directly accessed without checking if it is None.admin_cap leading to unauthorized actions.unlist function and integrated its functionality into unlist_job.Option values before accessing them.admin_cap validation before any administrative actions.add_job, accept_job, complete_job, and provision to ensure the robustness of the contract.Error_Invalid_Url to handle invalid URL entries.unlist function and integrated its functionality into unlist_job to eliminate code duplication.Option values before accessing them to prevent runtime errors.add_job function to ensure the URLs are correctly formatted.admin_cap validation in administrative functions to prevent unauthorized actions.JobCompleted) and deposit actions (MarketplaceWithdrawal) to track these actions on the blockchain.add_feedback and get_feedback functions).JobFeedbackAdded event to log feedback submissions.This repository contains a smart contract package for creating and auctioning Non-Fungible Tokens (NFTs) on the Sui blockchain. The package includes modules for NFT creation, auction management, and comprehensive testing.
Hey PG_OPENDA, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Defined clear and descriptive error constants at the beginning of the module. This helps in maintaining a consistent error-handling approach across the contract and makes debugging easier. These constants cover various scenarios like bid amount validation, auction end time validation, etc.
Option<NFT> to handle cases where the NFT might be absent, such as after it is claimed or returned.auction_ended to indicate whether the auction has concluded, providing clarity and avoiding unnecessary operations post-auction.Defined multiple event structs (AuctionCreated, BidPlaced, AuctionEnded, NFTClaimed, AuctionEndedNoBids) to emit meaningful events that enhance transparency and traceability of the auction process.
min_bid and duration are greater than zero to avoid invalid auction setups.AuctionCreated event to signal the creation of a new auction.update_balance_with_coin.BidPlaced event to notify about the new bid.This helper function updates the auction’s coin balance, ensuring accurate financial tracking and making the contract modular and easier to maintain.
AuctionEndedNoBids event.AuctionEnded event.NFTClaimed event.Ensured that all state-changing actions emit corresponding events to provide transparency and traceability. This includes events for auction creation, bids placed, auction endings, and NFT claims. This transparency is crucial for user trust and auditing purposes.
Added update_balance_with_coin to modularize balance updates, enhancing code readability and maintainability.
Provided getter functions (current_bid, highest_bidder, auction_ended) to facilitate testing and ensure easy access to key auction parameters.
Automatically returns the NFT to the seller if no bids are placed, ensuring that assets are not locked indefinitely in the contract.
Ensures that previous bidders are refunded their bids if they are outbid, maintaining fairness and user trust.
Enhanced event logging to cover all critical actions within the contract, aiding in transparency and easier debugging.
Introduced a helper function to manage balance updates, improving code maintainability and clarity.
The Data Marketplace module enables the exchange of data between providers and consumers in a decentralized environment. It facilitates the creation, bidding, submission, and resolution of data listings, as well as handling payments and disputes.
Hey Senior, lovely idea you have built here really lovely work. I went through your dapp and noticed a few issues and optimizations.
Below are some of the changes I made:
Bug Fixes
Features Added
you can view my changes in the PR below
Suiroad module is a smart contract designed to facilitate the swapping of unique digital objects on the Sui blockchain. The contract allows users to create objects, request swaps, and execute swaps between users based on specific conditions. This system ensures a secure and efficient way for users to trade digital objects with minimal fees.
Hey Harshk01, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
unlock function does not properly use the dof::remove method for unlocking.create function to allow different types of locks.HTLC implementation compatible with <https://github.com/decred/atomicswap> hence with many more projects which conform to it. Basically it enables [Decred Atomic Swaps](https://docs.decred.org/advanced/atomic-swap/) for any `Coin` on Sui (with addresses not on deny-list) if somebody would want to implement the whole protocol.
Hey skaunov, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This is the core structure representing the HTLC. It includes fields like the creation timestamp, deadline, hashed secret, refund and target addresses, and the coin being locked.
The module defines several events to signal state changes in the HTLC:
Constants to represent various error conditions:
Enhanced comments and documentation for structs, functions, and events.
Added functions for creating locks with default durations.
Clearer and more descriptive error handling.
Detailed event structures to capture important actions and state changes.
The Music Marketplace module facilitates decentralized management of music tracks, collaborations, and events within a blockchain ecosystem. It provides functionalities for musicians to publish tracks, sell music, handle disputes, collaborate with other artists, manage events, and interact with fans securely and transparently.
Hey benaa, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
NFTTrack struct to represent tracks as NFTs.Royalty struct to manage royalties for tracks.Event struct to include additional details.Tracks can now be minted as NFTs, allowing unique ownership and easy transferability.
Implemented a system to manage royalties for musicians when their tracks are resold.
Enhanced event management with support for online and offline events, and ticketing with seat allocation.
Added support for collaboration agreements and revenue sharing.
NFTTrack and Royalty structs for managing NFT-based tracks and royalties.mint_nft_track to mint a track as an NFT.transfer_nft_track to transfer ownership of an NFT track.organize_collaboration_event to organize events with collaborations.Added support for online events and venue details.
Improved collaboration management with support for revenue sharing.
Added more detailed error messages and additional error codes.
Added checks for unauthorized access and ensured the atomicity of transactions.
The bus booking system on the Sui blockchain allows users to book tickets and view schedules through a decentralized platform. Smart contracts manage bus schedules, seat availability, and payment processing, ensuring secure and transparent transactions. Bookings and payments are recorded on the blockchain for immutable records. Users receive instant confirmation and can manage their bookings via a user-friendly interface.
Hey Nana12, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
u64 for error codes, which is not very descriptive. This could be improved by using an enum-like structure or at least documenting the purpose of each error code more thoroughly.User struct is currently tied to a Bus object through the for field. This relationship might be limiting if a user wants to interact with multiple buses or if the user’s role evolves.User struct to be more flexible, allowing users to interact with multiple buses or other services.BusCreated vs. DriverProfileCreated). Ensure consistent capitalization and naming patterns for readability.#[allow(unused_use, unused_variable, unused_const, lint(self_transfer), unused_field)]). This may lead to bloated and less maintainable code.User struct to support multi-role management. This could be done by linking users to a collection of services they’re registered to, rather than a single Bus.DriverProfile and Bus structs respectively. This will allow passengers to review the quality of service.book_seat function to handle group bookings, where multiple seats can be booked in a single transaction.BusRatingUpdated, DriverRatingUpdated, and SeatBookingCanceled.BusCompleted event to include details about the journey, such as distance traveled, driver performance, and overall trip satisfaction.price field in the Bus struct as seats are booked.cancel_bus function that allows operators to cancel a bus if it doesn’t meet minimum seat occupancy. This should trigger refunds and notify all booked passengers.SuiFlix is a decentralized movie viewing platform built on the SUI blockchain using the Move programming language. It enables users to register, deposit SUI tokens, and pay to watch movies securely and transparently. The platform supports adding movies, handling user balances, recording viewing transactions, and managing withdrawals for platform owners. SuiFlix aims to create a seamless and trustless movie streaming experience leveraging blockchain technology.
Hey thunderbolt, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
Adding more detailed error messages and additional error codes for better debugging and clarity.
Refactoring similar actions into helper functions.
Adding checks for unauthorized access and ensuring atomicity of transactions.
Enhancing features, such as allowing users to update their arrears, adding detailed movie information, and implementing subscription functionality.
Users can subscribe to the platform for a period, paying a fixed amount to view any number of movies during the subscription.
add_user_to_platform to reduce code redundancy and improve readability.is_user_subscribed to reduce code redundancy and improve readability.description to provide more detailed information about movies.genre to provide more detailed information about movies.Subscription to manage user subscriptions.subscribe to allow users to subscribe to the platform.view_movie_with_subscription to allow users with active subscriptions to view movies without additional charges.Added more detailed error messages and additional error codes.
Added checks for unauthorized access and ensured the atomicity of transactions.
A simple Sui Move version AMM Dex based on the logic of UniswapV2. ## Introduction + This module implements the factory and pool logic of UniswapV2 where anyone can freely create pair of two coin types, add or remove liquidity, and swap. + After a `Pool` of two coin types is created, a `PoolItem` will be added to `Factory`'s `table` field, which guarantees there is at most one pool for a pair. + The two coin types of a pair are first sorted according to their `type_name`, and then assigned to `PoolItem`'s `a` and `b` fields respectively. + Users can add liquidity to the pool according to the current ratio of coin balances. The remaining coin will be returned to the users as well as the LP coin. + Each pool are set with a `0.3%` swap fee by default which is actually distributed to all LP holders. + Core functions like `create_pool`, `add_liquidity`, `remove_liquidity`, `swap_a_for_b`, `swap_b_for_a` are all provided with three kind of interfaces (call with `Balance`, call with `Coin` and return `Coin`, call with `Coin` and transfer the output `Coin` to the sender in that entry function) considering both composability and convenience. ## Structs 1. LP witness + LP witness `LP<A, B>` is used as unique identifier of `Coin<LP<A, B>>` type. 2. Pool + A `Pool<A, B>` is a global shared object that is created by the one who calls the `create_pool` function. + It records its `Balance<A>`, `Balance<B>`, `Supply<LP<A, B>>`, and default fee. 3. Factory + A `Factory` is a global shared object that is created only once during the package publishment. + It has a `table` field recording each `PoolItem`. 4. PoolItem + A `PoolItem` is used to record the pool info in the `Factory`. + It guarantees each pair is unique and the coin types it records are sorted. ## Core functions 1. create_pool<A, B> + Create a new `Pool<A, B>` with initial liquidity. + Input with `Factory`, `Balance<A>` and `Balance<B>`, return `Balance<LP<A, B>>`. 2. create_pool_with_coins<A, B> + Input with `Factory`, `Coin<A>` and `Coin<B>`, return `Coin<LP<A, B>>`. 3. create_pool_with_coins_and_transfer_lp_to_sender<A, B> + Input with `Factory`, `Coin<A>` and `Coin<B>`, and transfer `Coin<LP<A, B>>` to sender in the function. 4. add_liquidity<A, B> + Add liquidity to `Pool<A, B>` to get LP coin. + Input with `Pool<A, B>`, `Balance<A>`, `Balance<B>` and minimal LP output amount, return remaining `Balance<A>`, `Balance<B>`, and `Balance<LP<A, B>>`. 5. add_liquidity_with_coins<A, B> + Input with `Pool<A, B>`, `Coin<A>`, `Coin<B>` and minimal LP output amount, return remaining `Coin<A>`, `Coin<B>`, and `Coin<LP<A, B>>`. 6. add_liquidity_with_coins_and_transfer_to_sender<A, B> + Input with `Pool<A, B>`, `Coin<A>`, `Coin<B>` and minimal LP output amount, and transfer remaining `Coin<A>`, `Coin<B>`, and `Coin<LP<A, B>>` to sender in the function. 7. remove_liquidity<A, B> + Remove liquidity from `Pool<A, B>` and burn LP coin. + Input with `Pool<A, B>`, `Balance<LP<A, B>>` and minimal A output amount, minimal B output amount, return `Balance<A>` and `Balance<B>`. 8. remove_liquidity_with_coins<A, B> + Input with `Pool<A, B>`, `Coin<LP<A, B>>` and minimal A output amount, minimal B output amount, return `Coin<A>` and `Coin<B>`. 9. remove_liquidity_with_coins_and_transfer_to_sender<A, B> + Input with `Pool<A, B>`, `Coin<LP<A, B>>` and minimal A output amount, minimal B output amount, and transfer `Coin<A>` and `Coin<B>` to sender in the function. 10. swap_a_for_b<A, B> + Swap exact `Balance<A>` for `Balance<B>`. + Input with `Pool<A, B>`, `Balance<A>` and minimal B output amount, return `Balance<B>`. 11. swap_a_for_b_with_coin<A, B> + Input with `Pool<A, B>`, `Coin<A>` and minimal B output amount, return `Coin<B>`. 12. swap_a_for_b_with_coin_and_transfer_to_sender<A, B> + Input with `Pool<A, B>`, `Coin<A>` and minimal B output amount, and transfer `Coin<B>` to sender in the function. 13. swap_b_for_a<A, B> + Swap exact `Balance<B>` for `Balance<A>`. + Input with `Pool<A, B>`, `Balance<B>` and minimal A output amount, return `Balance<A>`. 14. swap_b_for_a_with_coin<A, B> + Input with `Pool<A, B>`, `Coin<B>` and minimal A output amount, return `Coin<A>`. 15. swap_b_for_a_with_coin_and_transfer_to_sender<A, B> + Input with `Pool<A, B>`, `Coin<B>` and minimal A output amount, and transfer `Coin<A>` to sender in the function. ## Unit test 
Hey KyrinCode, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This pull request includes several bug fixes and improvements to the amm::uniswapV2 module:
use statements for UID and TxContext to ensure the module works correctly.cmp_type_names function to properly compare type names.## 1 Entity Definition - SELF_SERVICE_LOTTERY - LotterySystem - Lottery - LotteryStub - NewLotteryEvent - WinEvent - EndEvent ## 2 Entity Relationship && Economic Design - use One-Time-Witness(`SELF_SERVICE_LOTTERY`) to create `Publisher`, who owned this object will charge 1% commission when the lottery draws. - `LotterySystem` is a shared object, which stored detail infomation of `Lottery`. - Everyone can create `Lottery` and customize selling prices, bonuses and other information. - Everyone can purchase `Lottery` and get the corresponding `LotteryStub`. - The lottery will be drawn automatically when the tickets are sold out, and anyone can have it drawn after the purchase period has expired. - Winning users can hold the `LotteryStub` to redeem their prizes. At the same time, the income from the lottery will be transferred to the initiator's account. Of course, the publisher of the system will also receive a part of the commission. - When a lottery ticket is not sold, or the redemption period has passed after the draw, you can choose to redeem the bonus, but the income is also real. - `NewLotteryEvent`, `WinEvent`, `EndEvent` will trigger event announcements at key nodes. ## 3 API Definition - **withdraw:** Publisher withdraws earnings. - **create_lottery && create_lottery_with_epoch:** Create a new set of lottery tickets and customize the selling price and bonus. The difference between the two is whether the sale period is default. - **fedeem_bonus:** Redeem the bonus, but the income is also real. - **announcement:** The winning information will be announced after the draw. - **buy_lottery:** When you pay a certain amount to purchase a lottery ticket, you will receive a corresponding voucher containing the prize redemption code. - **redeem_lottery:** Prizes can be redeemed with vouchers after the draw.
Hey nullccxsy, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
A school fees payment smart contract is a blockchain-based solution designed to facilitate the seamless and transparent payment of school fees. Built using smart contract technology, typically on platforms like Ethereum, it enables students or their guardians to initiate payments directly to the school's account without the need for intermediaries. This smart contract system can incorporate features such as fee calculation based on predefined parameters, payment scheduling, and automated reminders for overdue payments.
Hey Cornel.007, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This PR addresses several bugs and logical issues in the fee payer contract and introduces necessary improvements to ensure the code functions as intended. The following changes have been made:
invoice_student, pay_fee, and withdraw functions to ensure proper functionality.deposit, pay_fee, and withdraw.# ArtCraft Marketplace Module The ArtCraft Marketplace Module is designed to facilitate a simple yet robust marketplace for art and craft items. This module provides all the necessary functionalities to manage a thriving art marketplace, including the ability to create, update, and delete products, users, and transactions. Whether you're an artisan looking to sell your creations or a buyer seeking unique craft items, this module offers a flexible and efficient platform to meet your needs. Below is a comprehensive description of the key structures and functions included in the module. - *Product Management*: Create, update, or delete art and craft products with detailed descriptions, images, pricing, and inventory information. - *User Management*: Manage user accounts, including sellers and buyers, with secure authentication and personalized profiles. - *Transaction Management*: Record and manage transactions, enabling a seamless buying and selling process. Keep track of sales, purchases, and order history. Experience a streamlined and user-friendly marketplace for art and craft items with the ArtCraft Marketplace Module. Engage in a vibrant community of artists and buyers, all while leveraging the module's robust management capabilities.
Hey shauvik_Verma_889, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
This pull request includes several bug fixes and improvements to the ArtCraft::game module:
new_policy function to properly retrieve and use the publisher.# Secure Crowdfunding on Sui Blockchain with Real-Time Price Feeds This project demonstrates a secure and transparent crowdfunding platform built on the Sui blockchain. It leverages Supra's reliable price feed Oracle to ensure accurate and tamper-proof price data throughout the crowdfunding lifecycle. ## Key Functionalities: - **Smart Contract Management:** The platform utilizes smart contracts on Sui to automate and manage the crowdfunding process, eliminating intermediaries and fostering trust. - **Supra Oracle Integration:** Integration with Supra's price feed Oracle guarantees access to reliable and secure price data for setting campaign goals, calculating contributions, and triggering payouts. - **Transparency and Security:** By employing smart contracts and a secure price feed solution, the platform ensures a transparent and secure environment for both campaign creators and contributors. All transactions are immutable and verifiable on the blockchain. ## Benefits Enhanced Trust and Security: Supra's reliable price feed Oracle minimizes the risk of price manipulation and fosters trust within the crowdfunding ecosystem. Increased Efficiency: Smart contracts automate key processes, streamlining the crowdfunding experience for all participants. Greater Accessibility: The project paves the way for a more accessible crowdfunding landscape, enabling broader participation.
Hey Livy, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
# Sui Nova Sui Nova is a liquidity management and payment protocol specifically designed for the decentralized finance (DeFi) sector, aiming to simplify, automate, and bring transparency to cryptocurrency payment processes. As an innovative solution for blockchain users, Sui Nova offers a trustless way to facilitate continuous payments, addressing several challenges present in traditional payment systems. # Why Sui Nova  With the rapid development of blockchain technology and the flourishing DeFi ecosystem, more users and businesses are turning to cryptocurrencies for payments. However, the current payment methods are typically based on one-time transactions, which are not ideal for scenarios requiring regular payments, such as salary disbursements, subscription services, and loan repayments. Additionally, traditional cryptocurrency payment processes often suffer from complexities, high fees, and a lack of transparency. Sui Nova was created to tackle these challenges. Through Sui Nova, users can easily set up and manage recurring payments in a fully decentralized environment, ensuring transparency and automation in the payment process. This lowers the barriers to entry and enhances the efficiency and security of payments. # Project Objectives The goal of Sui Nova is to create a simple, reliable, and transparent cryptocurrency payment system, providing users and businesses with better liquidity management tools. Through smart contracts, Sui Nova can execute payments automatically without human intervention, reducing the possibility of human error. The protocol also gives users greater control and visibility, making the payment process more transparent and auditable. # Core Features - **Liquidity Management**: Sui Nova enables users to manage the liquidity of their cryptocurrency assets, ensuring the proper allocation and utilization of funds. - **Automated Payments**: Sui Nova allows users to set up automated recurring payments, such as salaries and subscription fees, thereby simplifying the payment process. - **Decentralization and Transparency**: All payments are executed on-chain via smart contracts, ensuring transparency and immutability in the payment process. # Problems Solved Sui Nova addresses several key issues in traditional cryptocurrency payments: - **Cumbersome Recurring Payments**: By automating the execution of recurring payments through smart contracts, the operation is simplified. - **Complexity in Fund Management**: With transparent liquidity management tools, fund management becomes more intuitive and efficient. - **Trust Issues**: A fully decentralized payment system eliminates the need for intermediaries, enhancing user trust in the system. # Application Scenarios Sui Nova has a wide range of potential application scenarios, including but not limited to: - **Salary Disbursements**: Companies can use Sui Nova to set up an automated salary payment system without manual intervention. - **Subscription Services**: Users can utilize Sui Nova to automatically pay subscription fees, avoiding missed payment deadlines. - **Loan Repayments**: Borrowers can establish automatic repayment plans through Sui Nova, ensuring timely loan repayments. # Development ``` # mainnet packageId : 0xa769a20c9b8e80078bdad52ce1a2ecc4fb0d7c8df815e3b089bb6893913042e5 # Digest : HvdkDmgjy8jdiXosTH9etjUwrvmE7fXrdC66bntVk1ZA ```
Hey Gavin2015, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
assert! statements to prevent unauthorized actions and incorrect states.E_LEN_NOT_EQUAL, E_STREAM_EXISTED).assert! to validate user actions and states.a todo list app for sui You can see it on https://sui-todo.netlify.app/ The project is based on the Sui TS SDK and uses zklogin、Nuxt3. The main purpose is to create a personal to-do list for users that can be synchronized based on their wallet address. And allow users to add todo items and manage them. At present, the project is mainly running in the devnet environment.
Hey ablion, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
E_UNAUTHORIZED error code to handle unauthorized access attempts.assert! statements to validate the length of the ToDo item and the authorization of the sender before modifying or deleting a ToDo item.creator field in the ToDo struct to store the address of the user who created the ToDo item. This helps in verifying if the sender has permission to modify or delete the item.remove, update, and toggle_undo functions to ensure that only the creator can perform these actions.toggle_undo Function: A new function to toggle the undo state of a ToDo item, allowing for better state management and flexibility in handling ToDo tasks.get_all_todos Function (Placeholder): Introduced a function to potentially retrieve all ToDo items, which could be further developed to implement querying features.clone() to prevent potential issues with data ownership and borrowing.# Music Streaming Platform Module Documentation > NOTE: sui version >= 1.27.0 and the edition = "2024.beta". ## Introduction The Music Streaming Platform module is a decentralized application built on the Sui blockchain. It provides functionalities for managing music tracks, artists, listeners, playlists, and royalties. Users can register songs, distribute royalties, stream tracks, and interact through feedback and voting mechanisms. ## Structs ### 1. Song A `Song` represents a music track and includes: - `id: UID`: Unique identifier for the song. - `details: vector<u8>`: Details of the song. - `owners: Table<address, u64>`: Table mapping owner addresses to their ownership share (in basis points). - `total_royalties: Balance<SUI>`: Total royalties accumulated for the song. - `owner_list: vector<address>`: List of owner addresses. ### 2. Artist An `Artist` represents a music artist and includes: - `id: UID`: Unique identifier for the artist. - `artist_address: address`: Address of the artist. - `name: vector<u8>`: Name of the artist. - `track_history: Table<u64, Track>`: Table mapping track IDs to tracks. - `track_list: vector<u64>`: List of track IDs. ### 3. Listener A `Listener` represents a music listener and includes: - `id: UID`: Unique identifier for the listener. - `listener_address: address`: Address of the listener. - `escrow: Balance<SUI>`: Escrow balance of the listener. - `name: vector<u8>`: Name of the listener. ### 4. Track A `Track` represents a music track and includes: - `id: UID`: Unique identifier for the track. - `details: vector<u8>`: Details of the track. - `artist: address`: Address of the artist. - `promoted: bool`: Indicates if the track is promoted. ### 5. Playlist A `Playlist` represents a playlist and includes: - `id: UID`: Unique identifier for the playlist. - `name: vector<u8>`: Name of the playlist. - `tracks: Table<u64, Track>`: Table mapping track IDs to tracks. - `track_list: vector<u64>`: List of track IDs. ### 6. User A `User` represents a user and includes: - `id: UID`: Unique identifier for the user. - `user_address: address`: Address of the user. - `details: vector<u8>`: Details of the user. ### 7. ChangeProposal A `ChangeProposal` represents a change proposal and includes: - `id: UID`: Unique identifier for the change proposal. - `votes: Table<address, bool>`: Table mapping voter addresses to their votes. - `voter_list: vector<address>`: List of voter addresses. - `approved: bool`: Indicates if the proposal is approved. ## Functions ### 1. Register Song Creates a new song with specified details, owners, and ownership shares. ```move public fun register_song( details: vector<u8>, owners: vector<address>, ownership_shares: vector<u64>, ctx: &mut TxContext ) : Song ``` ### 2. Distribute Royalties Distributes royalties to song owners based on their ownership shares. ```move public fun distribute_royalties( song: &mut Song, mut payment: Coin<SUI>, ctx: &mut TxContext ) ``` ### 3. Claim Royalties Allows a song owner to claim their share of royalties. ```move public fun claim_royalties( song: &mut Song, owner: address, ctx: &mut TxContext ) ``` ### 4. Update Song Details Updates the details of a song by its owner. ```move public fun update_song_details( song: &mut Song, new_details: vector<u8>, ctx: &mut TxContext ) ``` ### 5. Revoke Song Revokes a song by majority consensus of its owners. ```move public fun revoke_song( song: &mut Song, ctx: &mut TxContext ) ``` ### 6. Register Artist Registers a new artist with a specified name and address. ```move public fun register_artist( name: vector<u8>, artist_address: address, ctx: &mut TxContext ) : Artist ``` ### 7. Register Listener Registers a new listener with a specified name and address. ```move public fun register_listener( name: vector<u8>, listener_address: address, ctx: &mut TxContext ) : Listener ``` ### 8. Upload Track Allows an artist to upload a new track. ```move public fun upload_track( artist: &mut Artist, track_details: vector<u8>, track_id: u64, ctx: &mut TxContext ) ``` ### 9. Stream Track Allows a listener to stream a track by paying a fee. ```move public fun stream_track( listener: &mut Listener, artist: &mut Artist, track_id: u64, ctx: &mut TxContext ) ``` ### 10. Tip Artist Allows a listener to tip an artist. ```move public fun tip_artist( listener: &mut Listener, artist: &mut Artist, amount: u64, ctx: &mut TxContext ) ``` ### 11. Create Playlist Creates a new playlist. ```move public fun create_playlist( name: vector<u8>, ctx: &mut TxContext ) : Playlist ``` ### 12. Add Track to Playlist Adds a track to a playlist. ```move public fun add_track_to_playlist( playlist: &mut Playlist, track: Track, track_id: u64, _ctx: &mut TxContext ) ``` ### 13. Get Playlist Details Retrieves details of a playlist including the tracks. ```move public fun get_playlist_details( playlist: &Playlist ) : (vector<u8>, u64, bool) ``` ### 14. Get Song Details Retrieves details of a song including total royalties. ```move public fun get_song_details( song: &Song ) : (vector<u8>, &Balance<SUI>) ``` ### 15. Get Track Details Retrieves details of a track. ```move public fun get_track_details( track: &Track ) : vector<u8> ``` ### 16. Register User Registers a new user with specified details. ```move public fun register_user( user_address: address, user_details: vector<u8>, ctx: &mut TxContext ) : User ``` ### 17. Get User Details Retrieves details of a user. ```move public fun get_user_details( user: &User ) : vector<u8> ``` ### 18. Split Payments Splits payments and distributes shares dynamically. ```move public fun split_payments( song: &mut Song, mut payments: Coin<SUI>, ctx: &mut TxContext ) ``` ### 19. Get Royalty Analytics Provides detailed analytics on royalties. ```move public fun get_royalty_analytics( song: &Song ) : (u64, u64) ``` ### 20. Add Feedback Allows a listener to add feedback on a track. ```move public fun add_feedback( listener: &mut Listener, track: &mut Track, feedback: vector<u8>, ctx: &mut TxContext ) ``` ### 21. Promote Track Allows an artist to promote a track. ```move public fun promote_track( artist: &mut Artist, track_id: u64, ctx: &mut TxContext ) ``` ### 22. Vote on Change Allows users to vote on a change proposal. ```move public fun vote_on_change( user: &mut User, change_proposal: &mut ChangeProposal, vote: bool, ctx: &mut TxContext ) ``` ## UNITTEST ```bash $ sui --version sui 1.27.0-0362997459 $ sui move test INCLUDING DEPENDENCY Sui INCLUDING DEPENDENCY MoveStdlib BUILDING sui_music_platform Running Move unit tests [ PASS ] 0x0::sui_music_platform_tests::test_register_song [ PASS ] 0x0::sui_music_platform_tests::test_distribute_royalties [ PASS ] 0x0::sui_music_platform_tests::test_claim_royalties [ PASS ] 0x0::sui_music_platform_tests::test_update_song_details [ PASS ] 0x0::sui_music_platform_tests::test_revoke_song [ PASS ] 0x0::sui_music_platform_tests::test_register_artist [ PASS ] 0x0::sui_music_platform_tests::test_register_listener [ PASS ] 0x0::sui_music_platform_tests::test_upload_track [ PASS ] 0x0::sui_music_platform_tests::test_stream_track [ PASS ] 0x0::sui_music_platform_tests::test_tip_artist [ PASS ] 0x0::sui_music_platform_tests::test_create_playlist [ PASS ] 0x0::sui_music_platform_tests::test_add_track_to_playlist [ PASS ] 0x0::sui_music_platform_tests::test_get_playlist_details [ PASS ] 0x0::sui_music_platform_tests::test_get_song_details [ PASS ] 0x0::sui_music_platform_tests::test_get_track_details [ PASS ] 0x0::sui_music_platform_tests::test_register_user [ PASS ] 0x0::sui_music_platform_tests::test_get_user_details [ PASS ] 0x0::sui_music_platform_tests::test_split_payments [ PASS ] 0x0::sui_music_platform_tests::test_get_royalty_analytics [ PASS ] 0x0::sui_music_platform_tests::test_add_feedback [ PASS ] 0x0::sui_music_platform_tests::test_promote_track [ PASS ] 0x0::sui_music_platform_tests::test_vote_on_change Test result: OK. Total tests: 22; passed: 22; failed: 0 ``` ## Deployment To deploy the Music Platform module on the Sui blockchain: 1. Ensure you have Sui CLI installed and configured. 2. Build and deploy the module: ```bash sui move build sui client publish --gas-budget <GAS_BUDGET> ``` 3. Run unit tests to verify the deployment: ```bash sui move test ``` This documentation provides an overview of the functionalities and how to use the Music Platform module effectively.
Hey GoldenMoses, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
split_payments and distribute_royalties functions). This redundancy can lead to maintenance challenges.revoke_song function mentions a placeholder for consensus logic but does not provide actual logic for revoking a song based on owner consensus.Table might not be optimal, especially when combined with a separate list of owners.stream_track, tip_artist) have minimal access control, which might be exploited.distribute_royalties and split_payments into a single utility function to handle payments distribution.revoke_song function to include consensus logic based on owner votes.Table with a more efficient data structure for managing ownership shares, such as using vector<(address, u64)> directly.The Car Registration System is a decentralized application (DApp) built on the SUI blockchain platform. It streamlines the process of registering vehicles by providing a transparent, secure, and efficient platform for car owners and inspectors to interact. This system facilitates booking registration appointments, requesting inspections, managing payments, resolving disputes, and providing feedback. By leveraging blockchain technology, the Car Registration System ensures data integrity and enhances trust between stakeholders in the vehicle registration process.
Hey sylvia3, lovely submission I went through your dapp and noticed a few issues and optimizations. Below are some of the changes I made:
get_registration_status that allows retrieving the current status of a car registration, including progress, whether it is scheduled, and if there are any disputes.book_car_registration function initializes a new car registration with specified attributes and shares the object.request_car_inspection and submit_car_registration handle the assignment of an inspector and submission of registration.dispute_car_registration and resolve_car_registration handle the process of disputing and resolving disputes for a car registration.release_payment and add_funds_to_registration handle the release of escrow funds to the inspector and adding funds to the registration escrow balance.request_refund and cancel_car_registration manage refunding the escrow balance and canceling the registration.get_registration_status function provides access to the current status of a car registration, enhancing transparency and user interaction.get_registration_status that allows retrieving the current status of a car registration, including progress, whether it is scheduled, and if there are any disputes.book_car_registration function initializes a new car registration with specified attributes and shares the object.request_car_inspection and submit_car_registration handle the assignment of an inspector and submission of registration.dispute_car_registration and resolve_car_registration handle the process of disputing and resolving disputes for a car registration.release_payment and add_funds_to_registration handle the release of escrow funds to the inspector and adding funds to the registration escrow balance.request_refund and cancel_car_registration manage refunding the escrow balance and canceling the registration.get_registration_status function provides access to the current status of a car registration, enhancing transparency and user interaction.Dacade is an open-sourced platform and is created in collaboration with multiple contributors. Go to the repository to start contributing.