Skip to content

feat: implement contract version and capability discovery for clients #331

@greatest0fallt1me

Description

@greatest0fallt1me

Description:

Expose contract version (e.g., semver string) and optional capability flags (e.g., supports_batch_bet, supports_multi_outcome) so that clients can adapt.

Requirements and Context:

  • Must be secure, tested, and documented
  • Should add version() -> String (or similar) returning e.g. "1.2.0"
  • Optional: add capabilities() -> Vec<Symbol> or struct listing supported features
  • Should be read-only and gas-cheap
  • Should document versioning policy and capability list
  • Must not change business logic

Suggested Execution:

  1. Fork the repo and create a branch

    git checkout -b feature/version-capability-discovery
  2. Implement changes

    • Write contract: src/lib.rs (add version, optionally capabilities)
    • Add version constant or module; add documentation and NatSpec-style comments
  3. Test and commit

    • Run tests; cover version and capabilities return correct values
    • Include test output

Example Commit Message:

feat: implement contract version and capability discovery for clients

Guidelines:

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

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