CarmineOptions / konoha

A toolkit for DAO-like governance on Starknet
Apache License 2.0
23 stars 33 forks source link

ODHack: Discussion with onchain data #76

Closed tensojka closed 2 weeks ago

tensojka commented 1 month ago

Implement a comment submission and retrieval feature for proposals in the Konoha governance toolkit. This feature should allow govtoken holders to submit IPFS addresses as comments on proposals and retrieve these comments. Ensure this functionality integrates with the Proposals component to only allow commenting on live proposals and handles only the IPFS hashes, not the actual content.

Expected skill: Cairo developer medior

Steps:

Implement a new component (discussion.cairo) with add and retrieve comment functions, ensuring proposals that are being commented on are live. It should depend on the Proposals component for fetching get_live_proposals(). Implement storage mechanisms for IPFS hashes of comments. Update tests in tests/proposals.cairo to cover the new functionality. This clear and structured approach should help a newcomer understand and implement the feature effectively. For more details, please refer to the repository

Definition of Done

The Cairo code works as expected, has nearly full test coverage, is reasonably documented (docstrings or similar suffice) and readable.

Refer to CONTRIBUTING.md for information on claiming the task.

EjembiEmmanuel commented 1 month ago

@tensojka let me hop on this

tensojka commented 1 month ago

@EjembiEmmanuel Refer to https://github.com/CarmineOptions/konoha/blob/master/CONTRIBUTING.md please, you are missing an estimated delivery timeline. I would also appreciate a brief summary of your relevant skills, though not strictly required.

It would also be nice of you to join the Konoha Dev Telegram group for faster communication.

vibenedict commented 1 month ago

i will like to jump on it

tensojka commented 1 month ago

@vibenedict You are also missing an estimated delivery timeline, see message above.

EjembiEmmanuel commented 1 month ago

@tensojka I should be able to get in done in 5 working days.

vibenedict commented 1 month ago

mplement a comment submission and retrieval feature for proposals in the Konoha governance toolkit. This feature should allow govtoken holders to submit IPFS addresses as comments on proposals and retrieve these comments. Ensure this functionality integrates with the Proposals component to only allow commenting on live proposals and handles only the IPFS hashes, not the actual content.

Step 1: Set up the backend

  1. Create a new contract or modify an existing one to store comments for proposals. This contract should have the following functions:
    • createComment(ipfsHash: string, proposalId: uint256): adds a new comment to the proposal with the given IPFS hash.
    • getComments(proposalId: uint256): retrieves all comments associated with the given proposal ID.
    • isAdmin(user: address): checks whether the user is an admin, returning a boolean value.
  2. Deploy the contract on a blockchain platform of your choice (e.g., Ethereum, BSC, or polygon).

Step 2: Integrate with the Proposals component

  1. Modify the Proposals component to include a comment submission functionality. When a proposal is created or updated, trigger the createComment function to add a comment with a unique IPFS hash.
  2. Modify the Proposals component to display a "Comments" section for each live proposal. This section should list all comments associated with the proposal, including the IPFS hash.

I will carryout the task in five days

tensojka commented 1 month ago

@vibenedict Is this written with chatgpt? The function signatures aren't Cairo 1. there are no strings, we use underscore_case, uint256>u256 and others. Why the admin check??

Integration with Proposals makes no sense.

manlikeHB commented 1 month ago

Hi @tensojka, I would love to give this issue a try.

What I understood form your description is to create a new starknet component(discussion) which would have two functions for adding and retrieving IPFS addresses as comments. Comments should only be added for live proposals.

I will be needing 5 working days to tackle this.

tensojka commented 1 month ago

@manlikeHB Assigned you, sorry for missing this!

manlikeHB commented 1 month ago

Thank you @tensojka, is it alright to reach out to you on telegram if I have any issues?

tensojka commented 1 month ago

@manlikeHB Yes, please reach out, preferably in the konoha development group (see link in readme)

tensojka commented 3 weeks ago

@manlikeHB You haven't created a draft PR and it's been five days with no update from you, zero commits in your fork. Unassigning you.

manlikeHB commented 3 weeks ago

Hi @tensojka, I'll make a draft PR today.

tensojka commented 3 weeks ago

@manlikeHB Can you at least push the code you have?

manlikeHB commented 3 weeks ago

@tensojka Yes, I will.