Problem
The vouching contract is missing two functions that every other contract has:
get_version() — returns current version symbol
upgrade() — admin-only WASM update
Contract impact: The vouching contract cannot be upgraded or version-checked. If a bug is found in the vouching logic, the contract must be replaced entirely (new deployment, new address), breaking all existing vouch references.
Before Starting
Read: context/architecture-context.md
Root Cause
The functions were omitted when the vouching contract was implemented.
What To Build
- Add
get_version(env: Env) -> Symbol returning e.g. symbol_short!("1_0_0")
- Add
upgrade(env: Env, admin: Address, new_wasm_hash: BytesN<32>) with auth and reentrancy guard
- Write tests for both functions
Files To Touch
contracts/vouching-contract/src/lib.rs — add get_version and upgrade
Acceptance Criteria
Mandatory Checks
Problem
The vouching contract is missing two functions that every other contract has:
get_version()— returns current version symbolupgrade()— admin-only WASM updateContract impact: The vouching contract cannot be upgraded or version-checked. If a bug is found in the vouching logic, the contract must be replaced entirely (new deployment, new address), breaking all existing vouch references.
Before Starting
Read: context/architecture-context.md
Root Cause
The functions were omitted when the vouching contract was implemented.
What To Build
get_version(env: Env) -> Symbolreturning e.g.symbol_short!("1_0_0")upgrade(env: Env, admin: Address, new_wasm_hash: BytesN<32>)with auth and reentrancy guardFiles To Touch
contracts/vouching-contract/src/lib.rs— add get_version and upgradeAcceptance Criteria
Mandatory Checks