[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openzeppelin-upgrade-stellar-contracts":3,"mdc-ecwsfv-key":36,"related-org-openzeppelin-upgrade-stellar-contracts":1299,"related-repo-openzeppelin-upgrade-stellar-contracts":1427},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"upgrade-stellar-contracts","upgrade Stellar Soroban smart contracts","Upgrade Stellar\u002FSoroban smart contracts using OpenZeppelin's upgradeable module. Use when users need to: (1) make Soroban contracts upgradeable via native WASM replacement, (2) use Upgradeable or UpgradeableMigratable derive macros, (3) implement atomic upgrade-and-migrate patterns with an Upgrader contract, (4) ensure storage key compatibility across upgrades, or (5) test upgrade paths for Soroban contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"openzeppelin","OpenZeppelin","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenzeppelin.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Security","security","tag",{"name":17,"slug":18,"type":15},"Blockchain","blockchain",{"name":20,"slug":21,"type":15},"Migration","migration",{"name":23,"slug":24,"type":15},"Smart Contracts","smart-contracts",193,"https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fopenzeppelin-skills","2026-07-13T06:04:31.398663","AGPL-3.0-only",25,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"Agent skills for secure smart contract development with OpenZeppelin Contracts libraries","https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fopenzeppelin-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fupgrade-stellar-contracts","---\nname: upgrade-stellar-contracts\ndescription: \"Upgrade Stellar\u002FSoroban smart contracts using OpenZeppelin's upgradeable module. Use when users need to: (1) make Soroban contracts upgradeable via native WASM replacement, (2) use Upgradeable or UpgradeableMigratable derive macros, (3) implement atomic upgrade-and-migrate patterns with an Upgrader contract, (4) ensure storage key compatibility across upgrades, or (5) test upgrade paths for Soroban contracts.\"\nlicense: AGPL-3.0-only\nmetadata:\n  author: OpenZeppelin\n---\n\n# Stellar Upgrades\n\n## Contents\n\n- [Soroban Upgrade Model](#soroban-upgrade-model)\n- [Using the OpenZeppelin Upgradeable Module](#using-the-openzeppelin-upgradeable-module)\n- [Access Control](#access-control)\n- [Upgrade Safety](#upgrade-safety)\n\n## Soroban Upgrade Model\n\nSoroban 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.\n\nA 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:\n\n| | Soroban | EVM (proxy pattern) | Starknet |\n|---|---|---|---|\n| **Mechanism** | Native WASM bytecode replacement | Proxy `delegatecall`s to implementation contract | `replace_class_syscall` swaps class hash in-place |\n| **Proxy contract needed** | No — the contract upgrades itself | Yes — a proxy sits in front of the implementation | No — the contract upgrades itself |\n| **Storage location** | Belongs to the contract directly | Lives in the proxy, accessed via delegatecall | Belongs to the contract directly |\n| **Opt-in to immutability** | Don't expose an upgrade function | Don't deploy a proxy | Don't call the syscall |\n\nOne advantage of protocol-level upgradeability is a significantly reduced risk surface compared to platforms that require proxy contracts and delegatecall forwarding.\n\nThe new implementation only becomes effective **after the current invocation completes**. This means if migration logic is defined in the new implementation, it cannot execute within the same call as the upgrade. An auxiliary `Upgrader` contract can wrap both calls to achieve atomicity (see below).\n\n## Using the OpenZeppelin Upgradeable Module\n\nOpenZeppelin Stellar Soroban Contracts provides an `upgradeable` module in the `contract-utils` package with two main components:\n\n| Component | Use when |\n|-----------|----------|\n| **`Upgradeable`** | Only the WASM binary needs to be updated — no storage migration required |\n| **`UpgradeableMigratable`** | The WASM binary and specific storage entries need to be modified during the upgrade |\n\nThe recommended way to use these is through derive macros: `#[derive(Upgradeable)]` and `#[derive(UpgradeableMigratable)]`. These macros handle the implementation of necessary functions and set the crate version from `Cargo.toml` as the binary version in WASM metadata, aligning with SEP-49 guidelines.\n\n### Upgrade only\n\nDerive `Upgradeable` on the contract struct, then implement `UpgradeableInternal` with a single required method:\n\n- `_require_auth(e: &Env, operator: &Address)` — verify the operator is authorized to perform the upgrade (e.g., check against a stored owner address)\n\nThe `operator` parameter is the invoker of the upgrade function and can be used for role-based access control.\n\n### Upgrade and migrate\n\nDerive `UpgradeableMigratable` on the contract struct, then implement `UpgradeableMigratableInternal` with:\n\n- An associated `MigrationData` type defining the data passed to the migration function\n- `_require_auth(e, operator)` — same authorization check as above\n- `_migrate(e: &Env, data: &Self::MigrationData)` — perform storage modifications using the provided migration data\n\nThe derive macro ensures that migration can only be invoked **after** a successful upgrade, preventing state inconsistencies and storage corruption.\n\n### Atomic upgrade and migration\n\nBecause the new implementation only takes effect after the current invocation completes, migration logic in the new contract cannot run in the same call as the upgrade. An auxiliary `Upgrader` contract wraps both calls atomically:\n\n```rust\nuse soroban_sdk::{contract, contractimpl, symbol_short, Address, BytesN, Env, Val};\nuse stellar_contract_utils::upgradeable::UpgradeableClient;\n\n#[contract]\npub struct Upgrader;\n\n#[contractimpl]\nimpl Upgrader {\n    pub fn upgrade_and_migrate(\n        env: Env,\n        contract_address: Address,\n        operator: Address,\n        wasm_hash: BytesN\u003C32>,\n        migration_data: soroban_sdk::Vec\u003CVal>,\n    ) {\n        operator.require_auth();\n        let contract_client = UpgradeableClient::new(&env, &contract_address);\n        contract_client.upgrade(&wasm_hash, &operator);\n        env.invoke_contract::\u003C()>(\n            &contract_address,\n            &symbol_short!(\"migrate\"),\n            migration_data,\n        );\n    }\n}\n```\n\nGuard `upgrade_and_migrate` with proper access control (e.g., `Ownable` from the `access` package with `#[only_owner]`).\n\nIf a rollback is required, the contract can be upgraded to a newer version where rollback-specific logic is defined and performed as a migration.\n\n> **Examples:** See the `examples\u002F` directory of the [stellar-contracts repository](https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fstellar-contracts) for full working integration examples of both `Upgradeable` and `UpgradeableMigratable`, including the `Upgrader` pattern.\n\n## Access Control\n\nThe `upgradeable` module deliberately does **not** embed access control itself. You must define authorization in the `_require_auth` method of `UpgradeableInternal` or `UpgradeableMigratableInternal`. Forgetting this allows anyone to replace your contract's code.\n\nCommon access control options:\n- **Ownable** — single owner, simplest pattern (available in the `access` package)\n- **AccessControl \u002F RBAC** — role-based, finer granularity (available in the `access` package)\n- **Multisig or governance** — for production contracts managing significant value\n\n## Upgrade Safety\n\n### Caveats\n\nThe framework structures the upgrade flow but does **not** perform deeper checks:\n\n- The new contract's **constructor will not be invoked** — any initialization must happen via migration or a separate call\n- There is **no automatic check** that the new contract includes an upgrade mechanism — an upgrade to a contract without one permanently loses upgradeability\n- **Storage consistency is not verified** — the new contract may inadvertently introduce storage mismatches\n\n### Storage compatibility\n\nWhen replacing the WASM binary, existing storage is reinterpreted by the new code. Incompatible changes corrupt state:\n\n- **Do not remove or rename** existing storage keys\n- **Do not change the type** of values stored under existing keys\n- **Adding** new storage keys is safe\n- Soroban storage uses explicit string keys (e.g., `symbol_short!(\"OWNER\")`), so key naming is critical — unlike EVM sequential slots, there is no ordering dependency\n\n### Version tracking\n\nThe derive macros automatically extract the crate version from `Cargo.toml` and embed it as the binary version in the WASM metadata, following SEP-49. This enables on-chain version tracking and can be used to coordinate upgrade paths.\n\n### Testing upgrade paths\n\nBefore upgrading a production contract:\n\n- [ ] **Deploy V1** on a local Soroban testnet (e.g., `stellar-cli` with local network)\n- [ ] **Write state with V1**, upgrade to V2, and verify that all existing state reads correctly\n- [ ] **Verify new functionality** works as expected after the upgrade\n- [ ] **Confirm access control** — only authorized callers can invoke `upgrade`\n- [ ] **Check that V2 includes an upgrade mechanism** — otherwise upgradeability is permanently lost\n- [ ] **Verify storage key compatibility** — ensure no removals, renames, or type changes to existing keys\n- [ ] **Test atomic upgrade-and-migrate** using the `Upgrader` pattern if migration is needed\n- [ ] **Manual review** — there is no automated storage compatibility validation for Soroban; use the derive macros for safe upgrade scaffolding and rely on testnet testing\n",{"data":37,"body":39},{"name":4,"description":6,"license":28,"metadata":38},{"author":9},{"type":40,"children":41},"root",[42,51,58,100,105,126,131,284,289,309,314,335,397,426,433,453,467,480,486,504,542,554,560,572,809,846,851,903,908,948,953,998,1003,1009,1020,1057,1063,1068,1114,1120,1132,1138,1143,1293],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"stellar-upgrades",[48],{"type":49,"value":50},"text","Stellar Upgrades",{"type":43,"tag":52,"props":53,"children":55},"h2",{"id":54},"contents",[56],{"type":49,"value":57},"Contents",{"type":43,"tag":59,"props":60,"children":61},"ul",{},[62,73,82,91],{"type":43,"tag":63,"props":64,"children":65},"li",{},[66],{"type":43,"tag":67,"props":68,"children":70},"a",{"href":69},"#soroban-upgrade-model",[71],{"type":49,"value":72},"Soroban Upgrade Model",{"type":43,"tag":63,"props":74,"children":75},{},[76],{"type":43,"tag":67,"props":77,"children":79},{"href":78},"#using-the-openzeppelin-upgradeable-module",[80],{"type":49,"value":81},"Using the OpenZeppelin Upgradeable Module",{"type":43,"tag":63,"props":83,"children":84},{},[85],{"type":43,"tag":67,"props":86,"children":88},{"href":87},"#access-control",[89],{"type":49,"value":90},"Access Control",{"type":43,"tag":63,"props":92,"children":93},{},[94],{"type":43,"tag":67,"props":95,"children":97},{"href":96},"#upgrade-safety",[98],{"type":49,"value":99},"Upgrade Safety",{"type":43,"tag":52,"props":101,"children":103},{"id":102},"soroban-upgrade-model",[104],{"type":49,"value":72},{"type":43,"tag":106,"props":107,"children":108},"p",{},[109,111,117,119,124],{"type":49,"value":110},"Soroban contracts are ",{"type":43,"tag":112,"props":113,"children":114},"strong",{},[115],{"type":49,"value":116},"mutable by default",{"type":49,"value":118},". 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 ",{"type":43,"tag":112,"props":120,"children":121},{},[122],{"type":49,"value":123},"built-in, protocol-level mechanism",{"type":49,"value":125}," for contract upgrades — no proxy pattern is needed.",{"type":43,"tag":106,"props":127,"children":128},{},[129],{"type":49,"value":130},"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:",{"type":43,"tag":132,"props":133,"children":134},"table",{},[135,162],{"type":43,"tag":136,"props":137,"children":138},"thead",{},[139],{"type":43,"tag":140,"props":141,"children":142},"tr",{},[143,147,152,157],{"type":43,"tag":144,"props":145,"children":146},"th",{},[],{"type":43,"tag":144,"props":148,"children":149},{},[150],{"type":49,"value":151},"Soroban",{"type":43,"tag":144,"props":153,"children":154},{},[155],{"type":49,"value":156},"EVM (proxy pattern)",{"type":43,"tag":144,"props":158,"children":159},{},[160],{"type":49,"value":161},"Starknet",{"type":43,"tag":163,"props":164,"children":165},"tbody",{},[166,208,233,258],{"type":43,"tag":140,"props":167,"children":168},{},[169,178,183,197],{"type":43,"tag":170,"props":171,"children":172},"td",{},[173],{"type":43,"tag":112,"props":174,"children":175},{},[176],{"type":49,"value":177},"Mechanism",{"type":43,"tag":170,"props":179,"children":180},{},[181],{"type":49,"value":182},"Native WASM bytecode replacement",{"type":43,"tag":170,"props":184,"children":185},{},[186,188,195],{"type":49,"value":187},"Proxy ",{"type":43,"tag":189,"props":190,"children":192},"code",{"className":191},[],[193],{"type":49,"value":194},"delegatecall",{"type":49,"value":196},"s to implementation contract",{"type":43,"tag":170,"props":198,"children":199},{},[200,206],{"type":43,"tag":189,"props":201,"children":203},{"className":202},[],[204],{"type":49,"value":205},"replace_class_syscall",{"type":49,"value":207}," swaps class hash in-place",{"type":43,"tag":140,"props":209,"children":210},{},[211,219,224,229],{"type":43,"tag":170,"props":212,"children":213},{},[214],{"type":43,"tag":112,"props":215,"children":216},{},[217],{"type":49,"value":218},"Proxy contract needed",{"type":43,"tag":170,"props":220,"children":221},{},[222],{"type":49,"value":223},"No — the contract upgrades itself",{"type":43,"tag":170,"props":225,"children":226},{},[227],{"type":49,"value":228},"Yes — a proxy sits in front of the implementation",{"type":43,"tag":170,"props":230,"children":231},{},[232],{"type":49,"value":223},{"type":43,"tag":140,"props":234,"children":235},{},[236,244,249,254],{"type":43,"tag":170,"props":237,"children":238},{},[239],{"type":43,"tag":112,"props":240,"children":241},{},[242],{"type":49,"value":243},"Storage location",{"type":43,"tag":170,"props":245,"children":246},{},[247],{"type":49,"value":248},"Belongs to the contract directly",{"type":43,"tag":170,"props":250,"children":251},{},[252],{"type":49,"value":253},"Lives in the proxy, accessed via delegatecall",{"type":43,"tag":170,"props":255,"children":256},{},[257],{"type":49,"value":248},{"type":43,"tag":140,"props":259,"children":260},{},[261,269,274,279],{"type":43,"tag":170,"props":262,"children":263},{},[264],{"type":43,"tag":112,"props":265,"children":266},{},[267],{"type":49,"value":268},"Opt-in to immutability",{"type":43,"tag":170,"props":270,"children":271},{},[272],{"type":49,"value":273},"Don't expose an upgrade function",{"type":43,"tag":170,"props":275,"children":276},{},[277],{"type":49,"value":278},"Don't deploy a proxy",{"type":43,"tag":170,"props":280,"children":281},{},[282],{"type":49,"value":283},"Don't call the syscall",{"type":43,"tag":106,"props":285,"children":286},{},[287],{"type":49,"value":288},"One advantage of protocol-level upgradeability is a significantly reduced risk surface compared to platforms that require proxy contracts and delegatecall forwarding.",{"type":43,"tag":106,"props":290,"children":291},{},[292,294,299,301,307],{"type":49,"value":293},"The new implementation only becomes effective ",{"type":43,"tag":112,"props":295,"children":296},{},[297],{"type":49,"value":298},"after the current invocation completes",{"type":49,"value":300},". This means if migration logic is defined in the new implementation, it cannot execute within the same call as the upgrade. An auxiliary ",{"type":43,"tag":189,"props":302,"children":304},{"className":303},[],[305],{"type":49,"value":306},"Upgrader",{"type":49,"value":308}," contract can wrap both calls to achieve atomicity (see below).",{"type":43,"tag":52,"props":310,"children":312},{"id":311},"using-the-openzeppelin-upgradeable-module",[313],{"type":49,"value":81},{"type":43,"tag":106,"props":315,"children":316},{},[317,319,325,327,333],{"type":49,"value":318},"OpenZeppelin Stellar Soroban Contracts provides an ",{"type":43,"tag":189,"props":320,"children":322},{"className":321},[],[323],{"type":49,"value":324},"upgradeable",{"type":49,"value":326}," module in the ",{"type":43,"tag":189,"props":328,"children":330},{"className":329},[],[331],{"type":49,"value":332},"contract-utils",{"type":49,"value":334}," package with two main components:",{"type":43,"tag":132,"props":336,"children":337},{},[338,354],{"type":43,"tag":136,"props":339,"children":340},{},[341],{"type":43,"tag":140,"props":342,"children":343},{},[344,349],{"type":43,"tag":144,"props":345,"children":346},{},[347],{"type":49,"value":348},"Component",{"type":43,"tag":144,"props":350,"children":351},{},[352],{"type":49,"value":353},"Use when",{"type":43,"tag":163,"props":355,"children":356},{},[357,377],{"type":43,"tag":140,"props":358,"children":359},{},[360,372],{"type":43,"tag":170,"props":361,"children":362},{},[363],{"type":43,"tag":112,"props":364,"children":365},{},[366],{"type":43,"tag":189,"props":367,"children":369},{"className":368},[],[370],{"type":49,"value":371},"Upgradeable",{"type":43,"tag":170,"props":373,"children":374},{},[375],{"type":49,"value":376},"Only the WASM binary needs to be updated — no storage migration required",{"type":43,"tag":140,"props":378,"children":379},{},[380,392],{"type":43,"tag":170,"props":381,"children":382},{},[383],{"type":43,"tag":112,"props":384,"children":385},{},[386],{"type":43,"tag":189,"props":387,"children":389},{"className":388},[],[390],{"type":49,"value":391},"UpgradeableMigratable",{"type":43,"tag":170,"props":393,"children":394},{},[395],{"type":49,"value":396},"The WASM binary and specific storage entries need to be modified during the upgrade",{"type":43,"tag":106,"props":398,"children":399},{},[400,402,408,410,416,418,424],{"type":49,"value":401},"The recommended way to use these is through derive macros: ",{"type":43,"tag":189,"props":403,"children":405},{"className":404},[],[406],{"type":49,"value":407},"#[derive(Upgradeable)]",{"type":49,"value":409}," and ",{"type":43,"tag":189,"props":411,"children":413},{"className":412},[],[414],{"type":49,"value":415},"#[derive(UpgradeableMigratable)]",{"type":49,"value":417},". These macros handle the implementation of necessary functions and set the crate version from ",{"type":43,"tag":189,"props":419,"children":421},{"className":420},[],[422],{"type":49,"value":423},"Cargo.toml",{"type":49,"value":425}," as the binary version in WASM metadata, aligning with SEP-49 guidelines.",{"type":43,"tag":427,"props":428,"children":430},"h3",{"id":429},"upgrade-only",[431],{"type":49,"value":432},"Upgrade only",{"type":43,"tag":106,"props":434,"children":435},{},[436,438,443,445,451],{"type":49,"value":437},"Derive ",{"type":43,"tag":189,"props":439,"children":441},{"className":440},[],[442],{"type":49,"value":371},{"type":49,"value":444}," on the contract struct, then implement ",{"type":43,"tag":189,"props":446,"children":448},{"className":447},[],[449],{"type":49,"value":450},"UpgradeableInternal",{"type":49,"value":452}," with a single required method:",{"type":43,"tag":59,"props":454,"children":455},{},[456],{"type":43,"tag":63,"props":457,"children":458},{},[459,465],{"type":43,"tag":189,"props":460,"children":462},{"className":461},[],[463],{"type":49,"value":464},"_require_auth(e: &Env, operator: &Address)",{"type":49,"value":466}," — verify the operator is authorized to perform the upgrade (e.g., check against a stored owner address)",{"type":43,"tag":106,"props":468,"children":469},{},[470,472,478],{"type":49,"value":471},"The ",{"type":43,"tag":189,"props":473,"children":475},{"className":474},[],[476],{"type":49,"value":477},"operator",{"type":49,"value":479}," parameter is the invoker of the upgrade function and can be used for role-based access control.",{"type":43,"tag":427,"props":481,"children":483},{"id":482},"upgrade-and-migrate",[484],{"type":49,"value":485},"Upgrade and migrate",{"type":43,"tag":106,"props":487,"children":488},{},[489,490,495,496,502],{"type":49,"value":437},{"type":43,"tag":189,"props":491,"children":493},{"className":492},[],[494],{"type":49,"value":391},{"type":49,"value":444},{"type":43,"tag":189,"props":497,"children":499},{"className":498},[],[500],{"type":49,"value":501},"UpgradeableMigratableInternal",{"type":49,"value":503}," with:",{"type":43,"tag":59,"props":505,"children":506},{},[507,520,531],{"type":43,"tag":63,"props":508,"children":509},{},[510,512,518],{"type":49,"value":511},"An associated ",{"type":43,"tag":189,"props":513,"children":515},{"className":514},[],[516],{"type":49,"value":517},"MigrationData",{"type":49,"value":519}," type defining the data passed to the migration function",{"type":43,"tag":63,"props":521,"children":522},{},[523,529],{"type":43,"tag":189,"props":524,"children":526},{"className":525},[],[527],{"type":49,"value":528},"_require_auth(e, operator)",{"type":49,"value":530}," — same authorization check as above",{"type":43,"tag":63,"props":532,"children":533},{},[534,540],{"type":43,"tag":189,"props":535,"children":537},{"className":536},[],[538],{"type":49,"value":539},"_migrate(e: &Env, data: &Self::MigrationData)",{"type":49,"value":541}," — perform storage modifications using the provided migration data",{"type":43,"tag":106,"props":543,"children":544},{},[545,547,552],{"type":49,"value":546},"The derive macro ensures that migration can only be invoked ",{"type":43,"tag":112,"props":548,"children":549},{},[550],{"type":49,"value":551},"after",{"type":49,"value":553}," a successful upgrade, preventing state inconsistencies and storage corruption.",{"type":43,"tag":427,"props":555,"children":557},{"id":556},"atomic-upgrade-and-migration",[558],{"type":49,"value":559},"Atomic upgrade and migration",{"type":43,"tag":106,"props":561,"children":562},{},[563,565,570],{"type":49,"value":564},"Because the new implementation only takes effect after the current invocation completes, migration logic in the new contract cannot run in the same call as the upgrade. An auxiliary ",{"type":43,"tag":189,"props":566,"children":568},{"className":567},[],[569],{"type":49,"value":306},{"type":49,"value":571}," contract wraps both calls atomically:",{"type":43,"tag":573,"props":574,"children":579},"pre",{"className":575,"code":576,"language":577,"meta":578,"style":578},"language-rust shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use soroban_sdk::{contract, contractimpl, symbol_short, Address, BytesN, Env, Val};\nuse stellar_contract_utils::upgradeable::UpgradeableClient;\n\n#[contract]\npub struct Upgrader;\n\n#[contractimpl]\nimpl Upgrader {\n    pub fn upgrade_and_migrate(\n        env: Env,\n        contract_address: Address,\n        operator: Address,\n        wasm_hash: BytesN\u003C32>,\n        migration_data: soroban_sdk::Vec\u003CVal>,\n    ) {\n        operator.require_auth();\n        let contract_client = UpgradeableClient::new(&env, &contract_address);\n        contract_client.upgrade(&wasm_hash, &operator);\n        env.invoke_contract::\u003C()>(\n            &contract_address,\n            &symbol_short!(\"migrate\"),\n            migration_data,\n        );\n    }\n}\n","rust","",[580],{"type":43,"tag":189,"props":581,"children":582},{"__ignoreMap":578},[583,594,603,613,622,631,639,648,657,666,675,684,693,702,711,720,729,738,747,756,765,774,783,792,801],{"type":43,"tag":584,"props":585,"children":588},"span",{"class":586,"line":587},"line",1,[589],{"type":43,"tag":584,"props":590,"children":591},{},[592],{"type":49,"value":593},"use soroban_sdk::{contract, contractimpl, symbol_short, Address, BytesN, Env, Val};\n",{"type":43,"tag":584,"props":595,"children":597},{"class":586,"line":596},2,[598],{"type":43,"tag":584,"props":599,"children":600},{},[601],{"type":49,"value":602},"use stellar_contract_utils::upgradeable::UpgradeableClient;\n",{"type":43,"tag":584,"props":604,"children":606},{"class":586,"line":605},3,[607],{"type":43,"tag":584,"props":608,"children":610},{"emptyLinePlaceholder":609},true,[611],{"type":49,"value":612},"\n",{"type":43,"tag":584,"props":614,"children":616},{"class":586,"line":615},4,[617],{"type":43,"tag":584,"props":618,"children":619},{},[620],{"type":49,"value":621},"#[contract]\n",{"type":43,"tag":584,"props":623,"children":625},{"class":586,"line":624},5,[626],{"type":43,"tag":584,"props":627,"children":628},{},[629],{"type":49,"value":630},"pub struct Upgrader;\n",{"type":43,"tag":584,"props":632,"children":634},{"class":586,"line":633},6,[635],{"type":43,"tag":584,"props":636,"children":637},{"emptyLinePlaceholder":609},[638],{"type":49,"value":612},{"type":43,"tag":584,"props":640,"children":642},{"class":586,"line":641},7,[643],{"type":43,"tag":584,"props":644,"children":645},{},[646],{"type":49,"value":647},"#[contractimpl]\n",{"type":43,"tag":584,"props":649,"children":651},{"class":586,"line":650},8,[652],{"type":43,"tag":584,"props":653,"children":654},{},[655],{"type":49,"value":656},"impl Upgrader {\n",{"type":43,"tag":584,"props":658,"children":660},{"class":586,"line":659},9,[661],{"type":43,"tag":584,"props":662,"children":663},{},[664],{"type":49,"value":665},"    pub fn upgrade_and_migrate(\n",{"type":43,"tag":584,"props":667,"children":669},{"class":586,"line":668},10,[670],{"type":43,"tag":584,"props":671,"children":672},{},[673],{"type":49,"value":674},"        env: Env,\n",{"type":43,"tag":584,"props":676,"children":678},{"class":586,"line":677},11,[679],{"type":43,"tag":584,"props":680,"children":681},{},[682],{"type":49,"value":683},"        contract_address: Address,\n",{"type":43,"tag":584,"props":685,"children":687},{"class":586,"line":686},12,[688],{"type":43,"tag":584,"props":689,"children":690},{},[691],{"type":49,"value":692},"        operator: Address,\n",{"type":43,"tag":584,"props":694,"children":696},{"class":586,"line":695},13,[697],{"type":43,"tag":584,"props":698,"children":699},{},[700],{"type":49,"value":701},"        wasm_hash: BytesN\u003C32>,\n",{"type":43,"tag":584,"props":703,"children":705},{"class":586,"line":704},14,[706],{"type":43,"tag":584,"props":707,"children":708},{},[709],{"type":49,"value":710},"        migration_data: soroban_sdk::Vec\u003CVal>,\n",{"type":43,"tag":584,"props":712,"children":714},{"class":586,"line":713},15,[715],{"type":43,"tag":584,"props":716,"children":717},{},[718],{"type":49,"value":719},"    ) {\n",{"type":43,"tag":584,"props":721,"children":723},{"class":586,"line":722},16,[724],{"type":43,"tag":584,"props":725,"children":726},{},[727],{"type":49,"value":728},"        operator.require_auth();\n",{"type":43,"tag":584,"props":730,"children":732},{"class":586,"line":731},17,[733],{"type":43,"tag":584,"props":734,"children":735},{},[736],{"type":49,"value":737},"        let contract_client = UpgradeableClient::new(&env, &contract_address);\n",{"type":43,"tag":584,"props":739,"children":741},{"class":586,"line":740},18,[742],{"type":43,"tag":584,"props":743,"children":744},{},[745],{"type":49,"value":746},"        contract_client.upgrade(&wasm_hash, &operator);\n",{"type":43,"tag":584,"props":748,"children":750},{"class":586,"line":749},19,[751],{"type":43,"tag":584,"props":752,"children":753},{},[754],{"type":49,"value":755},"        env.invoke_contract::\u003C()>(\n",{"type":43,"tag":584,"props":757,"children":759},{"class":586,"line":758},20,[760],{"type":43,"tag":584,"props":761,"children":762},{},[763],{"type":49,"value":764},"            &contract_address,\n",{"type":43,"tag":584,"props":766,"children":768},{"class":586,"line":767},21,[769],{"type":43,"tag":584,"props":770,"children":771},{},[772],{"type":49,"value":773},"            &symbol_short!(\"migrate\"),\n",{"type":43,"tag":584,"props":775,"children":777},{"class":586,"line":776},22,[778],{"type":43,"tag":584,"props":779,"children":780},{},[781],{"type":49,"value":782},"            migration_data,\n",{"type":43,"tag":584,"props":784,"children":786},{"class":586,"line":785},23,[787],{"type":43,"tag":584,"props":788,"children":789},{},[790],{"type":49,"value":791},"        );\n",{"type":43,"tag":584,"props":793,"children":795},{"class":586,"line":794},24,[796],{"type":43,"tag":584,"props":797,"children":798},{},[799],{"type":49,"value":800},"    }\n",{"type":43,"tag":584,"props":802,"children":803},{"class":586,"line":29},[804],{"type":43,"tag":584,"props":805,"children":806},{},[807],{"type":49,"value":808},"}\n",{"type":43,"tag":106,"props":810,"children":811},{},[812,814,820,822,828,830,836,838,844],{"type":49,"value":813},"Guard ",{"type":43,"tag":189,"props":815,"children":817},{"className":816},[],[818],{"type":49,"value":819},"upgrade_and_migrate",{"type":49,"value":821}," with proper access control (e.g., ",{"type":43,"tag":189,"props":823,"children":825},{"className":824},[],[826],{"type":49,"value":827},"Ownable",{"type":49,"value":829}," from the ",{"type":43,"tag":189,"props":831,"children":833},{"className":832},[],[834],{"type":49,"value":835},"access",{"type":49,"value":837}," package with ",{"type":43,"tag":189,"props":839,"children":841},{"className":840},[],[842],{"type":49,"value":843},"#[only_owner]",{"type":49,"value":845},").",{"type":43,"tag":106,"props":847,"children":848},{},[849],{"type":49,"value":850},"If a rollback is required, the contract can be upgraded to a newer version where rollback-specific logic is defined and performed as a migration.",{"type":43,"tag":852,"props":853,"children":854},"blockquote",{},[855],{"type":43,"tag":106,"props":856,"children":857},{},[858,863,865,871,873,881,883,888,889,894,896,901],{"type":43,"tag":112,"props":859,"children":860},{},[861],{"type":49,"value":862},"Examples:",{"type":49,"value":864}," See the ",{"type":43,"tag":189,"props":866,"children":868},{"className":867},[],[869],{"type":49,"value":870},"examples\u002F",{"type":49,"value":872}," directory of the ",{"type":43,"tag":67,"props":874,"children":878},{"href":875,"rel":876},"https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fstellar-contracts",[877],"nofollow",[879],{"type":49,"value":880},"stellar-contracts repository",{"type":49,"value":882}," for full working integration examples of both ",{"type":43,"tag":189,"props":884,"children":886},{"className":885},[],[887],{"type":49,"value":371},{"type":49,"value":409},{"type":43,"tag":189,"props":890,"children":892},{"className":891},[],[893],{"type":49,"value":391},{"type":49,"value":895},", including the ",{"type":43,"tag":189,"props":897,"children":899},{"className":898},[],[900],{"type":49,"value":306},{"type":49,"value":902}," pattern.",{"type":43,"tag":52,"props":904,"children":906},{"id":905},"access-control",[907],{"type":49,"value":90},{"type":43,"tag":106,"props":909,"children":910},{},[911,912,917,919,924,926,932,934,939,941,946],{"type":49,"value":471},{"type":43,"tag":189,"props":913,"children":915},{"className":914},[],[916],{"type":49,"value":324},{"type":49,"value":918}," module deliberately does ",{"type":43,"tag":112,"props":920,"children":921},{},[922],{"type":49,"value":923},"not",{"type":49,"value":925}," embed access control itself. You must define authorization in the ",{"type":43,"tag":189,"props":927,"children":929},{"className":928},[],[930],{"type":49,"value":931},"_require_auth",{"type":49,"value":933}," method of ",{"type":43,"tag":189,"props":935,"children":937},{"className":936},[],[938],{"type":49,"value":450},{"type":49,"value":940}," or ",{"type":43,"tag":189,"props":942,"children":944},{"className":943},[],[945],{"type":49,"value":501},{"type":49,"value":947},". Forgetting this allows anyone to replace your contract's code.",{"type":43,"tag":106,"props":949,"children":950},{},[951],{"type":49,"value":952},"Common access control options:",{"type":43,"tag":59,"props":954,"children":955},{},[956,972,988],{"type":43,"tag":63,"props":957,"children":958},{},[959,963,965,970],{"type":43,"tag":112,"props":960,"children":961},{},[962],{"type":49,"value":827},{"type":49,"value":964}," — single owner, simplest pattern (available in the ",{"type":43,"tag":189,"props":966,"children":968},{"className":967},[],[969],{"type":49,"value":835},{"type":49,"value":971}," package)",{"type":43,"tag":63,"props":973,"children":974},{},[975,980,982,987],{"type":43,"tag":112,"props":976,"children":977},{},[978],{"type":49,"value":979},"AccessControl \u002F RBAC",{"type":49,"value":981}," — role-based, finer granularity (available in the ",{"type":43,"tag":189,"props":983,"children":985},{"className":984},[],[986],{"type":49,"value":835},{"type":49,"value":971},{"type":43,"tag":63,"props":989,"children":990},{},[991,996],{"type":43,"tag":112,"props":992,"children":993},{},[994],{"type":49,"value":995},"Multisig or governance",{"type":49,"value":997}," — for production contracts managing significant value",{"type":43,"tag":52,"props":999,"children":1001},{"id":1000},"upgrade-safety",[1002],{"type":49,"value":99},{"type":43,"tag":427,"props":1004,"children":1006},{"id":1005},"caveats",[1007],{"type":49,"value":1008},"Caveats",{"type":43,"tag":106,"props":1010,"children":1011},{},[1012,1014,1018],{"type":49,"value":1013},"The framework structures the upgrade flow but does ",{"type":43,"tag":112,"props":1015,"children":1016},{},[1017],{"type":49,"value":923},{"type":49,"value":1019}," perform deeper checks:",{"type":43,"tag":59,"props":1021,"children":1022},{},[1023,1035,1047],{"type":43,"tag":63,"props":1024,"children":1025},{},[1026,1028,1033],{"type":49,"value":1027},"The new contract's ",{"type":43,"tag":112,"props":1029,"children":1030},{},[1031],{"type":49,"value":1032},"constructor will not be invoked",{"type":49,"value":1034}," — any initialization must happen via migration or a separate call",{"type":43,"tag":63,"props":1036,"children":1037},{},[1038,1040,1045],{"type":49,"value":1039},"There is ",{"type":43,"tag":112,"props":1041,"children":1042},{},[1043],{"type":49,"value":1044},"no automatic check",{"type":49,"value":1046}," that the new contract includes an upgrade mechanism — an upgrade to a contract without one permanently loses upgradeability",{"type":43,"tag":63,"props":1048,"children":1049},{},[1050,1055],{"type":43,"tag":112,"props":1051,"children":1052},{},[1053],{"type":49,"value":1054},"Storage consistency is not verified",{"type":49,"value":1056}," — the new contract may inadvertently introduce storage mismatches",{"type":43,"tag":427,"props":1058,"children":1060},{"id":1059},"storage-compatibility",[1061],{"type":49,"value":1062},"Storage compatibility",{"type":43,"tag":106,"props":1064,"children":1065},{},[1066],{"type":49,"value":1067},"When replacing the WASM binary, existing storage is reinterpreted by the new code. Incompatible changes corrupt state:",{"type":43,"tag":59,"props":1069,"children":1070},{},[1071,1081,1091,1101],{"type":43,"tag":63,"props":1072,"children":1073},{},[1074,1079],{"type":43,"tag":112,"props":1075,"children":1076},{},[1077],{"type":49,"value":1078},"Do not remove or rename",{"type":49,"value":1080}," existing storage keys",{"type":43,"tag":63,"props":1082,"children":1083},{},[1084,1089],{"type":43,"tag":112,"props":1085,"children":1086},{},[1087],{"type":49,"value":1088},"Do not change the type",{"type":49,"value":1090}," of values stored under existing keys",{"type":43,"tag":63,"props":1092,"children":1093},{},[1094,1099],{"type":43,"tag":112,"props":1095,"children":1096},{},[1097],{"type":49,"value":1098},"Adding",{"type":49,"value":1100}," new storage keys is safe",{"type":43,"tag":63,"props":1102,"children":1103},{},[1104,1106,1112],{"type":49,"value":1105},"Soroban storage uses explicit string keys (e.g., ",{"type":43,"tag":189,"props":1107,"children":1109},{"className":1108},[],[1110],{"type":49,"value":1111},"symbol_short!(\"OWNER\")",{"type":49,"value":1113},"), so key naming is critical — unlike EVM sequential slots, there is no ordering dependency",{"type":43,"tag":427,"props":1115,"children":1117},{"id":1116},"version-tracking",[1118],{"type":49,"value":1119},"Version tracking",{"type":43,"tag":106,"props":1121,"children":1122},{},[1123,1125,1130],{"type":49,"value":1124},"The derive macros automatically extract the crate version from ",{"type":43,"tag":189,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":49,"value":423},{"type":49,"value":1131}," and embed it as the binary version in the WASM metadata, following SEP-49. This enables on-chain version tracking and can be used to coordinate upgrade paths.",{"type":43,"tag":427,"props":1133,"children":1135},{"id":1134},"testing-upgrade-paths",[1136],{"type":49,"value":1137},"Testing upgrade paths",{"type":43,"tag":106,"props":1139,"children":1140},{},[1141],{"type":49,"value":1142},"Before upgrading a production contract:",{"type":43,"tag":59,"props":1144,"children":1147},{"className":1145},[1146],"contains-task-list",[1148,1175,1190,1205,1226,1241,1256,1278],{"type":43,"tag":63,"props":1149,"children":1152},{"className":1150},[1151],"task-list-item",[1153,1158,1160,1165,1167,1173],{"type":43,"tag":1154,"props":1155,"children":1157},"input",{"disabled":609,"type":1156},"checkbox",[],{"type":49,"value":1159}," ",{"type":43,"tag":112,"props":1161,"children":1162},{},[1163],{"type":49,"value":1164},"Deploy V1",{"type":49,"value":1166}," on a local Soroban testnet (e.g., ",{"type":43,"tag":189,"props":1168,"children":1170},{"className":1169},[],[1171],{"type":49,"value":1172},"stellar-cli",{"type":49,"value":1174}," with local network)",{"type":43,"tag":63,"props":1176,"children":1178},{"className":1177},[1151],[1179,1182,1183,1188],{"type":43,"tag":1154,"props":1180,"children":1181},{"disabled":609,"type":1156},[],{"type":49,"value":1159},{"type":43,"tag":112,"props":1184,"children":1185},{},[1186],{"type":49,"value":1187},"Write state with V1",{"type":49,"value":1189},", upgrade to V2, and verify that all existing state reads correctly",{"type":43,"tag":63,"props":1191,"children":1193},{"className":1192},[1151],[1194,1197,1198,1203],{"type":43,"tag":1154,"props":1195,"children":1196},{"disabled":609,"type":1156},[],{"type":49,"value":1159},{"type":43,"tag":112,"props":1199,"children":1200},{},[1201],{"type":49,"value":1202},"Verify new functionality",{"type":49,"value":1204}," works as expected after the upgrade",{"type":43,"tag":63,"props":1206,"children":1208},{"className":1207},[1151],[1209,1212,1213,1218,1220],{"type":43,"tag":1154,"props":1210,"children":1211},{"disabled":609,"type":1156},[],{"type":49,"value":1159},{"type":43,"tag":112,"props":1214,"children":1215},{},[1216],{"type":49,"value":1217},"Confirm access control",{"type":49,"value":1219}," — only authorized callers can invoke ",{"type":43,"tag":189,"props":1221,"children":1223},{"className":1222},[],[1224],{"type":49,"value":1225},"upgrade",{"type":43,"tag":63,"props":1227,"children":1229},{"className":1228},[1151],[1230,1233,1234,1239],{"type":43,"tag":1154,"props":1231,"children":1232},{"disabled":609,"type":1156},[],{"type":49,"value":1159},{"type":43,"tag":112,"props":1235,"children":1236},{},[1237],{"type":49,"value":1238},"Check that V2 includes an upgrade mechanism",{"type":49,"value":1240}," — otherwise upgradeability is permanently lost",{"type":43,"tag":63,"props":1242,"children":1244},{"className":1243},[1151],[1245,1248,1249,1254],{"type":43,"tag":1154,"props":1246,"children":1247},{"disabled":609,"type":1156},[],{"type":49,"value":1159},{"type":43,"tag":112,"props":1250,"children":1251},{},[1252],{"type":49,"value":1253},"Verify storage key compatibility",{"type":49,"value":1255}," — ensure no removals, renames, or type changes to existing keys",{"type":43,"tag":63,"props":1257,"children":1259},{"className":1258},[1151],[1260,1263,1264,1269,1271,1276],{"type":43,"tag":1154,"props":1261,"children":1262},{"disabled":609,"type":1156},[],{"type":49,"value":1159},{"type":43,"tag":112,"props":1265,"children":1266},{},[1267],{"type":49,"value":1268},"Test atomic upgrade-and-migrate",{"type":49,"value":1270}," using the ",{"type":43,"tag":189,"props":1272,"children":1274},{"className":1273},[],[1275],{"type":49,"value":306},{"type":49,"value":1277}," pattern if migration is needed",{"type":43,"tag":63,"props":1279,"children":1281},{"className":1280},[1151],[1282,1285,1286,1291],{"type":43,"tag":1154,"props":1283,"children":1284},{"disabled":609,"type":1156},[],{"type":49,"value":1159},{"type":43,"tag":112,"props":1287,"children":1288},{},[1289],{"type":49,"value":1290},"Manual review",{"type":49,"value":1292}," — there is no automated storage compatibility validation for Soroban; use the derive macros for safe upgrade scaffolding and rely on testnet testing",{"type":43,"tag":1294,"props":1295,"children":1296},"style",{},[1297],{"type":49,"value":1298},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1300,"total":677},[1301,1314,1328,1342,1355,1365,1375,1388,1398,1409,1416],{"slug":1302,"name":1302,"fn":1303,"description":1304,"org":1305,"tags":1306,"stars":25,"repoUrl":26,"updatedAt":1313},"develop-secure-contracts","develop secure smart contracts with OpenZeppelin","Develop secure smart contracts using OpenZeppelin Contracts libraries. Use when users need to integrate OpenZeppelin library components — including token standards (ERC20, ERC721, ERC1155), access control (Ownable, AccessControl, AccessManager), security primitives (Pausable, ReentrancyGuard), governance (Governor, timelocks), or accounts (multisig, account abstraction) — into existing or new contracts. Covers pattern discovery from library source, CLI contract generators, and library-first integration. Supports Solidity, Cairo, Stylus, Stellar, and Sui Move.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1307,1308,1309,1310],{"name":90,"slug":905,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"name":1311,"slug":1312,"type":15},"Solidity","solidity","2026-07-13T06:04:32.666273",{"slug":1315,"name":1315,"fn":1316,"description":1317,"org":1318,"tags":1319,"stars":25,"repoUrl":26,"updatedAt":1327},"review-sui-contracts","review Sui Move smart contracts","Review Sui Move code that integrates OpenZeppelin Contracts for Sui against the library's own patterns and conventions. Use this when a developer wants their integration checked before shipping. Triggers: \"review my Sui Move code\", \"am I using OpenZeppelin correctly\", \"check this integration\", \"is this idiomatic\", \"review before audit\". Checks correct use of OZ primitives, deviations from examples\u002Fdoc-comments, upheld invariants, test coverage, and code-quality\u002Fstyle. This is an AI code review, not a formal security audit.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1320,1321,1324,1326],{"name":17,"slug":18,"type":15},{"name":1322,"slug":1323,"type":15},"Code Review","code-review",{"name":1325,"slug":577,"type":15},"Rust",{"name":23,"slug":24,"type":15},"2026-07-16T06:00:49.17387",{"slug":1329,"name":1329,"fn":1330,"description":1331,"org":1332,"tags":1333,"stars":25,"repoUrl":26,"updatedAt":1341},"setup-cairo-contracts","set up Cairo smart contract projects","Set up a Cairo smart contract project with OpenZeppelin Contracts for Cairo on Starknet. Use when users need to: (1) create a new Scarb\u002FStarknet project, (2) add OpenZeppelin Contracts for Cairo dependencies to Scarb.toml, (3) configure individual or umbrella OpenZeppelin packages, or (4) understand Cairo import conventions and component patterns for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1334,1337,1338],{"name":1335,"slug":1336,"type":15},"Engineering","engineering",{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},"Web3","web3","2026-07-13T06:04:17.186825",{"slug":1343,"name":1343,"fn":1344,"description":1345,"org":1346,"tags":1347,"stars":25,"repoUrl":26,"updatedAt":1354},"setup-solidity-contracts","set up Solidity smart contract projects","Set up a Solidity smart contract project with OpenZeppelin Contracts. Use when users need to: (1) create a new Hardhat or Foundry project, (2) install OpenZeppelin Contracts dependencies for Solidity, (3) configure remappings for Foundry, or (4) understand Solidity import conventions for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1348,1349,1352,1353],{"name":1335,"slug":1336,"type":15},{"name":1350,"slug":1351,"type":15},"Foundry","foundry",{"name":23,"slug":24,"type":15},{"name":1311,"slug":1312,"type":15},"2026-07-13T06:04:29.360325",{"slug":1356,"name":1356,"fn":1357,"description":1358,"org":1359,"tags":1360,"stars":25,"repoUrl":26,"updatedAt":1364},"setup-stellar-contracts","set up Stellar Soroban smart contract projects","Set up a Stellar\u002FSoroban smart contract project with OpenZeppelin Contracts for Stellar. Use when users need to: (1) install Stellar CLI and Rust toolchain for Soroban, (2) create a new Soroban project, (3) add OpenZeppelin Stellar dependencies to Cargo.toml, or (4) understand Soroban import conventions and contract patterns for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1361,1362,1363],{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},"2026-07-13T06:04:23.807685",{"slug":1366,"name":1366,"fn":1367,"description":1368,"org":1369,"tags":1370,"stars":25,"repoUrl":26,"updatedAt":1374},"setup-stylus-contracts","set up Stylus smart contract projects","Set up a Stylus smart contract project with OpenZeppelin Contracts for Stylus on Arbitrum. Use when users need to: (1) install Rust toolchain and WASM target for Stylus, (2) create a new Cargo Stylus project, (3) add OpenZeppelin Stylus dependencies to Cargo.toml, or (4) understand Stylus import conventions and storage patterns for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1371,1372,1373],{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},"2026-07-13T06:04:18.638516",{"slug":1376,"name":1376,"fn":1377,"description":1378,"org":1379,"tags":1380,"stars":25,"repoUrl":26,"updatedAt":1387},"setup-sui-contracts","set up Sui Move smart contracts","Set up a Sui Move smart contract project with OpenZeppelin Contracts for Sui. Use when users need to: (1) install the Sui CLI and Move toolchain, (2) create a new Sui Move package, (3) discover and add OpenZeppelin Sui dependencies to Move.toml via the Move Registry (MVR), (4) learn the integration pattern from the library's examples and API docs before implementing, or (5) understand Sui Move import conventions and build\u002Ftest commands for OpenZeppelin.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1381,1382,1385,1386],{"name":17,"slug":18,"type":15},{"name":1383,"slug":1384,"type":15},"CLI","cli",{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15},"2026-07-16T05:59:21.671811",{"slug":1389,"name":1389,"fn":1390,"description":1391,"org":1392,"tags":1393,"stars":25,"repoUrl":26,"updatedAt":1397},"upgrade-cairo-contracts","upgrade Cairo smart contracts on Starknet","Upgrade Cairo smart contracts using OpenZeppelin's UpgradeableComponent on Starknet. Use when users need to: (1) make Cairo contracts upgradeable via replace_class_syscall, (2) integrate the OpenZeppelin UpgradeableComponent, (3) understand Starknet's class-based upgrade model vs EVM proxy patterns, (4) ensure storage compatibility across upgrades, (5) guard upgrade functions with access control, or (6) test upgrade paths for Cairo contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1394,1395,1396],{"name":20,"slug":21,"type":15},{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},"2026-07-13T06:04:25.126377",{"slug":1399,"name":1399,"fn":1400,"description":1401,"org":1402,"tags":1403,"stars":25,"repoUrl":26,"updatedAt":1408},"upgrade-solidity-contracts","upgrade Solidity smart contracts with proxies","Upgrade Solidity smart contracts using OpenZeppelin proxy patterns. Use when users need to: (1) make contracts upgradeable with UUPS, Transparent, or Beacon proxies, (2) write initializers instead of constructors, (3) use the Hardhat or Foundry upgrades plugins, (4) understand storage layout rules and ERC-7201 namespaced storage, (5) validate upgrade safety, (6) manage proxy deployments and upgrades, or (7) understand upgrade restrictions between OpenZeppelin Contracts major versions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1404,1405,1406,1407],{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"name":1311,"slug":1312,"type":15},"2026-07-13T06:04:20.958319",{"slug":4,"name":4,"fn":5,"description":6,"org":1410,"tags":1411,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1412,1413,1414,1415],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"slug":1417,"name":1417,"fn":1418,"description":1419,"org":1420,"tags":1421,"stars":25,"repoUrl":26,"updatedAt":1426},"upgrade-stylus-contracts","upgrade Stylus smart contracts","Upgrade Stylus smart contracts using OpenZeppelin proxy patterns on Arbitrum. Use when users need to: (1) make Stylus Rust contracts upgradeable with UUPS or Beacon proxies, (2) understand Stylus-specific proxy mechanics (logic_flag, WASM reactivation), (3) integrate UUPSUpgradeable with access control, (4) ensure storage compatibility across upgrades, or (5) test upgrade paths for Stylus contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1422,1423,1424,1425],{"name":20,"slug":21,"type":15},{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},"2026-07-13T06:04:28.005287",{"items":1428,"total":677},[1429,1436,1443,1449,1456,1462,1468],{"slug":1302,"name":1302,"fn":1303,"description":1304,"org":1430,"tags":1431,"stars":25,"repoUrl":26,"updatedAt":1313},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1432,1433,1434,1435],{"name":90,"slug":905,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"name":1311,"slug":1312,"type":15},{"slug":1315,"name":1315,"fn":1316,"description":1317,"org":1437,"tags":1438,"stars":25,"repoUrl":26,"updatedAt":1327},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1439,1440,1441,1442],{"name":17,"slug":18,"type":15},{"name":1322,"slug":1323,"type":15},{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15},{"slug":1329,"name":1329,"fn":1330,"description":1331,"org":1444,"tags":1445,"stars":25,"repoUrl":26,"updatedAt":1341},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1446,1447,1448],{"name":1335,"slug":1336,"type":15},{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},{"slug":1343,"name":1343,"fn":1344,"description":1345,"org":1450,"tags":1451,"stars":25,"repoUrl":26,"updatedAt":1354},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1452,1453,1454,1455],{"name":1335,"slug":1336,"type":15},{"name":1350,"slug":1351,"type":15},{"name":23,"slug":24,"type":15},{"name":1311,"slug":1312,"type":15},{"slug":1356,"name":1356,"fn":1357,"description":1358,"org":1457,"tags":1458,"stars":25,"repoUrl":26,"updatedAt":1364},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1459,1460,1461],{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},{"slug":1366,"name":1366,"fn":1367,"description":1368,"org":1463,"tags":1464,"stars":25,"repoUrl":26,"updatedAt":1374},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1465,1466,1467],{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15},{"name":1339,"slug":1340,"type":15},{"slug":1376,"name":1376,"fn":1377,"description":1378,"org":1469,"tags":1470,"stars":25,"repoUrl":26,"updatedAt":1387},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1471,1472,1473,1474],{"name":17,"slug":18,"type":15},{"name":1383,"slug":1384,"type":15},{"name":1325,"slug":577,"type":15},{"name":23,"slug":24,"type":15}]