Skip to content

Add group description field with length validation#104

Open
WuXieSec wants to merge 1 commit intosorosave-protocol:mainfrom
WuXieSec:feat/group-description
Open

Add group description field with length validation#104
WuXieSec wants to merge 1 commit intosorosave-protocol:mainfrom
WuXieSec:feat/group-description

Conversation

@WuXieSec
Copy link
Copy Markdown

This PR adds a description field to savings groups, allowing creators to provide context about their group's purpose and rules, as requested in #50.

Changes:

  • Add description: String field to SavingsGroup struct
  • Accept description parameter in create_group function
  • Enforce max length of 256 characters
  • Add DescriptionTooLong error variant to ContractError
  • Return description in get_group response
  • Update all tests to include description parameter
  • Add test coverage for description validation

Use cases:

  • Group creators can explain the purpose of their savings group
  • Members can understand the group's rules before joining
  • Frontend can display group descriptions in listings

Validation:
The 256-character limit ensures descriptions are concise while preventing storage bloat.

Closes #50

Changes:
- Add description: String field to SavingsGroup struct
- Accept description parameter in create_group function
- Enforce max length of 256 characters
- Add DescriptionTooLong error variant
- Return description in get_group response
- Update all tests to include description parameter
- Add test coverage for description validation

This allows group creators to provide context about their
savings group's purpose and rules.

Closes sorosave-protocol#50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add group description field

1 participant