Skip to content
openzeppelin avatar

Upgrade Stellar Contracts

Upgrade-and-migrate guide for Soroban contracts built on OpenZeppelin's upgradeable module, covering access control and storage safety.

CCM score
74 of 100
skills.sh installs
289
GitHub stars
226
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the native WASM replacement model, Upgrade-only and upgrade-and-migrate paths, and the atomic Upgrader contract pattern
  • Explains the Upgradeable and UpgradeableMigratable derive macros, including the UpgradeableInternal and UpgradeableMigratableInternal methods to implement
  • Enforces storage compatibility rules: no removed or renamed keys, no changed value types, and explicit string keys since Soroban has no slot ordering
  • Designed for developers making Soroban contracts upgradeable, with a pre-upgrade testnet checklist for V1 to V2 state verification

Install

$ npx -y skills add openzeppelin/openzeppelin-skills --skill upgrade-stellar-contracts -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Stellar Upgrades

Contents

Soroban Upgrade Model

Soroban contracts are mutable by default. Mutability refers to the ability of a smart contract to modify its own WASM bytecode, altering its function interface, execution logic, or metadata. Soroban provides a built-in, protocol-level mechanism for contract upgrades — no proxy pattern is needed.

A contract can upgrade itself if it is explicitly designed to do so. Conversely, a contract becomes immutable simply by not provisioning any upgrade function. This is fundamentally different from EVM proxy patterns:

Details

Repository
github.com/openzeppelin/openzeppelin-skills
Categories
Web3 & Crypto, Backend & APIs, Security
First seen
Jun 3, 2026

Questions

What does the upgrade-stellar-contracts skill do?

It helps upgrade Stellar Soroban smart contracts using OpenZeppelin's upgradeable module. It covers native WASM replacement, the Upgradeable and UpgradeableMigratable derive macros, atomic upgrade-and-migrate patterns with an Upgrader contract, storage key compatibility, and testing upgrade paths.

How do I install the upgrade-stellar-contracts skill?

Run npx -y skills add openzeppelin/openzeppelin-skills --skill upgrade-stellar-contracts -y in your project. Once installed, the agent can guide you through making a Soroban contract upgradeable and safely migrating its storage.

When should I use Upgradeable versus UpgradeableMigratable?

Use Upgradeable when only the WASM binary needs replacing and no storage migration is required. Use UpgradeableMigratable when the WASM binary and specific storage entries must change during the upgrade, since it runs migration logic only after a successful upgrade.

Which skills lead the Web3 and Crypto category on Claude Marketplaces?

This skill sits in the Web3 and Crypto category alongside solana-dev, binance-agentic-wallet, okx-dex-market, gmgn-market and gmgn-token. It stands out by focusing specifically on upgrading Stellar Soroban contracts with OpenZeppelin's upgradeable module.

More from openzeppelin/openzeppelin-skills

All 5

Similar to Upgrade Stellar Contracts

More Web3 & Crypto