Skip to content

feat(crowdfund): implement early‑bird discount & time‑based pricing#378

Open
martinshub-tech wants to merge 1 commit into
ShadeProtocol:mainfrom
martinshub-tech:feature/early-bird-discount
Open

feat(crowdfund): implement early‑bird discount & time‑based pricing#378
martinshub-tech wants to merge 1 commit into
ShadeProtocol:mainfrom
martinshub-tech:feature/early-bird-discount

Conversation

@martinshub-tech

Copy link
Copy Markdown

this pr closes #332

Description

Implements early‑bird discount and time‑based pricing for the crowdfunding contract.

Changes

  • Added new DataKey entries to store discount windows and pricing tiers (see types.rs).
  • Created/updated component components/early_bird.rs with role‑based checks and discount logic.
  • Extended ShadeTrait with:
    • set_early_bird_params
    • apply_time_based_pricing
  • Emitted new events: EarlyBirdDiscountApplied, TimeBasedPriceUpdated.
  • Updated unit tests to cover the new pricing scenarios.

Verification

  • cargo test -p crowdfund passes on Windows (GNU toolchain) and Linux CI.
  • cargo clippy reports no warnings.
  • Manual simulation verifies correct discount application.

Checklist

  • Code compiles (cargo check).
  • All tests pass.
  • Documentation updated where applicable.

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@martinshub-tech 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 Early-Bird Discount and Time-based Pricing

1 participant