upgrade-stylus-contracts
OfficialSafely upgrade Stylus contracts on Arbitrum
AuthorOpenZeppelin
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides actionable guidance to make Stylus (Rust) smart contracts upgradeable using established EVM proxy patterns so teams can perform implementation swaps without corrupting on-chain state or losing control of upgrades.
Core Features & Use Cases
- Proxy Patterns: Explains UUPS, Beacon, and Erc1967 proxy models and when to apply each pattern for Stylus contracts.
- Storage Compatibility: Details Stylus #[storage] layout rules, migration precautions, and the rule to only append fields to avoid slot collisions.
- Access Control & Safety: Describes how to integrate Ownable or RBAC with upgrade_to_and_call, enforce proxy-context via logic_flag and VERSION_NUMBER, and validate proxiable UUIDs.
- Operational Requirements: Covers initialization via set_version, testing upgrade paths on a devnet, and yearly WASM reactivation planning.
- Use Case: Migrate an existing Solidity implementation to a Stylus implementation behind an Erc1967 proxy, verify storage alignment, and perform controlled upgrades with access control.
Quick Start
Upgrade a Stylus contract to a new UUPS implementation with access control and verify storage compatibility on a local Arbitrum devnet.
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-stylus-contracts Download link: https://github.com/OpenZeppelin/openzeppelin-skills/archive/main.zip#upgrade-stylus-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.