Skip to content

feat: implement campaign deadline enforcement in donate#203

Open
YaronZaki wants to merge 1 commit into
Dfunder:mainfrom
YaronZaki:feature/issue-193-deadline-enforcement
Open

feat: implement campaign deadline enforcement in donate#203
YaronZaki wants to merge 1 commit into
Dfunder:mainfrom
YaronZaki:feature/issue-193-deadline-enforcement

Conversation

@YaronZaki
Copy link
Copy Markdown
Contributor

Summary

Enforces time-bound fundraising by rejecting donations after the campaign deadline.

Changes

  • Added donate() function to CampaignContract
  • Checks env.ledger().timestamp() > campaign.end_time on every donation
  • Panics with Error::CampaignEnded when deadline has passed
  • Check is atomic with the raised_amount update to prevent race conditions

Closes #193

- Add donate() function to CampaignContract
- Check env.ledger().timestamp() > campaign.end_time before accepting donation
- Panic with Error::CampaignEnded when deadline has passed
- Check is atomic with state update to prevent race conditions

Closes Dfunder#193
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

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

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.

Implement campaign deadline enforcement in donate

1 participant