upgrade-cairo-contracts
OfficialSafely upgrade Cairo contracts on Starknet
Software Engineering#access-control#cairo#starknet#storage-compatibility#upgradeablecomponent#replace_class_syscall#upgrade-testing
AuthorOpenZeppelin
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Enables developers to perform atomic upgrades of deployed Cairo contracts by replacing class hashes while preserving contract addresses and on-chain storage, and guides them to avoid storage corruption and unauthorized upgrades.
Core Features & Use Cases
- Starknet upgrade model explained: clarifies replace_class_syscall semantics and contrasts class-based upgrades with EVM proxy patterns.
- Integrate UpgradeableComponent: shows how to add OpenZeppelin's UpgradeableComponent, emit Upgraded events, and use IUpgradeAndCall for post-upgrade initialization.
- Access control and safety: recommends guarding upgrade entry points with Ownable, RBAC, multisig, and provides storage compatibility rules and testing checklists for devnet upgrades.
- Use Case: prepare a safe upgrade plan for a production Cairo contract: declare the new class, run devnet migrations, verify storage reads, and restrict the upgrade call to authorized signers.
Quick Start
Use the upgrade-cairo-contracts skill to create a step-by-step upgrade plan that replaces a contract's class hash, preserves storage compatibility, and enforces owner-only access control.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: upgrade-cairo-contracts Download link: https://github.com/OpenZeppelin/openzeppelin-skills/archive/main.zip#upgrade-cairo-contracts Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.