Complexity: Hard
Labels: contracts, soroban, storage, drips-wave, stellar-wave
Description: Track the contract version on-chain so deployed instances can be identified and upgrade history can be audited.
Requirements:
Store version: String (e.g. "1.0.0") in contract storage on initialize
get_version(env) — public, returns current version string
upgrade_version(env, new_version) — admin only
Emit ContractUpgraded event with old and new version
Version must follow semver format (validated on set)
Files to Update:
contracts/split-escrow/src/lib.rs
contracts/split-escrow/src/events.rs
Acceptance Criteria:
[ ] Version stored and returned correctly
[ ] Admin can update version
[ ] Non-admin update attempt fails
[ ] ContractUpgraded event emitted
[ ] Unit tests included
Estimated Time: 3-4 hours
Complexity: Hard
Labels: contracts, soroban, storage, drips-wave, stellar-wave
Description: Track the contract version on-chain so deployed instances can be identified and upgrade history can be audited.
Requirements:
Store version: String (e.g. "1.0.0") in contract storage on initialize
get_version(env) — public, returns current version string
upgrade_version(env, new_version) — admin only
Emit ContractUpgraded event with old and new version
Version must follow semver format (validated on set)
Files to Update:
contracts/split-escrow/src/lib.rs
contracts/split-escrow/src/events.rs
Acceptance Criteria:
[ ] Version stored and returned correctly
[ ] Admin can update version
[ ] Non-admin update attempt fails
[ ] ContractUpgraded event emitted
[ ] Unit tests included
Estimated Time: 3-4 hours