feat(contracts): add cntr crate — CT-06, CT-09, CT-12, CT-13#1042
Open
BashMan11 wants to merge 1 commit into
Open
feat(contracts): add cntr crate — CT-06, CT-09, CT-12, CT-13#1042BashMan11 wants to merge 1 commit into
BashMan11 wants to merge 1 commit into
Conversation
…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)
|
@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. |
|
@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! 🚀 |
This was referenced May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
contracts/cntrcrate implementing four standalone utility modules required by the Stellar Wave issues.Changes
credit_deduction.rsvalidate_deduction— balance guard preventing negative creditsreferral_reward.rscalculate_referral_split— on-chain referral reward split with remainder to referrerrole_checker.rshas_role/get_roles_for_address— standalone role checker utilitieswithdrawal_validator.rsvalidate_withdrawal— caller verification + balance check for escrow withdrawalsEach module includes ≥6 unit tests covering all error branches and the success path.
Closes
Closes #1023
Closes #1026
Closes #1029
Closes #1030