User Story:
As a campaign creator, I want to close my campaign early, and I want the contract to enforce automatic ending at the deadline, so that fundraising windows are respected without manual admin intervention.
Acceptance Criteria:
fn end_campaign(env): creator-only, sets status Ended, panics if already Ended/Cancelled, emits campaign_ended, does not block a subsequent final milestone release
- Public
fn update_status(env) callable by anyone, transitions an expired-but-still-Active campaign to Ended and emits the event — explain why this needs to be callable by any address rather than just the creator
- Test: campaign past deadline still
Active until update_status (or a donation attempt) triggers the transition
User Story:
As a campaign creator, I want to close my campaign early, and I want the contract to enforce automatic ending at the deadline, so that fundraising windows are respected without manual admin intervention.
Acceptance Criteria:
fn end_campaign(env): creator-only, sets statusEnded, panics if alreadyEnded/Cancelled, emitscampaign_ended, does not block a subsequent final milestone releasefn update_status(env)callable by anyone, transitions an expired-but-still-Activecampaign toEndedand emits the event — explain why this needs to be callable by any address rather than just the creatorActiveuntilupdate_status(or a donation attempt) triggers the transition