Skip to content

feat: implement whitelist and blacklist for events and users #261

@greatest0fallt1me

Description

@greatest0fallt1me

Description:

Allow admin to maintain whitelists/blacklists (e.g., allowed/blocked users for betting, or allowed/blocked event creators) and enforce them in place_bet and create_event.

Requirements and Context:

  • Must be secure, tested, and documented
  • Should support user whitelist (only listed users can bet) or blacklist (listed users cannot bet)
  • Should support event-level or global list
  • Should allow admin to add/remove addresses
  • Should enforce in contract logic and emit clear errors
  • Must not break existing behavior when lists are empty/disabled

Suggested Execution:

  1. Fork the repo and create a branch

    git checkout -b feature/whitelist-blacklist
  2. Implement changes

    • Write contract: src/lib.rs (check list in place_bet/create_event)
    • Add list module: src/lists.rs (or storage helpers)
    • Update storage and events; add documentation and NatSpec-style comments
  3. Test and commit

    • Run tests; cover whitelist-only, blacklist-only, add/remove
    • Include test output and security notes

Example Commit Message:

feat: implement whitelist and blacklist for events and users

Guidelines:

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 72 hours

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions