Skip to content

chore: document contract upgrade strategy - #307

Open
Rayyanah0 wants to merge 1 commit into
WHEELBACK:mainfrom
Rayyanah0:chore/add-contract-upgrade-migration-path-documentation
Open

chore: document contract upgrade strategy#307
Rayyanah0 wants to merge 1 commit into
WHEELBACK:mainfrom
Rayyanah0:chore/add-contract-upgrade-migration-path-documentation

Conversation

@Rayyanah0

Copy link
Copy Markdown

Summary

Add an Upgrades and Migrations section to docs/MAINNET_DEPLOYMENT.md documenting how invoice, treasury, and compliance contracts can be upgraded post-mainnet-deployment via Soroban's WASM hash update mechanism.

Changes

  • How WASM upgrades work — explains env.deployer().update_current_contract_wasm, the fact that the contract address is unchanged, and the SYSTEM event emitted on upgrade.
  • Upgrade procedure — step-by-step CLI commands for building artifacts, uploading new WASM, and invoking upgrade.
  • Upgrade authorization — documents the admin key requirement and which key applies to each contract.
  • Storage migration — versioned enum pattern with a lazy-vs-eager strategy comparison table; explains why naive approaches trap at the host level.
  • Upgrade abort conditions — mirrors the style of existing abort conditions.
  • Upgrade checklist — three-part checklist (pre-upgrade, execution, post-upgrade) consistent with the existing signing ceremony checklist style.

Testing

Documentation only. Markdownlint passes on docs/MAINNET_DEPLOYMENT.md with 0 issues.

Closes #193

Add 'Upgrades and Migrations' section to docs/MAINNET_DEPLOYMENT.md.

Covers:
- How Soroban WASM upgrades work (env.deployer().update_current_contract_wasm)
- Step-by-step upgrade procedure with stellar CLI commands
- Upgrade authorization (admin key requirement per contract)
- Storage migration patterns (versioned enum, lazy vs eager strategies)
- Upgrade abort conditions
- Three-part upgrade checklist (pre-upgrade, execution, post-upgrade)

Closes WHEELBACK#193
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Rayyanah0 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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 contract upgrade/migration path documentation

1 participant