Feature/424 425 426 427 payout status query validation#456
Merged
Xoulomon merged 3 commits intoXoulomon:mainfrom Mar 30, 2026
Merged
Conversation
…atus management, query functions, and input validation - Xoulomon#424: Implement execute_payout() function that orchestrates payout distribution - Validates all members have contributed - Calculates total pool amount - Identifies recipient based on payout position - Transfers funds to recipient - Records payout and advances cycle - Emits PayoutExecuted event - Xoulomon#425: Implement group status management functions - pause_group(): Pause group, preventing contributions/payouts - resume_group(): Resume paused group - cancel_group(): Cancel group with fund returns - Validate state transitions - Emit GroupStatusChanged events - Xoulomon#426: Implement query functions - get_group_info(): Get complete group information - get_group_members(): Get all members - get_contribution_status(): Get cycle contribution status - get_payout_history_all(): Get all payout records - is_member_of_group(): Check membership - Xoulomon#427: Implement input validation functions - validate_address(): Validate address inputs - validate_amount(): Validate numeric amounts - validate_duration(): Validate cycle durations - validate_member_bounds(): Validate member count bounds - validate_string(): Validate string inputs - Updated GroupStatus enum with u32 conversion methods (as_u32, from_u32)
…xecution, status management, queries, and validation - Xoulomon#424 Tests: execute_payout success and error cases - Xoulomon#425 Tests: pause_group, resume_group, cancel_group with authorization and state validation - Xoulomon#426 Tests: get_group_info, get_group_members, get_contribution_status, get_payout_history_all, is_member_of_group - Xoulomon#427 Tests: validate_address, validate_amount, validate_duration, validate_member_bounds, validate_string - Additional tests for GroupStatus u32 conversion methods
|
@Hexstar-labs 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 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.
Smart Contract: Payout Execution, Status Management, Query Functions & Input Validation
Changes
#424 - Payout Execution
execute_payout(): Automated fund distribution with cycle validation, recipient identification, and payout recording#425 - Group Status Management
pause_group(): Pause group operationsresume_group(): Resume paused groupcancel_group(): Cancel group with state validation#426 - Query Functions
get_group_info(): Retrieve group dataget_group_members(): List all membersget_contribution_status(): Check cycle contributionsget_payout_history_all(): Get all payoutsis_member_of_group(): Verify membership#427 - Input Validation
validate_address(): Address validationvalidate_amount(): Amount validation (positive)validate_duration(): Duration validation (positive)validate_member_bounds(): Member count bounds (min >= 2, max >= min)validate_string(): String validation (non-empty, length limits)GroupStatus Enhancements
as_u32(): Convert status to u32from_u32(): Convert u32 to statusTesting
Files Changed
contracts/stellar-save/src/lib.rs(+429 lines)contracts/stellar-save/src/group.rs(+26 lines)Closes #424
Closes #425
Closes #426
Closes #427