Skip to content

feat: add cntr contract helper modules#1044

Merged
yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
Userhorlie:feat/cntr-contract-helpers
May 30, 2026
Merged

feat: add cntr contract helper modules#1044
yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
Userhorlie:feat/cntr-contract-helpers

Conversation

@Userhorlie
Copy link
Copy Markdown
Contributor

Summary

Implements four pure-Rust contract helper modules in contracts/cntr/ as a standalone crate (no Soroban SDK dependency).

Changes

  • subscription_expiry.rsis_subscription_expired + days_until_expiry
  • member_tier.rsMemberTier enum + calculate_tier
  • escrow_release.rsvalidate_escrow_release with dispute window check
  • escrow_refund.rscalculate_refund_amount with cancellation policy
  • Added cntr to workspace members in contracts/Cargo.toml

Tests

26 unit tests, all passing (cargo test).

Closes

Closes #1018
Closes #1019
Closes #1020
Closes #1021

…stinctCodes#1019, DistinctCodes#1020, DistinctCodes#1021)

- subscription_expiry.rs: is_subscription_expired + days_until_expiry
- member_tier.rs: MemberTier enum + calculate_tier
- escrow_release.rs: validate_escrow_release with dispute window check
- escrow_refund.rs: calculate_refund_amount with cancellation policy
- 26 unit tests, all passing
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

@Userhorlie is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

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

Copy link
Copy Markdown
Collaborator

@yusuftomilola yusuftomilola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@yusuftomilola yusuftomilola merged commit c339a43 into DistinctCodes:main May 30, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants