Skip to content

[Contract] — Implement Get Event Participants Function#914

Merged
Olowodarey merged 2 commits into
Arena1X:mainfrom
sochima2:main
May 30, 2026
Merged

[Contract] — Implement Get Event Participants Function#914
Olowodarey merged 2 commits into
Arena1X:mainfrom
sochima2:main

Conversation

@sochima2
Copy link
Copy Markdown
Contributor

close #817

Description
Added get_event_participants(env: &Env, event_id: u64) -> Result<Vec

, EventError> in src/views.rs which validates the event exists and returns the EventParticipants(event_id) storage index.
Exposed a public contract method get_event_participants(env: Env, event_id: u64) -> Vec in src/lib.rs that maps EventError::EventNotFound to the existing "event_not_found" panic path.
Added unit tests in tests/views_tests.rs covering: returning all participants, empty list for a newly created event, updates as participants join, and missing-event panic behavior.
Documented the new view in README.md and applied minor formatting tweaks to affected files.

Testing
Ran cargo test --manifest-path contracts/creator-event-manager/Cargo.toml --test views_tests -- --nocapture; the new and existing view tests passed (7 passed, 0 failed).

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview, Comment May 30, 2026 11:58am

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@sochima2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Olowodarey Olowodarey merged commit f6b525c into Arena1X:main May 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contract] — Implement Get Event Participants Function

2 participants