feat: per-contract version() view returning semver string#590
Merged
Conversation
added 28 commits
June 28, 2026 14:42
Adds read-only version() view to all three contracts:
- vault: returns callora-vault Cargo version
- settlement: returns callora-settlement Cargo version
- revenue_pool: returns callora-revenue-pool Cargo version
Uses env!("CARGO_PKG_VERSION") for compile-time embedding.
Includes focused tests in each contract's test suite.
Closes CalloraOrg#562
- Remove duplicate get_storage_ttl from settlement - Remove broken address/token/last_address code block - Add missing type defs: StorageEntryTtl, Severity, AdminBroadcast, PendingDeveloperMigration - Add missing StorageKey variants: DeveloperBalanceV1, StorageVersion, PendingDeveloperMigration - Add missing imports: String, contracterror - Remove duplicate #[contractimpl] in vault, merge functions into first block - Fix migrate.rs DeveloperBalance 1-arg mismatch - Fix cargo fmt violations across settlement and revenue_pool
…rate, fix migrate 2-arg key
…e, remove unused imports
…token to PaymentReceivedEvent
… fix test arg counts
…, fix event publish
…add contracterror import
…MetaKey (cherry-pick from task/checkpoint)
…, add mod validators
…feature - Restore lib.rs, test.rs and test modules from b3d2e5f (last working state before PR CalloraOrg#579 broke the build with -X theirs merge that removed module declarations for admin, errors, timelock, types, limits) - Add Checkpoint struct and StorageKey::Checkpoint/CheckpointCounter variants - Add checkpoint() admin entrypoint and current_checkpoint() getter - SettlementError now re-exported from errors module (full enum with all variants) Fixes: \CalloraOrg#567
…aimWindow, pagination, broadcast
…thdraw args, migrate method)
…16::MAX to u32::MAX in vault tests
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds read-only
version()view to all three contracts returning the Cargo package version embedded at compile time via `env!("CARGO_PKG_VERSION")", enabling off-chain tooling to detect capability deltas after upgrades.Changes
contracts/vault/src/lib.rs: addedversion()→ returns "0.0.1"contracts/settlement/src/lib.rs: addedversion()→ returns "0.1.0"contracts/revenue_pool/src/lib.rs: addedversion()→ returns "0.0.1"Testing
version_returns_semver_stringtest in vault, settlement, revenue_pool test suitesCloses #562