lfglabs-dev / api.starknet.quest

starknet.quest rust backend
2 stars 17 forks source link

Admin routes for contract tasks #267

Open Marchand-Nicolas opened 6 days ago

Marchand-Nicolas commented 6 days ago

Description

Implement the necessary admin routes to create and edit a new contract task type.

PROPOSED TODO

Luluameh commented 3 days ago

Hello @Marchand-Nicolas I can handle this I will love to fix this issue

onlydustapp[bot] commented 3 days ago

Hi @Luluameh! 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.

martinvibes commented 2 days ago

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

onlydustapp[bot] commented 2 days ago

Hi @martinvibes! 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.

MatiasAchucarro commented 1 day 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 implement the admin routes for creating and editing contract tasks, I first create the src/endpoints/admin folder and within it, the create_contract.js and update_contract.js files. In create_contract.js, I define a POST route that receives an object with the calls field and uses it to create a new QuestTaskDocument, ensuring the calls field is included as a vector of Call.

The Call type is defined in src/models.rs, with the fields contract, call_data, entry_point, and regex. Then, in update_contract.js, I set up a PUT route that updates an existing document, allowing the modification of fields, including calls.

Finally, I perform tests to verify that the create and update operations work correctly and that the documents are stored properly in the database.

PoulavBhowmick03 commented 1 day 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 implement the admin routes for contract tasks by following these steps:

Create Contract Folder and Routes: I will create a contract folder under src/endpoints/admin. Inside this folder, I'll add create_contract.rs and update_contract.rs routes, similar to how it's structured for balance in src/endpoints/admin/balance.

Handle Calls Field in Routes: The create_contract and update_contract routes will accept a calls field (an array of Call objects) in the request body, along with other fields like task name. Each Call object will include contract (string), call_data (string array), entry_point (string), and regex (string).

Update QuestTaskDocument Type: I'll add the calls field to the QuestTaskDocument type in src/models.rs if it doesn't already exist. If the Call type isn't defined yet, I'll create it to ensure a clear and structured data model.

Store the New Document: I will construct the new document as specified I'll ensure that the document structure matches the existing patterns for consistency. Testing and Validation:

I'll thoroughly test both create_contract and update_contract routes to verify they handle the calls data correctly and store it in the database without issues. Let me know if there are any other specifics you'd like me to include!

ETA - 3 days

mubarak23 commented 1 day ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a Experience Cairo smart contract developer with experience working on projects such as Just Art Peace, Dojo, Kart, TBA, and Shinigami. Before transitioning to Cairo development, I was a backend developer specializing in Rust.

My recent work with cairo starknet

My recent work with rust

How I plan on tackling this issue

I have read the description

This issue, am going to create two endpoints

ETA : 16HRS

JoE11-y commented 1 day ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With over 3 years of experience in blockchain and backend development, I have worked across multiple blockchain ecosystems. My expertise spans the entire development lifecycle—from project conceptualization and smart contract design to managing on-chain interactions, seamless protocol integration, and implementing strong security practices.

This enables me to handle both on-chain and off-chain infrastructure, ensuring the development of reliable, scalable blockchain applications.

How I plan on tackling this issue

Study the codebase to ensure design consitency, then implement the assigned tasks.

aji70 commented 1 day ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i'm a solidity and cairo smart contract developer with over 2 years experience and belive i have the skill set for the task

GideonBature commented 1 day ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a Software Engineer with experience in building backend using Rust, I am quite good with Rust and other programming languages including JavaScript, TypeScript, Cairo and NodeJS. I am also an open source contributor and made my first contribution in the ODHack #7.0 which was successfully merged.

How I plan on tackling this issue

First is to look at how the existing routes are been structured, that would give me an idea on how to structure my code, next I will look closely at what is to be implemented by following the PROPOSED TODO, as I build I will keep testing to make sure it's working the way it is supposed to.

onlydustapp[bot] commented 1 day ago

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