Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update setup guide #25

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ cd chainevents-contracts

To build the contracts, run the command:

- setup scarb via asdf

```
asdf local scarb 2.8.3
```

- setup starknet-foundry via asdf

```
asdf local starknet-foundry 0.31.0
```

- Build

```
scarb build
```
Expand Down
42 changes: 34 additions & 8 deletions src/events/events.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ pub mod Events {
enum Event {
NewEventAdded: NewEventAdded,
RegisteredForEvent: RegisteredForEvent,
EventAttendanceMark: EventAttendanceMark
EventAttendanceMark: EventAttendanceMark,
UpgradedEvent: UpgradedEvent,
EndEventRegistration: EndEventRegistration,
RSVPForEvent: RSVPForEvent
}

#[derive(Drop, starknet::Event)]
Expand All @@ -51,16 +54,39 @@ pub mod Events {
}

#[derive(Drop, starknet::Event)]
struct RegisteredForEvent {
event_id: u256,
event_name: felt252,
user_address: ContractAddress
pub struct RegisteredForEvent {
pub event_id: u256,
pub event_name: felt252,
pub user_address: ContractAddress
}

#[derive(Drop, starknet::Event)]
pub struct EndEventRegistration {
pub event_id: u256,
pub event_name: felt252,
pub event_owner: ContractAddress
}

#[derive(Drop, starknet::Event)]
pub struct RSVPForEvent {
pub event_id: u256,
pub event_name: felt252,
pub attendee_address: ContractAddress
}

#[derive(Drop, starknet::Event)]
pub struct UpgradedEvent {
pub event_id: u256,
pub event_name: felt252,
pub paid_amount: u256,
pub event_type: EventType
}


#[derive(Drop, starknet::Event)]
struct EventAttendanceMark {
event_id: u256,
user_address: ContractAddress
pub struct EventAttendanceMark {
pub event_id: u256,
pub user_address: ContractAddress
}

#[constructor]
Expand Down
Loading