Description
Clients currently query version() and have to map each version to known capabilities by hand. Add a capabilities(): u64 bitmap that names features (BatchClaim, TWAPOracle, SlashableMisbehavior, etc.) so clients can probe what is available without a version lookup table.
Requirements and Context
- Define
Capability constants in versioning.rs
- Emit
CapabilitiesUpdated event on upgrade
- Cover with a test that asserts every shipped feature flips its bit
- Must be secure, tested, and documented
- Should be efficient and easy to review
Suggested Execution
- Fork the repo and create a branch
git checkout -b feature/version-capability-bitmap
- Implement changes
contracts/predictify-hybrid/src/versioning.rs
contracts/predictify-hybrid/src/tests/capability_bitmap_tests.rs
- Test and commit
cargo test -p predictify-hybrid capability_bitmap
- Cover edge cases
- Include test output and notes in the PR
Example commit message
feat: expose capability bitmap via versioning::capabilities()
Acceptance Criteria
Guidelines
- Clear documentation and inline comments
- Real Soroban SDK idioms in any new helper code
- Timeframe: 96 hours
Description
Clients currently query
version()and have to map each version to known capabilities by hand. Add acapabilities(): u64bitmap that names features (BatchClaim, TWAPOracle, SlashableMisbehavior, etc.) so clients can probe what is available without a version lookup table.Requirements and Context
Capabilityconstants inversioning.rsCapabilitiesUpdatedevent on upgradeSuggested Execution
contracts/predictify-hybrid/src/versioning.rscontracts/predictify-hybrid/src/tests/capability_bitmap_tests.rscargo test -p predictify-hybrid capability_bitmapExample commit message
Acceptance Criteria
Guidelines