Skip to content

feat: add featured projects admin flow#140

Open
Whiznificent wants to merge 2 commits into
HubDApp:mainfrom
Whiznificent:feat/featured-projects-admin-flow
Open

feat: add featured projects admin flow#140
Whiznificent wants to merge 2 commits into
HubDApp:mainfrom
Whiznificent:feat/featured-projects-admin-flow

Conversation

@Whiznificent
Copy link
Copy Markdown
Contributor

@Whiznificent Whiznificent commented Jun 1, 2026

Closes #126

Summary

Implements the featured projects admin flow, allowing admins to highlight trusted or important projects on-chain.

Changes

  • storage_keys.rs – Added FeaturedProjects storage key to persist the list of featured project IDs.
  • types.rs – Added FeaturedProjectEvent struct emitted on feature/unfeature actions.
  • events.rs – Added publish_featured_project_event publisher.
  • featured_registry.rs – New module with:
    • set_featured(admin, project_id, featured) – admin-only, marks/unmarks a project as featured, emits event, idempotent.
    • list_featured_projects(start, limit) – paginated listing of featured projects (max 100 per page).
  • lib.rs – Exposed set_featured and list_featured_projects as public contract methods.
  • tests/featured.rs – 6 tests covering:
    • Admin-only enforcement
    • Project-not-found error
    • Set featured and list
    • Unfeature a project
    • Idempotent set
    • Pagination
    • Empty list

Acceptance Criteria

  • Admin can mark/unmark a project as featured
  • Featured projects can be listed with pagination
  • Featured status emits events
  • Tests cover admin-only access and listing order

closes #126

- Add FeaturedProjects storage key to StorageKey enum
- Add FeaturedProjectEvent type to types.rs
- Add publish_featured_project_event to events.rs
- Add featured_registry.rs with set_featured and list_featured_projects
- Expose set_featured and list_featured_projects in lib.rs
- Add 6 tests covering admin-only access, not-found, set/unfeature,
  idempotency, pagination, and empty list
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Whiznificent 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

@Naomi-Gift
Copy link
Copy Markdown
Contributor

@Whiznificent please resolve conflicts

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.

Add Featured Projects Admin Flow

2 participants