Skip to content

Add input validation for guild creation parameters #21

Description

@Gianfranco99

Description

The factory and contract constructors lack validation for input parameters, which could lead to guilds being created with invalid or malicious data.

Current Issues

  • Guild names can be empty or invalid
  • Token names and symbols have no length restrictions
  • Initial supply has no bounds checking
  • No validation of rank names

Proposed Solution

Add comprehensive input validation for:

  • Non-empty guild and rank names
  • Token name/symbol length limits
  • Reasonable initial supply bounds
  • Sanitization of user inputs

Files to Update

  • src/guild/factory.cairo
  • src/guild/contract.cairo

Acceptance Criteria

  • All inputs properly validated
  • Clear error messages for invalid inputs
  • Tests cover edge cases and invalid inputs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions