Skip to content

docs(tutorial): upgrade a contract with a storage migration - #165

Closed
khoap1220-hue wants to merge 1 commit into
soroworks:mainfrom
khoap1220-hue:tutorial-storage-migration
Closed

khoap1220-hue wants to merge 1 commit into
soroworks:mainfrom
khoap1220-hue:tutorial-storage-migration

Conversation

@khoap1220-hue

Copy link
Copy Markdown

Summary

  • Add tutorials/storage-migration.md showing a complete contract upgrade and storage migration workflow on Stellar testnet:
    • Deploy v1 storing Settings { fee_bps, paused } in Instance storage using soroforge deploy and verify with soroprobe simulate.
    • Show what fails (Error(Context, InvalidAction) / UnreachableCodeReached trap) when v2 adds max_batch: u32 to Settings without migrating stored data.
    • Provide both explicit one-shot migration (migrate(env, default_max_batch)) and lazy migration on read (SettingsV1 -> SettingsV2), upgrade with soroforge upgrade, and verify data survival with soroprobe simulate, soroprobe check, soroforge status, and soroforge history.
    • State all tested tool/SDK versions (soroforge v0.2.0, soroprobe v0.2.0, sorovault v0.2.0, soroban-sdk 22.0.8, stellar-cli 22.6.0) and link to Stellar's contract upgrade documentation.
  • Link tutorials/storage-migration.md from SUMMARY.md.

Verification

  • Verified relative links via bash .github/scripts/check-links.sh (all relative links resolve).
  • Verified .github/scripts/malware-scan.sh (no findings in 2 changed file(s)).

Closes #163

Add tutorials/storage-migration.md covering v1 deployment, unmigrated v2 trap behavior, explicit and lazy storage migration patterns, and verification with soroforge and soroprobe on testnet.

Closes soroworks#163
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.

docs(tutorial): upgrade a contract with a storage migration

1 participant