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.