Skip to content

feat: implement minimum donation amount enforcement#202

Open
YaronZaki wants to merge 1 commit into
Dfunder:mainfrom
YaronZaki:feature/issue-192-min-donation-amount
Open

feat: implement minimum donation amount enforcement#202
YaronZaki wants to merge 1 commit into
Dfunder:mainfrom
YaronZaki:feature/issue-192-min-donation-amount

Conversation

@YaronZaki
Copy link
Copy Markdown
Contributor

Summary

Enforces a minimum donation amount on-chain to prevent dust donations.

Changes

  • Added min_donation_amount: i128 to CampaignData struct
  • initialize() now accepts min_donation_amount parameter (set to 0 to disable)
  • Added Error::DonationTooSmall variant
  • donate() panics with Error::DonationTooSmall when amount < min_donation_amount

Closes #192

- Add min_donation_amount: i128 field to CampaignData (0 = disabled)
- Accept min_donation_amount in initialize()
- Add Error::DonationTooSmall variant
- Panic with Error::DonationTooSmall in donate() when amount < minimum

Closes Dfunder#192
@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 minimum donation amount enforcement

1 participant