You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 12, 2026. It is now read-only.
Only admin can cancel campaigns (cancel_campaign and terminate_campaign are both admin-only). Campaign creators have no way to cancel their own campaigns before funding completes.
Current Behavior
cancel_campaign() — admin-only
terminate_campaign() — admin-only
Creator has no cancel function
Expected Behavior
Add owner_cancel_campaign(campaign_id):
Owner-only (require auth)
Only allowed in Draft, Submitted, or Campaigning status (not after Funded)
If Campaigning with existing pledges, trigger refund batches
Emit CampaignCancelledByOwner event
Acceptance Criteria
Owner can cancel in Draft/Submitted/Campaigning states
Refunds triggered automatically if pledges exist
Cannot cancel after Funded (milestones in progress)
Event emitted for indexer
Tests cover all cancel scenarios
Priority
Medium — Improves creator autonomy. Currently creators must ask admin to cancel.
Problem
Only admin can cancel campaigns (
cancel_campaignandterminate_campaignare both admin-only). Campaign creators have no way to cancel their own campaigns before funding completes.Current Behavior
cancel_campaign()— admin-onlyterminate_campaign()— admin-onlyExpected Behavior
Add
owner_cancel_campaign(campaign_id):Draft,Submitted, orCampaigningstatus (not afterFunded)Campaigningwith existing pledges, trigger refund batchesCampaignCancelledByOwnereventAcceptance Criteria
Priority
Medium — Improves creator autonomy. Currently creators must ask admin to cancel.
Labels
crowdfunding,smart-contract,enhancement