Skip to content

feat(contracts): add cntr crate — CT-06, CT-09, CT-12, CT-13#1042

Open
BashMan11 wants to merge 1 commit into
DistinctCodes:mainfrom
BashMan11:feat/ct-06-09-12-13-cntr-contracts
Open

feat(contracts): add cntr crate — CT-06, CT-09, CT-12, CT-13#1042
BashMan11 wants to merge 1 commit into
DistinctCodes:mainfrom
BashMan11:feat/ct-06-09-12-13-cntr-contracts

Conversation

@BashMan11
Copy link
Copy Markdown

Summary

Adds the contracts/cntr crate implementing four standalone utility modules required by the Stellar Wave issues.

Changes

File Issue Description
credit_deduction.rs CT-06 validate_deduction — balance guard preventing negative credits
referral_reward.rs CT-09 calculate_referral_split — on-chain referral reward split with remainder to referrer
role_checker.rs CT-12 has_role / get_roles_for_address — standalone role checker utilities
withdrawal_validator.rs CT-13 validate_withdrawal — caller verification + balance check for escrow withdrawals

Each module includes ≥6 unit tests covering all error branches and the success path.

Closes

Closes #1023
Closes #1026
Closes #1029
Closes #1030

…mentations

- credit_deduction.rs: validate_deduction with balance guard (CT-06, closes DistinctCodes#1023)
- referral_reward.rs: calculate_referral_split with remainder to referrer (CT-09, closes DistinctCodes#1026)
- role_checker.rs: has_role and get_roles_for_address utilities (CT-12, closes DistinctCodes#1029)
- withdrawal_validator.rs: validate_withdrawal with caller/balance checks (CT-13, closes DistinctCodes#1030)
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

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

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

1 participant