Skip to content

feat: add project archival (closes #121)#137

Open
Whiznificent wants to merge 1 commit into
HubDApp:mainfrom
Whiznificent:feat/project-archival-121
Open

feat: add project archival (closes #121)#137
Whiznificent wants to merge 1 commit into
HubDApp:mainfrom
Whiznificent:feat/project-archival-121

Conversation

@Whiznificent
Copy link
Copy Markdown
Contributor

@Whiznificent Whiznificent commented Jun 1, 2026

Summary

Implements project archival as described in issue #121.

Changes

  • types.rs: Added is_archived: bool field to Project struct
  • events.rs: Added ProjectArchivedEvent struct and publish_project_archived_event function
  • project_registry.rs:
    • Added archive_project function — owner can archive their own project; admins can force-archive any project
    • list_projects now skips archived projects
    • list_projects_by_category now skips archived projects
  • lib.rs: Exposed archive_project in the contract interface
  • tests/archival.rs: 6 tests covering all acceptance criteria

Tests

  • test_owner_can_archive_project
  • test_unauthorized_cannot_archive_project
  • test_admin_can_force_archive_project
  • test_archived_project_excluded_from_list_projects
  • test_archived_project_excluded_from_list_by_category
  • test_archive_nonexistent_project_fails

Acceptance Criteria

  • Project owner can archive their own project
  • Archived projects are excluded from default listing APIs
  • Admins can force-archive any project
  • Tests cover owner archive, unauthorized archive, admin force-archive, and list behavior

closes #121

- Add is_archived field to Project struct
- Add archive_project function: owner or admin can archive
- Filter archived projects from list_projects and list_projects_by_category
- Expose archive_project in contract interface (lib.rs)
- Add ProjectArchivedEvent and publish function
- Add 6 tests covering owner archive, unauthorized, admin force-archive, list exclusion
@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 Project Deactivation or Archival

2 participants