mubarak23 / chainevents-contracts

cairo contract implementation for chainevents
1 stars 4 forks source link

Attendee Event Registration Details #24

Open mubarak23 opened 2 hours ago

mubarak23 commented 2 hours ago

An an Attendee who register for an event, this function should return the event registration details,

fn attendee_event_details(self: @TContractState, event_id: u256) -> EventRegistration;

Write unit test for the following case

Provide an ETH

Gianfranco99 commented 2 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have been a developer for over 4 years and have been contributing to the Starknet ecosystem for more than a year. My recent contributions include work on cairo-lint and scaffold-starknet. I’m eager to participate in this project as I see a lot of potential in it and believe it adds valuable functionality to the Starknet ecosystem.

How I plan on tackling this issue

To approach this, I would start by reviewing the structure of EventRegistration to understand the fields it contains and ensure that each one can be properly validated. Then, I would write unit tests to verify that, when an attendee is registered for an event, all of the registration details are returned correctly.

I would break down the task into two main parts:

1- Test each field in EventRegistration: I will assert that all fields returned by the function are accurate and match the expected data for a given registration.

2- Verify the caller's registration for the event: I will ensure that the function only returns details if the caller is registered for the event by checking their event_id and matching it to the registration data.

By focusing on these two parts, I can ensure both the completeness of the returned data and that the access is properly restricted to registered attendees.

No-bodyq commented 2 hours ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a computer science student as well as a fullstack and web3 developer with experience in writing tests for smart contracts in Cairo. I have contributed to some starknet projects in the past.

How I plan on tackling this issue

I will ensure that all the fields in the event registration align with the expected output and ensure that the function is only called when the caller has registered for the event using the id for verification against the registration data and taking into account the edge cases