web3wagers / gostarkme

Fund raising project in Starknet ecosystem
http://web3wagers.github.io/gostarkme/
GNU Affero General Public License v3.0
18 stars 74 forks source link

[fix] Assert setGoal method is called by fund manager only #141

Closed adrianvrj closed 1 month ago

adrianvrj commented 1 month ago

This issue will be part of ODHack9.0, please apply via Onlydust app

Acceptance Criteria

CollinsC1O commented 1 month ago

Hello I'm a front-end and a blockchain developer and will love to work on this. this is something I can handle

derianrddev commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I'm Derian, a software engineer focused on full-stack web development, and I’m currently part of Dojo Coding. I've been studying Cairo through the Starknet Bootcamp, completed all the Starklings exercises, and have been practicing on Node Guardians. I’d like to work on issue #141 and gain more experience. It would be an honor if this were my first issue on OnlyDust. I would really appreciate the opportunity to contribute and be part of this project!

I estimate this will take 2 to 3 days to complete.

How I plan on tackling this issue

I will study the codebase to understand the current structure and functionality. I will thoroughly read the issue description to understand the problem that needs to be solved. I will leverage all provided resources within the issue to get a better grasp of the task. I will implement the code changes and run the tests in Cairo. If I have any doubts, I will ask questions as soon as possible in the Discord group. I will open a PR and make sure the CI tests pass. I will make the necessary changes based on the PR review.

dahtee commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a frontend and smart contract developer and I'd be happy to contribute to this project as this will be my first time contributing to this project.

How I plan on tackling this issue

Here is my approach to tackle this issue:

  1. I will create a new file called fundManagerConstants.cairo.
  2. In the file where the setGoal method is defined, import the new fundManagerConstants and assert that the caller is the fund manager.
  3. I will add tests to ensure that only the fund manager can call the setGoal function. Test cases:
    • When the fund manager calls setGoal, it should pass.
    • When anyone else calls setGoal, it should revert with an error.

At the end of my implementation,

  1. A new Cairo file fundManagerConstants.cairo will be created successfully.
  2. A new constant for the fund manager address will be added.
  3. The setGoal method now asserts that only the fund manager can modify it.
  4. Tests will be added or modified.
  5. All tests will be passing.
ShantelPeters commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a blockchain developer with vast knowledge in languages as cairo, typescript, javascript, Html, Css , solidity, React etc. My background in smart contract development will help ensure this implementation is efficient and effective.

How I plan on tackling this issue

To tackle the issue of creating a new file for fundManagerConstants, I would start by creating a new Cairo file specifically for the constants. Within this file, I would define a constant for the fund manager's address, assigning it a dummy value for initial implementation. Next, I would modify the setGoal method to include an assertion that checks if the caller's address matches the newly defined constant, ensuring that only the fund manager can modify the goal. After implementing these changes, I would update or create unit tests to validate that the assertion works as intended and that the functionality is robust. Finally, I would run the tests to ensure all pass successfully, confirming the integrity of the modifications.

saimeunt commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have contributed to several Cairo projects on OnlyDust and I've worked on similar issues in the past.

How I plan on tackling this issue

I will carefully add the requested feature and make sure the tests are passing.

0xprivateChaos commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I bring 2 years of hands-on experience in writing and optimizing tests for Solidity smart contracts, which has given me strong foundation in blockchain testing patterns. Recently, I've expanded my expertise into Cairo development, actively writing contracts and their corresponding tests. My combination of established testing experience in Solidity and fresh perspective in Cairo, along with deep theoretical knowledge, positions me well to tackle this testing challenge effectively.

How I plan on tackling this issue

Create fundManagerConstants file: Add a new constant with the fund manager's address (e.g., a dummy address). Update setGoal method: In setGoal, assert that the caller is the fund manager by comparing get_caller_address() with the new constant. Add tests: Write a test to check that only the fund manager can call setGoal by asserting it works for the manager and fails for others.

aniruddhaaps commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a typescript dev. A new-comer here, willing and ready to contribute to contribute to solve the issue

SoarinSkySagar commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

GM @adrianvrj, I am Sagar Rana, a smart contract developer and full stack engineer. I have 3 years of experience building robust full stack applications and over a year of writing smart contracts. You can see my projects and contributions to some major repos on my GitHub profile. The tech stack I use mainly includes Solidity, Rust, Cairo and Typescript. I am also contributing to the Starknet and Rust ecosystems and building on Cairo and Rust languages. I am interested in contributing to projects like this to learn more about these technologies and help make these projects better. Please assign me as I would be really glad to be a contributor in this project! :)

How I plan on tackling this issue

ETA: 1 Day