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 4, 2026. It is now read-only.
Once submission_deadline or judging_deadline passes, it cannot be moved. Real hackathons extend constantly (server issues, holidays, organizer requests). Users will hit this regularly.
Fix
Add extend_submission_deadline and extend_judging_deadline:
pubfnextend_submission_deadline(env:Env,hackathon_id:u64,new_deadline:u64,) -> Result<(),HackathonError>{letmut hackathon = Self::load_hackathon(&env, hackathon_id)?;
hackathon.creator.require_auth();// Only extend forward, only while submissions are still openif new_deadline <= hackathon.submission_deadline{returnErr(HackathonError::DeadlineMustExtend);}if env.ledger().timestamp() > hackathon.submission_deadline{returnErr(HackathonError::DeadlineAlreadyPassed);}// Cap extension at 30 days from originalif new_deadline > hackathon.submission_deadline + 30*86_400{returnErr(HackathonError::ExtensionTooLong);}// Maintain invariant: submission < judgingif new_deadline >= hackathon.judging_deadline{returnErr(HackathonError::InvalidDeadlines);}
hackathon.submission_deadline = new_deadline;
env.storage().persistent().set(&HackathonDataKey::Hackathon(hackathon_id),&hackathon);SubmissionDeadlineExtended{ hackathon_id, new_deadline }.publish(&env);Ok(())}
Severity: Important (UX)
Once
submission_deadlineorjudging_deadlinepasses, it cannot be moved. Real hackathons extend constantly (server issues, holidays, organizer requests). Users will hit this regularly.Fix
Add
extend_submission_deadlineandextend_judging_deadline:Same shape for judging deadline.
Tests