Skip to content

feat: add farming pool wasm upgrade path#58

Open
jamilahmadzai wants to merge 1 commit into
SmartDropLabs:mainfrom
jamilahmadzai:codex/smartdrop-upgrade-entrypoint-23
Open

feat: add farming pool wasm upgrade path#58
jamilahmadzai wants to merge 1 commit into
SmartDropLabs:mainfrom
jamilahmadzai:codex/smartdrop-upgrade-entrypoint-23

Conversation

@jamilahmadzai

Copy link
Copy Markdown

Closes #23

Bounty: GrantFox OSS campaign for issue #23

Summary

  • add an admin-only upgrade(new_wasm_hash) entrypoint to farming-pool that emits the new hash and hot-swaps the current contract WASM
  • add SCHEMA_VERSION, schema_version, and an admin-gated migrate placeholder for future storage migrations
  • add factory upgrade_pool(pool_id, new_wasm_hash) for pool-by-pool upgrades without changing the factory default pool WASM hash
  • cover direct upgrade auth/state preservation and factory-mediated upgrade behavior in tests

Validation

  • cargo fmt --all -- --check
  • cargo build
  • cargo test -p farming-pool upgrade -- --nocapture
  • cargo test -p factory upgrade_pool -- --nocapture
  • cargo test -p farming-pool -- --nocapture
  • cargo test -p factory -- --nocapture
  • cargo test --workspace -- --nocapture
  • git diff --check

Notes

  • existing Soroban Events::publish deprecation warnings remain unchanged
  • factory upgrades are intentionally pool-specific and do not mutate stored WasmHash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add upgrade entrypoint to farming-pool for WASM hot-swap

1 participant