lfglabs-dev / starknet.quest

The on-chain quest tool of Starknet
https://starknet.quest
33 stars 121 forks source link

New contract task type in the admin dashboard #836

Closed Marchand-Nicolas closed 1 month ago

Marchand-Nicolas commented 1 month ago

Description

Add a new task type in the admin dashboard: contract.

PROPOSED TODO

→ Please contact me on the Telegram group if anything is unclear.

image

Jemiiah commented 1 month ago

I have previously contributed to this repository and have over 50+ contributions would love to work on this issue @Marchand-Nicolas here’s my only dust profile : https://app.onlydust.com/u/Jemiiah

onlydustapp[bot] commented 1 month ago

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

ShantelPeters commented 1 month ago

Please kindly assign @Marchand-Nicolas

onlydustapp[bot] commented 1 month ago

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

onlydustapp[bot] commented 1 month ago

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

sebas11042 commented 1 month ago

To add the new contract task type in the admin dashboard, I plan to reuse the structure of the verify_balance task, replacing the contracts field with a calls field that accepts a JSON input. I will validate the JSON before sending it to the API and display an error message with alert if the format is invalid. I will implement only the creation process on the front-end, as the back-end logic will be added later as indicated.

I am an advanced computer science student with knowledge in Java and JavaScript, and a member of the DOJO Coding community here in CR. I plan to propose the mentioned changes!

Thanks!

MatiasAchucarro commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a passionate and results-driven web developer, currently deepening my knowledge in web3 technologies, Cairo, and open-source development through Dojo Coding. My skill set includes expertise in JavaScript, React, HTML, CSS, and C# with .NET Entity Framework, among others. I also have experience with tools like Git, GitHub, SQL Server, and Postman. My focus has been on building solid web applications, from task lists to full-fledged CRUD systems, with front-end, back-end, and database integration. I have already made a contribution to Starknet Quest, and I am eager to take on more opportunities

How I plan on tackling this issue

To add the new task type "contract" in the admin dashboard, I would duplicate the structure of the verify_balance task form, replacing the contracts field with a calls field that accepts JSON input. I would implement validation that attempts to parse the JSON using JSON.parse, displaying an alert message with alert("...") if an error occurs. I would review the implementations of other task types (Custom, Domain, Balance) to ensure consistency in design. This modification would focus solely on the front-end creation process, deferring backend integration for a future PR.

SoarinSkySagar commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

GM, 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, JavaScript 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

Hi @Marchand-Nicolas, here's how I would approach this issue:

Tasks:

ETA: 3 Hours

bitfalt commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hii! My name is Daniel, I’m a Computer Science student and web3 developer. I’ve done some contributions, finished a Starknet Bootcamp, exercises on NodeGuardians, finished Starklings and I have participated in multiple Hackathons. I’m also a member of the Dojo Coding community. I’ve contributed to the project in the past regarding the api repository.

How I plan on tackling this issue

I would approach this issue in the following way:

josephchimebuka commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hell, I am Joseph I am a frontend developer and blockchain developer and I am also an active contributor here on only dust here is my profile https://app.onlydust.com/u/josephchimebuka. ill appreciate the opportunity to contribute tot this. this is a couple of frontend and blockchain projects i have built https://metacrypt.vercel.app/ https://mattedsgn.com/

How I plan on tackling this issue

To solve this, I will reuse the fields from the verify_balance task as a reference, replacing the contracts field with a calls field, which will expect a JSON input. I'll ensure that the parsed JSON content is transmitted to the API, and in case JSON.parse throws an error, I'll display a message using the vanilla JavaScript alert("...") function. I'll review other task types like Custom, Domain, and Balance to maintain consistency with their implementation. I should conclude in 2-4 days

Iwueseiter 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. I've contributed to Projects here on onlydust and with that experience, I would handle this task as expected.

How I plan on tackling this issue

  1. Define the Contract Task Type in the Frontend: Similar to other task types (e.g., Custom, Domain, Balance, etc.), I will define this new task type in the frontend codebase. Add the "contract" type to the task type dropdown or selection list.
  2. Form Input for Contract Task: Create a form component to capture necessary fields related to the "contract" task type. This will include: calls field: A text area where admins can input a JSON string that will be parsed. Other necessary fields: Based on the requirements of the "contract" task type (e.g., title, description, etc.).
  3. Handle JSON Parsing for Calls Field: Add input validation for the calls field: When the form is submitted, use JSON.parse() to attempt to parse the value of the calls field. If parsing fails, display an error message using alert("Invalid JSON format") with vanilla JS.
  4. Integrate with Admin Dashboard: Incorporate the CreateContractTask component into the admin dashboard. Ensure the new task type is listed alongside other task types (e.g., Custom, Balance) in the appropriate dropdown or navigation.
  5. Submit Parsed Data to API: Once the form is submitted and the JSON is successfully parsed, I will transmit the parsed data to the backend API. The backend implementation will handle the rest once it's set up.
  6. Test the Form: Test various JSON inputs in the calls field to ensure that invalid JSON triggers the alert and valid JSON is handled correctly.

ETA: 24hrs

martinvibes commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

hello i am a frontend dev and blockchain developer please can i work on this issue :) and would love to be a contributor

How I plan on tackling this issue

Review Existing Tasks:

Check the implementation of existing task types (e.g., verify_balance) to understand their structure. Create New Task Type:

Define a new task type named contract in the admin dashboard. Reuse Fields:

Copy the fields from the verify_balance task. Replace the contracts field with a new calls field that accepts JSON input. Implement JSON Parsing:

Use JSON.parse() to parse the JSON input. If parsing fails, show an alert message using alert("..."). Connect to API:

Transmit the parsed JSON content to the appropriate API endpoint. Test Functionality:

Test the task creation process in the frontend to ensure it works correctly. Seek Clarification:

Reach out via the Telegram group for any questions or clarifications during the process

PoulavBhowmick03 commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm Poulav Bhowmick, a software engineer at Invisible Studios with a robust background in TypeScript, Rust, Solidity Cairo, fullstack development and blockchain technology. My experience includes building robust applications, optimizing functionalities and blockchain integration. I have actively participated in events and open source contributions, enhancing my capability to tackle real-world tech challenges. My projects can be viewed on my GitHub Profile and OnlyDust Profile. Plus I´m active member of Starknet, Ethereum ecosystem.

How I plan on tackling this issue

I will add a new contract task type to the admin dashboard by following these steps:

  1. Create the Contract Task Type:

    • First, I will add a new task type called "Contract" in the admin dashboard, making it selectable alongside the other existing task types (e.g., Quiz, Twitter, Discord, Custom, Domain, Balance).
  2. Update the Form Fields:

    • I will use the existing structure from the verify_balance task as a template and make the necessary changes:
      • Replace the contracts field with a calls field that will expect a JSON input.
      • This field will allow users to input multiple contract calls in JSON format. The JSON should include all required attributes such as contract, call_data, entry_point, and regex.
  3. Handle JSON Parsing:

    • When the user submits the form, I will implement a JSON parsing mechanism to handle the calls field input.
    • If the JSON.parse function throws an error (i.e., the JSON format is incorrect), I will display an alert message using the alert("Invalid JSON format. Please correct your input and try again.") function to inform the user about the parsing issue.
  4. Transmit Data to the API:

    • Once the JSON parsing is successful, I will pass the parsed data to the API to handle the creation process of the contract task type.
    • I will ensure that the data structure matches the expected format on the backend (even though the backend implementation will be handled later).
  5. Testing and Verification:

    • I will test the integration by ensuring the data is transmitted correctly to the API and validate that any JSON parsing errors are handled gracefully.
    • I'll also ensure that switching between different task types (e.g., Custom, Domain, Balance) does not interfere with the contract task's functionality.

      ETA - 3 days

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 knowlegde in html, css , react, javascript,typescript etc. i would love to be given an opportunity to contribute.

How I plan on tackling this issue

I will approach this issue by adding a new task type called "contract" to the admin dashboard by reusing the fields from the existing verify_balance task. Replace the contracts field with a calls field that accepts JSON input. If JSON.parse fails, display an alert with the error message. Review other task types for implementation guidance. This update focuses solely on the front-end creation process; back-end integration will be addressed later.

onlydustapp[bot] commented 1 month ago

The maintainer Marchand-Nicolas has assigned PoulavBhowmick03 to this issue via OnlyDust Platform. Good luck!