[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openzeppelin-upgrade-cairo-contracts":3,"mdc--wkygf1-key":33,"related-org-openzeppelin-upgrade-cairo-contracts":780,"related-repo-openzeppelin-upgrade-cairo-contracts":912},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":28,"sourceUrl":31,"mdContent":32},"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},"openzeppelin","OpenZeppelin","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenzeppelin.png",[12,16,19],{"name":13,"slug":14,"type":15},"Web3","web3","tag",{"name":17,"slug":18,"type":15},"Migration","migration",{"name":20,"slug":21,"type":15},"Smart Contracts","smart-contracts",193,"https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fopenzeppelin-skills","2026-07-13T06:04:25.126377","AGPL-3.0-only",25,[],{"repoUrl":23,"stars":22,"forks":26,"topics":29,"description":30},[],"Agent skills for secure smart contract development with OpenZeppelin Contracts libraries","https:\u002F\u002Fgithub.com\u002FOpenZeppelin\u002Fopenzeppelin-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fupgrade-cairo-contracts","---\nname: upgrade-cairo-contracts\ndescription: \"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.\"\nlicense: AGPL-3.0-only\nmetadata:\n  author: OpenZeppelin\n---\n\n# Cairo Upgrades\n\n## Contents\n\n- [Starknet Upgrade Model](#starknet-upgrade-model)\n- [Using the OpenZeppelin Upgradeable Component](#using-the-openzeppelin-upgradeable-component)\n- [Access Control](#access-control)\n- [Upgrade Safety](#upgrade-safety)\n\n## Starknet Upgrade Model\n\nStarknet separates **contract instances** from **contract classes**. A class is the compiled program (identified by its class hash); a contract is a deployed instance pointing to a class. Multiple contracts can share the same class.\n\nUpgrading a contract means **replacing its class hash** so it points to a new class. The contract keeps its address, storage, and nonce — only the code changes. This is fundamentally different from EVM proxy patterns:\n\n| | Starknet | EVM (proxy pattern) |\n|---|---|---|\n| **Mechanism** | `replace_class_syscall` swaps the class hash in-place | Proxy `delegatecall`s to a separate implementation contract |\n| **Proxy contract needed** | No — the contract upgrades itself | Yes — a proxy sits in front of the implementation |\n| **Storage location** | Belongs to the contract directly | Lives in the proxy, accessed via delegatecall |\n| **Fallback routing** | Not applicable — no fallback\u002Fcatch-all mechanism in Cairo | Proxy forwards all calls via fallback function |\n\nThe `replace_class_syscall` is a native Starknet syscall. When called, it atomically replaces the calling contract's class hash with the provided one. The new class must already be declared on-chain. After the syscall, the current execution frame continues with the old code, but subsequent calls to the contract — whether via `call_contract_syscall` later in the same transaction or in future transactions — execute the new code.\n\n## Using the OpenZeppelin Upgradeable Component\n\nOpenZeppelin Contracts for Cairo provides an `UpgradeableComponent` that wraps `replace_class_syscall` with validation and event emission. Integrate it as follows:\n\n1. **Declare the component** alongside an access control component (e.g., `OwnableComponent`)\n2. **Add both to storage and events** using `#[substorage(v0)]` and `#[flat]`\n3. **Expose an `upgrade` function** behind access control that calls the component's internal `upgrade` method — the component calls `replace_class_syscall` to atomically swap the class hash; always mention this syscall when explaining how Cairo upgrades work\n4. **Initialize access control** in the constructor\n\nThe component emits an `Upgraded` event on each class hash replacement and rejects zero class hashes.\n\nThere is also an `IUpgradeAndCall` interface variant that couples the upgrade with a function call in the new class context — useful for post-upgrade migrations or re-initialization.\n\n### Access control\n\nThe `UpgradeableComponent` deliberately does **not** embed access control itself. You must guard the external `upgrade` function with your own check (e.g., `self.ownable.assert_only_owner()`). Forgetting this allows anyone to replace your contract's code.\n\nCommon access control options:\n- **Ownable** — single owner, simplest pattern\n- **AccessControl \u002F RBAC** — role-based, finer granularity\n- **Multisig or governance** — for production contracts managing significant value\n\n## Upgrade Safety\n\n### Storage compatibility\n\nWhen replacing a class hash, existing storage is reinterpreted by the new class. Incompatible changes corrupt state:\n\n- **Do not rename or remove** existing storage variables — the slot is derived from the variable name, so renaming makes old data inaccessible\n- **Do not change the type** of existing storage variables\n- **Adding** new storage variables is safe\n- **Component storage** uses `#[substorage(v0)]`, which flattens component slots into the contract's storage space without automatic namespacing — follow the convention of prefixing storage variable names with the component name (e.g., `ERC20_balances`) to avoid collisions across components\n\nUnlike Solidity's sequential storage layout, Cairo storage slots are derived from variable names via `sn_keccak` hashing (conceptually analogous to, but more fundamental than, ERC-7201 namespaced storage in Solidity). This makes ordering irrelevant but makes naming critical.\n\n### OpenZeppelin version upgrades\n\nOpenZeppelin Contracts for Cairo follows semantic versioning for storage layout compatibility:\n- **Patch** updates always preserve storage layout\n- **Minor** updates preserve storage layout (from v1.0.0 onward)\n- **Major** updates may break storage layout — never upgrade a live contract across major versions without reviewing the changelog\n\n### Testing upgrade paths\n\nBefore upgrading a production contract:\n\n- [ ] **Deploy V1 and V2** classes in a local devnet (e.g., `starknet-devnet-rs` or Katana)\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 API compatibility** — changed external function signatures break existing callers and integrations\n- [ ] **Review storage changes** — ensure no renames, removals, or type changes to existing variables\n- [ ] **Manual review** — there is no automated storage layout validation for Cairo; use `npx @openzeppelin\u002Fcontracts-cli` to discover current integration patterns and rely on devnet testing\n",{"data":34,"body":36},{"name":4,"description":6,"license":25,"metadata":35},{"author":9},{"type":37,"children":38},"root",[39,48,55,97,102,123,135,265,285,290,310,398,411,424,431,464,469,502,507,513,518,576,589,595,600,633,639,644],{"type":40,"tag":41,"props":42,"children":44},"element","h1",{"id":43},"cairo-upgrades",[45],{"type":46,"value":47},"text","Cairo Upgrades",{"type":40,"tag":49,"props":50,"children":52},"h2",{"id":51},"contents",[53],{"type":46,"value":54},"Contents",{"type":40,"tag":56,"props":57,"children":58},"ul",{},[59,70,79,88],{"type":40,"tag":60,"props":61,"children":62},"li",{},[63],{"type":40,"tag":64,"props":65,"children":67},"a",{"href":66},"#starknet-upgrade-model",[68],{"type":46,"value":69},"Starknet Upgrade Model",{"type":40,"tag":60,"props":71,"children":72},{},[73],{"type":40,"tag":64,"props":74,"children":76},{"href":75},"#using-the-openzeppelin-upgradeable-component",[77],{"type":46,"value":78},"Using the OpenZeppelin Upgradeable Component",{"type":40,"tag":60,"props":80,"children":81},{},[82],{"type":40,"tag":64,"props":83,"children":85},{"href":84},"#access-control",[86],{"type":46,"value":87},"Access Control",{"type":40,"tag":60,"props":89,"children":90},{},[91],{"type":40,"tag":64,"props":92,"children":94},{"href":93},"#upgrade-safety",[95],{"type":46,"value":96},"Upgrade Safety",{"type":40,"tag":49,"props":98,"children":100},{"id":99},"starknet-upgrade-model",[101],{"type":46,"value":69},{"type":40,"tag":103,"props":104,"children":105},"p",{},[106,108,114,116,121],{"type":46,"value":107},"Starknet separates ",{"type":40,"tag":109,"props":110,"children":111},"strong",{},[112],{"type":46,"value":113},"contract instances",{"type":46,"value":115}," from ",{"type":40,"tag":109,"props":117,"children":118},{},[119],{"type":46,"value":120},"contract classes",{"type":46,"value":122},". A class is the compiled program (identified by its class hash); a contract is a deployed instance pointing to a class. Multiple contracts can share the same class.",{"type":40,"tag":103,"props":124,"children":125},{},[126,128,133],{"type":46,"value":127},"Upgrading a contract means ",{"type":40,"tag":109,"props":129,"children":130},{},[131],{"type":46,"value":132},"replacing its class hash",{"type":46,"value":134}," so it points to a new class. The contract keeps its address, storage, and nonce — only the code changes. This is fundamentally different from EVM proxy patterns:",{"type":40,"tag":136,"props":137,"children":138},"table",{},[139,161],{"type":40,"tag":140,"props":141,"children":142},"thead",{},[143],{"type":40,"tag":144,"props":145,"children":146},"tr",{},[147,151,156],{"type":40,"tag":148,"props":149,"children":150},"th",{},[],{"type":40,"tag":148,"props":152,"children":153},{},[154],{"type":46,"value":155},"Starknet",{"type":40,"tag":148,"props":157,"children":158},{},[159],{"type":46,"value":160},"EVM (proxy pattern)",{"type":40,"tag":162,"props":163,"children":164},"tbody",{},[165,202,223,244],{"type":40,"tag":144,"props":166,"children":167},{},[168,177,189],{"type":40,"tag":169,"props":170,"children":171},"td",{},[172],{"type":40,"tag":109,"props":173,"children":174},{},[175],{"type":46,"value":176},"Mechanism",{"type":40,"tag":169,"props":178,"children":179},{},[180,187],{"type":40,"tag":181,"props":182,"children":184},"code",{"className":183},[],[185],{"type":46,"value":186},"replace_class_syscall",{"type":46,"value":188}," swaps the class hash in-place",{"type":40,"tag":169,"props":190,"children":191},{},[192,194,200],{"type":46,"value":193},"Proxy ",{"type":40,"tag":181,"props":195,"children":197},{"className":196},[],[198],{"type":46,"value":199},"delegatecall",{"type":46,"value":201},"s to a separate implementation contract",{"type":40,"tag":144,"props":203,"children":204},{},[205,213,218],{"type":40,"tag":169,"props":206,"children":207},{},[208],{"type":40,"tag":109,"props":209,"children":210},{},[211],{"type":46,"value":212},"Proxy contract needed",{"type":40,"tag":169,"props":214,"children":215},{},[216],{"type":46,"value":217},"No — the contract upgrades itself",{"type":40,"tag":169,"props":219,"children":220},{},[221],{"type":46,"value":222},"Yes — a proxy sits in front of the implementation",{"type":40,"tag":144,"props":224,"children":225},{},[226,234,239],{"type":40,"tag":169,"props":227,"children":228},{},[229],{"type":40,"tag":109,"props":230,"children":231},{},[232],{"type":46,"value":233},"Storage location",{"type":40,"tag":169,"props":235,"children":236},{},[237],{"type":46,"value":238},"Belongs to the contract directly",{"type":40,"tag":169,"props":240,"children":241},{},[242],{"type":46,"value":243},"Lives in the proxy, accessed via delegatecall",{"type":40,"tag":144,"props":245,"children":246},{},[247,255,260],{"type":40,"tag":169,"props":248,"children":249},{},[250],{"type":40,"tag":109,"props":251,"children":252},{},[253],{"type":46,"value":254},"Fallback routing",{"type":40,"tag":169,"props":256,"children":257},{},[258],{"type":46,"value":259},"Not applicable — no fallback\u002Fcatch-all mechanism in Cairo",{"type":40,"tag":169,"props":261,"children":262},{},[263],{"type":46,"value":264},"Proxy forwards all calls via fallback function",{"type":40,"tag":103,"props":266,"children":267},{},[268,270,275,277,283],{"type":46,"value":269},"The ",{"type":40,"tag":181,"props":271,"children":273},{"className":272},[],[274],{"type":46,"value":186},{"type":46,"value":276}," is a native Starknet syscall. When called, it atomically replaces the calling contract's class hash with the provided one. The new class must already be declared on-chain. After the syscall, the current execution frame continues with the old code, but subsequent calls to the contract — whether via ",{"type":40,"tag":181,"props":278,"children":280},{"className":279},[],[281],{"type":46,"value":282},"call_contract_syscall",{"type":46,"value":284}," later in the same transaction or in future transactions — execute the new code.",{"type":40,"tag":49,"props":286,"children":288},{"id":287},"using-the-openzeppelin-upgradeable-component",[289],{"type":46,"value":78},{"type":40,"tag":103,"props":291,"children":292},{},[293,295,301,303,308],{"type":46,"value":294},"OpenZeppelin Contracts for Cairo provides an ",{"type":40,"tag":181,"props":296,"children":298},{"className":297},[],[299],{"type":46,"value":300},"UpgradeableComponent",{"type":46,"value":302}," that wraps ",{"type":40,"tag":181,"props":304,"children":306},{"className":305},[],[307],{"type":46,"value":186},{"type":46,"value":309}," with validation and event emission. Integrate it as follows:",{"type":40,"tag":311,"props":312,"children":313},"ol",{},[314,332,356,388],{"type":40,"tag":60,"props":315,"children":316},{},[317,322,324,330],{"type":40,"tag":109,"props":318,"children":319},{},[320],{"type":46,"value":321},"Declare the component",{"type":46,"value":323}," alongside an access control component (e.g., ",{"type":40,"tag":181,"props":325,"children":327},{"className":326},[],[328],{"type":46,"value":329},"OwnableComponent",{"type":46,"value":331},")",{"type":40,"tag":60,"props":333,"children":334},{},[335,340,342,348,350],{"type":40,"tag":109,"props":336,"children":337},{},[338],{"type":46,"value":339},"Add both to storage and events",{"type":46,"value":341}," using ",{"type":40,"tag":181,"props":343,"children":345},{"className":344},[],[346],{"type":46,"value":347},"#[substorage(v0)]",{"type":46,"value":349}," and ",{"type":40,"tag":181,"props":351,"children":353},{"className":352},[],[354],{"type":46,"value":355},"#[flat]",{"type":40,"tag":60,"props":357,"children":358},{},[359,372,374,379,381,386],{"type":40,"tag":109,"props":360,"children":361},{},[362,364,370],{"type":46,"value":363},"Expose an ",{"type":40,"tag":181,"props":365,"children":367},{"className":366},[],[368],{"type":46,"value":369},"upgrade",{"type":46,"value":371}," function",{"type":46,"value":373}," behind access control that calls the component's internal ",{"type":40,"tag":181,"props":375,"children":377},{"className":376},[],[378],{"type":46,"value":369},{"type":46,"value":380}," method — the component calls ",{"type":40,"tag":181,"props":382,"children":384},{"className":383},[],[385],{"type":46,"value":186},{"type":46,"value":387}," to atomically swap the class hash; always mention this syscall when explaining how Cairo upgrades work",{"type":40,"tag":60,"props":389,"children":390},{},[391,396],{"type":40,"tag":109,"props":392,"children":393},{},[394],{"type":46,"value":395},"Initialize access control",{"type":46,"value":397}," in the constructor",{"type":40,"tag":103,"props":399,"children":400},{},[401,403,409],{"type":46,"value":402},"The component emits an ",{"type":40,"tag":181,"props":404,"children":406},{"className":405},[],[407],{"type":46,"value":408},"Upgraded",{"type":46,"value":410}," event on each class hash replacement and rejects zero class hashes.",{"type":40,"tag":103,"props":412,"children":413},{},[414,416,422],{"type":46,"value":415},"There is also an ",{"type":40,"tag":181,"props":417,"children":419},{"className":418},[],[420],{"type":46,"value":421},"IUpgradeAndCall",{"type":46,"value":423}," interface variant that couples the upgrade with a function call in the new class context — useful for post-upgrade migrations or re-initialization.",{"type":40,"tag":425,"props":426,"children":428},"h3",{"id":427},"access-control",[429],{"type":46,"value":430},"Access control",{"type":40,"tag":103,"props":432,"children":433},{},[434,435,440,442,447,449,454,456,462],{"type":46,"value":269},{"type":40,"tag":181,"props":436,"children":438},{"className":437},[],[439],{"type":46,"value":300},{"type":46,"value":441}," deliberately does ",{"type":40,"tag":109,"props":443,"children":444},{},[445],{"type":46,"value":446},"not",{"type":46,"value":448}," embed access control itself. You must guard the external ",{"type":40,"tag":181,"props":450,"children":452},{"className":451},[],[453],{"type":46,"value":369},{"type":46,"value":455}," function with your own check (e.g., ",{"type":40,"tag":181,"props":457,"children":459},{"className":458},[],[460],{"type":46,"value":461},"self.ownable.assert_only_owner()",{"type":46,"value":463},"). Forgetting this allows anyone to replace your contract's code.",{"type":40,"tag":103,"props":465,"children":466},{},[467],{"type":46,"value":468},"Common access control options:",{"type":40,"tag":56,"props":470,"children":471},{},[472,482,492],{"type":40,"tag":60,"props":473,"children":474},{},[475,480],{"type":40,"tag":109,"props":476,"children":477},{},[478],{"type":46,"value":479},"Ownable",{"type":46,"value":481}," — single owner, simplest pattern",{"type":40,"tag":60,"props":483,"children":484},{},[485,490],{"type":40,"tag":109,"props":486,"children":487},{},[488],{"type":46,"value":489},"AccessControl \u002F RBAC",{"type":46,"value":491}," — role-based, finer granularity",{"type":40,"tag":60,"props":493,"children":494},{},[495,500],{"type":40,"tag":109,"props":496,"children":497},{},[498],{"type":46,"value":499},"Multisig or governance",{"type":46,"value":501}," — for production contracts managing significant value",{"type":40,"tag":49,"props":503,"children":505},{"id":504},"upgrade-safety",[506],{"type":46,"value":96},{"type":40,"tag":425,"props":508,"children":510},{"id":509},"storage-compatibility",[511],{"type":46,"value":512},"Storage compatibility",{"type":40,"tag":103,"props":514,"children":515},{},[516],{"type":46,"value":517},"When replacing a class hash, existing storage is reinterpreted by the new class. Incompatible changes corrupt state:",{"type":40,"tag":56,"props":519,"children":520},{},[521,531,541,551],{"type":40,"tag":60,"props":522,"children":523},{},[524,529],{"type":40,"tag":109,"props":525,"children":526},{},[527],{"type":46,"value":528},"Do not rename or remove",{"type":46,"value":530}," existing storage variables — the slot is derived from the variable name, so renaming makes old data inaccessible",{"type":40,"tag":60,"props":532,"children":533},{},[534,539],{"type":40,"tag":109,"props":535,"children":536},{},[537],{"type":46,"value":538},"Do not change the type",{"type":46,"value":540}," of existing storage variables",{"type":40,"tag":60,"props":542,"children":543},{},[544,549],{"type":40,"tag":109,"props":545,"children":546},{},[547],{"type":46,"value":548},"Adding",{"type":46,"value":550}," new storage variables is safe",{"type":40,"tag":60,"props":552,"children":553},{},[554,559,561,566,568,574],{"type":40,"tag":109,"props":555,"children":556},{},[557],{"type":46,"value":558},"Component storage",{"type":46,"value":560}," uses ",{"type":40,"tag":181,"props":562,"children":564},{"className":563},[],[565],{"type":46,"value":347},{"type":46,"value":567},", which flattens component slots into the contract's storage space without automatic namespacing — follow the convention of prefixing storage variable names with the component name (e.g., ",{"type":40,"tag":181,"props":569,"children":571},{"className":570},[],[572],{"type":46,"value":573},"ERC20_balances",{"type":46,"value":575},") to avoid collisions across components",{"type":40,"tag":103,"props":577,"children":578},{},[579,581,587],{"type":46,"value":580},"Unlike Solidity's sequential storage layout, Cairo storage slots are derived from variable names via ",{"type":40,"tag":181,"props":582,"children":584},{"className":583},[],[585],{"type":46,"value":586},"sn_keccak",{"type":46,"value":588}," hashing (conceptually analogous to, but more fundamental than, ERC-7201 namespaced storage in Solidity). This makes ordering irrelevant but makes naming critical.",{"type":40,"tag":425,"props":590,"children":592},{"id":591},"openzeppelin-version-upgrades",[593],{"type":46,"value":594},"OpenZeppelin version upgrades",{"type":40,"tag":103,"props":596,"children":597},{},[598],{"type":46,"value":599},"OpenZeppelin Contracts for Cairo follows semantic versioning for storage layout compatibility:",{"type":40,"tag":56,"props":601,"children":602},{},[603,613,623],{"type":40,"tag":60,"props":604,"children":605},{},[606,611],{"type":40,"tag":109,"props":607,"children":608},{},[609],{"type":46,"value":610},"Patch",{"type":46,"value":612}," updates always preserve storage layout",{"type":40,"tag":60,"props":614,"children":615},{},[616,621],{"type":40,"tag":109,"props":617,"children":618},{},[619],{"type":46,"value":620},"Minor",{"type":46,"value":622}," updates preserve storage layout (from v1.0.0 onward)",{"type":40,"tag":60,"props":624,"children":625},{},[626,631],{"type":40,"tag":109,"props":627,"children":628},{},[629],{"type":46,"value":630},"Major",{"type":46,"value":632}," updates may break storage layout — never upgrade a live contract across major versions without reviewing the changelog",{"type":40,"tag":425,"props":634,"children":636},{"id":635},"testing-upgrade-paths",[637],{"type":46,"value":638},"Testing upgrade paths",{"type":40,"tag":103,"props":640,"children":641},{},[642],{"type":46,"value":643},"Before upgrading a production contract:",{"type":40,"tag":56,"props":645,"children":648},{"className":646},[647],"contains-task-list",[649,677,692,707,727,742,757],{"type":40,"tag":60,"props":650,"children":653},{"className":651},[652],"task-list-item",[654,660,662,667,669,675],{"type":40,"tag":655,"props":656,"children":659},"input",{"disabled":657,"type":658},true,"checkbox",[],{"type":46,"value":661}," ",{"type":40,"tag":109,"props":663,"children":664},{},[665],{"type":46,"value":666},"Deploy V1 and V2",{"type":46,"value":668}," classes in a local devnet (e.g., ",{"type":40,"tag":181,"props":670,"children":672},{"className":671},[],[673],{"type":46,"value":674},"starknet-devnet-rs",{"type":46,"value":676}," or Katana)",{"type":40,"tag":60,"props":678,"children":680},{"className":679},[652],[681,684,685,690],{"type":40,"tag":655,"props":682,"children":683},{"disabled":657,"type":658},[],{"type":46,"value":661},{"type":40,"tag":109,"props":686,"children":687},{},[688],{"type":46,"value":689},"Write state with V1",{"type":46,"value":691},", upgrade to V2, and verify that all existing state reads correctly",{"type":40,"tag":60,"props":693,"children":695},{"className":694},[652],[696,699,700,705],{"type":40,"tag":655,"props":697,"children":698},{"disabled":657,"type":658},[],{"type":46,"value":661},{"type":40,"tag":109,"props":701,"children":702},{},[703],{"type":46,"value":704},"Verify new functionality",{"type":46,"value":706}," works as expected after the upgrade",{"type":40,"tag":60,"props":708,"children":710},{"className":709},[652],[711,714,715,720,722],{"type":40,"tag":655,"props":712,"children":713},{"disabled":657,"type":658},[],{"type":46,"value":661},{"type":40,"tag":109,"props":716,"children":717},{},[718],{"type":46,"value":719},"Confirm access control",{"type":46,"value":721}," — only authorized callers can invoke ",{"type":40,"tag":181,"props":723,"children":725},{"className":724},[],[726],{"type":46,"value":369},{"type":40,"tag":60,"props":728,"children":730},{"className":729},[652],[731,734,735,740],{"type":40,"tag":655,"props":732,"children":733},{"disabled":657,"type":658},[],{"type":46,"value":661},{"type":40,"tag":109,"props":736,"children":737},{},[738],{"type":46,"value":739},"Check API compatibility",{"type":46,"value":741}," — changed external function signatures break existing callers and integrations",{"type":40,"tag":60,"props":743,"children":745},{"className":744},[652],[746,749,750,755],{"type":40,"tag":655,"props":747,"children":748},{"disabled":657,"type":658},[],{"type":46,"value":661},{"type":40,"tag":109,"props":751,"children":752},{},[753],{"type":46,"value":754},"Review storage changes",{"type":46,"value":756}," — ensure no renames, removals, or type changes to existing variables",{"type":40,"tag":60,"props":758,"children":760},{"className":759},[652],[761,764,765,770,772,778],{"type":40,"tag":655,"props":762,"children":763},{"disabled":657,"type":658},[],{"type":46,"value":661},{"type":40,"tag":109,"props":766,"children":767},{},[768],{"type":46,"value":769},"Manual review",{"type":46,"value":771}," — there is no automated storage layout validation for Cairo; use ",{"type":40,"tag":181,"props":773,"children":775},{"className":774},[],[776],{"type":46,"value":777},"npx @openzeppelin\u002Fcontracts-cli",{"type":46,"value":779}," to discover current integration patterns and rely on devnet testing",{"items":781,"total":911},[782,797,814,826,839,849,859,872,878,889,900],{"slug":783,"name":783,"fn":784,"description":785,"org":786,"tags":787,"stars":22,"repoUrl":23,"updatedAt":796},"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},[788,789,792,793],{"name":87,"slug":427,"type":15},{"name":790,"slug":791,"type":15},"Security","security",{"name":20,"slug":21,"type":15},{"name":794,"slug":795,"type":15},"Solidity","solidity","2026-07-13T06:04:32.666273",{"slug":798,"name":798,"fn":799,"description":800,"org":801,"tags":802,"stars":22,"repoUrl":23,"updatedAt":813},"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},[803,806,809,812],{"name":804,"slug":805,"type":15},"Blockchain","blockchain",{"name":807,"slug":808,"type":15},"Code Review","code-review",{"name":810,"slug":811,"type":15},"Rust","rust",{"name":20,"slug":21,"type":15},"2026-07-16T06:00:49.17387",{"slug":815,"name":815,"fn":816,"description":817,"org":818,"tags":819,"stars":22,"repoUrl":23,"updatedAt":825},"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},[820,823,824],{"name":821,"slug":822,"type":15},"Engineering","engineering",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:17.186825",{"slug":827,"name":827,"fn":828,"description":829,"org":830,"tags":831,"stars":22,"repoUrl":23,"updatedAt":838},"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},[832,833,836,837],{"name":821,"slug":822,"type":15},{"name":834,"slug":835,"type":15},"Foundry","foundry",{"name":20,"slug":21,"type":15},{"name":794,"slug":795,"type":15},"2026-07-13T06:04:29.360325",{"slug":840,"name":840,"fn":841,"description":842,"org":843,"tags":844,"stars":22,"repoUrl":23,"updatedAt":848},"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},[845,846,847],{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:23.807685",{"slug":850,"name":850,"fn":851,"description":852,"org":853,"tags":854,"stars":22,"repoUrl":23,"updatedAt":858},"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},[855,856,857],{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:18.638516",{"slug":860,"name":860,"fn":861,"description":862,"org":863,"tags":864,"stars":22,"repoUrl":23,"updatedAt":871},"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},[865,866,869,870],{"name":804,"slug":805,"type":15},{"name":867,"slug":868,"type":15},"CLI","cli",{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15},"2026-07-16T05:59:21.671811",{"slug":4,"name":4,"fn":5,"description":6,"org":873,"tags":874,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[875,876,877],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":879,"name":879,"fn":880,"description":881,"org":882,"tags":883,"stars":22,"repoUrl":23,"updatedAt":888},"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},[884,885,886,887],{"name":17,"slug":18,"type":15},{"name":790,"slug":791,"type":15},{"name":20,"slug":21,"type":15},{"name":794,"slug":795,"type":15},"2026-07-13T06:04:20.958319",{"slug":890,"name":890,"fn":891,"description":892,"org":893,"tags":894,"stars":22,"repoUrl":23,"updatedAt":899},"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},[895,896,897,898],{"name":804,"slug":805,"type":15},{"name":17,"slug":18,"type":15},{"name":790,"slug":791,"type":15},{"name":20,"slug":21,"type":15},"2026-07-13T06:04:31.398663",{"slug":901,"name":901,"fn":902,"description":903,"org":904,"tags":905,"stars":22,"repoUrl":23,"updatedAt":910},"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},[906,907,908,909],{"name":17,"slug":18,"type":15},{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-13T06:04:28.005287",11,{"items":913,"total":911},[914,921,928,934,941,947,953],{"slug":783,"name":783,"fn":784,"description":785,"org":915,"tags":916,"stars":22,"repoUrl":23,"updatedAt":796},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[917,918,919,920],{"name":87,"slug":427,"type":15},{"name":790,"slug":791,"type":15},{"name":20,"slug":21,"type":15},{"name":794,"slug":795,"type":15},{"slug":798,"name":798,"fn":799,"description":800,"org":922,"tags":923,"stars":22,"repoUrl":23,"updatedAt":813},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[924,925,926,927],{"name":804,"slug":805,"type":15},{"name":807,"slug":808,"type":15},{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15},{"slug":815,"name":815,"fn":816,"description":817,"org":929,"tags":930,"stars":22,"repoUrl":23,"updatedAt":825},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[931,932,933],{"name":821,"slug":822,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":827,"name":827,"fn":828,"description":829,"org":935,"tags":936,"stars":22,"repoUrl":23,"updatedAt":838},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[937,938,939,940],{"name":821,"slug":822,"type":15},{"name":834,"slug":835,"type":15},{"name":20,"slug":21,"type":15},{"name":794,"slug":795,"type":15},{"slug":840,"name":840,"fn":841,"description":842,"org":942,"tags":943,"stars":22,"repoUrl":23,"updatedAt":848},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[944,945,946],{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":850,"name":850,"fn":851,"description":852,"org":948,"tags":949,"stars":22,"repoUrl":23,"updatedAt":858},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[950,951,952],{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":860,"name":860,"fn":861,"description":862,"org":954,"tags":955,"stars":22,"repoUrl":23,"updatedAt":871},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[956,957,958,959],{"name":804,"slug":805,"type":15},{"name":867,"slug":868,"type":15},{"name":810,"slug":811,"type":15},{"name":20,"slug":21,"type":15}]