mubarak23 / chainevents-contracts

cairo contract implementation for chainevents
1 stars 2 forks source link

Event Details Function #19

Open mubarak23 opened 21 hours ago

mubarak23 commented 21 hours ago

Given an eventId, the function should return the event details,

Write a unit test for the function

codeZe-us commented 20 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Mid level Cairo Developer

How I plan on tackling this issue

I will write a function that takes an event_id as input and retrieves the event details from the event_details storage map, then make sure the function returns the complete EventDetails struct associated with the specified event_id. Also, include the test for the function.

anonfedora commented 20 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

A fullstack Blockchain developer, with extensive experience in building Web3 dApps, governance systems using smart contracts.

How I plan on tackling this issue

The goal is to create a funtion (event details) that read from the storage variable eventId that returns event details. The event details are stored in Starknet’s storage to ensure immutability and availability.

casweeney commented 13 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a software engineer with strong technical skills and expertise in writing complex scalable applications. I have written and tested some advanced Cairo and Solidity smart contracts like building and testing the Synthetix staking contract using Cairo: https://github.com/casweeney/cairo-synthentix-staking

I have contributed to some groundbreaking protocols like Hyperbridge: https://github.com/polytope-labs/hyperbridge/graphs/contributors and my GitHub account has a lot of proof of work.

Leveraging on my skills and experience, I am confident in my ability to tackle new challenges and also solve complex technical issues.

How I plan on tackling this issue

I will create a function that takes in an event_id as argument and with the event_id I will use it as a key to read the event_details mapping that returns the EventDetails struct.

For the test, I will first create an event, then I will call the function that returns EventDetails and assert that the details from the function matches with the details I used in creating the event.

Akshola00 commented 12 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a background in developing decentralized applications with Cairo for smart contracts on the StarkNet blockchain. I am experienced in building and deploying contracts and have a solid understanding of event-driven programming. I am familiar with Cairo testing and use of cairo cheatsheat, allowing me to write comprehensive tests that ensure contract reliability and security.

How I plan on tackling this issue

I would first review the existing codebase to understand how events are stored and accessed. I would analyze the data structures to ensure efficient retrieval, consider the output format, and implement validation for invalid eventId inputs. After understanding the implementation, I would write unit tests to verify the function’s accuracy, ensuring it returns the correct details and handles edge cases properly.