Skip to content

feat: add tiered ticket bundle pricing,and configure project-wide edi…#542

Merged
Otaiki1 merged 2 commits into
crackedstudio:masterfrom
AdeMi20:Add-ticket-bundling
Jun 30, 2026
Merged

feat: add tiered ticket bundle pricing,and configure project-wide edi…#542
Otaiki1 merged 2 commits into
crackedstudio:masterfrom
AdeMi20:Add-ticket-bundling

Conversation

@AdeMi20

@AdeMi20 AdeMi20 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

…tor settings.

Description

In this session, we implemented optional ticket bundle pricing tiers to allow volume discounts during purchases and ensured the effective price is accurately recorded in the TicketPurchased event. To improve code maintainability, we eliminated duplicate authentication logic by extracting require_admin and require_not_paused into shared macros within the raffle-shared crate, applying them consistently across both the factory and instance contracts. Additionally, we standardized whitespace and formatting across different IDEs by introducing a repository-wide .editorconfig that aligns with the existing rustfmt.toml rules, and we documented this requirement in the setup section of the README.md. Finally, we expanded the test suite for the factory contract to comprehensively verify the 48-hour timelock mechanism, guaranteeing that configuration changes correctly fail if executed too early, succeed and persist state updates after the delay, and can be cleanly cancelled.

Closes #486
Closes #472
Closes #481
Closes #452

Type of Change

  • Bug fix (non-breaking)
  • [. ] New feature (non-breaking)
  • Breaking change (requires migration)
  • [ .] Refactor (no behavior change)
  • [ .] Documentation
  • CI/CD

Testing

  • [. ] I ran cargo test and all tests pass
  • I added tests for the new behavior
  • I ran cargo fmt --all -- --check
  • I ran cargo clippy --all-targets -- -D warnings

Contract Changes

  • No on-chain ABI changes (storage keys, function signatures, error codes unchanged)
  • ABI changes are documented and backward-compatible
  • If breaking: migration path is described below

Changelog

  • CHANGELOG.md updated under [Unreleased]

Security

  • [ .] This change does not introduce new trust assumptions
  • [ .] This change does not affect fund custody logic

@Otaiki1 Otaiki1 merged commit 4f9597a into crackedstudio:master Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment