upgrade-solidity-contracts

Upgrade Solidity smart contracts using OpenZeppelin proxy patterns.

2|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/mochi-minds/mochiminds --skill upgrade-solidity-contracts-mochi-minds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upgrade-solidity-contracts
Source: https://github.com/mochi-minds/mochiminds/tree/main/.claude/skills/upgrade-solidity-contracts
Command: npx skills add https://github.com/mochi-minds/mochiminds --skill upgrade-solidity-contracts-mochi-minds

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading Solidity smart contracts securely can be complex due to storage compatibility, initializer patterns, and cross-version constraints; this skill provides a structured approach to implementing upgradeable contracts with OpenZeppelin proxies (UUPS, Transparent, Beacon) and ensures safe migrations.

Core Features & Use Cases

  • Guidance on selecting the appropriate upgrade pattern (UUPS, Transparent, Beacon) and when to use initializers instead of constructors.
  • Coverage of storage layout rules, ERC-7201 namespaced storage, and upgrade safety checks to prevent breaking changes.
  • Best practices for deploying and upgrading proxies within Hardhat or Foundry workflows, including common pitfalls and validation steps.

Quick Start

Initialize and upgrade a Solidity contract safely using OpenZeppelin proxies with a predefined upgrade plan.

Frequently Asked Questions about upgrade-solidity-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Solidity contracts safely using OpenZeppelin proxies?

To upgrade Solidity contracts safely, you implement OpenZeppelin proxy patterns like UUPS, Transparent, or Beacon proxies. This approach uses initializers instead of constructors and enforces storage layout checks to prevent breaking changes during migration.

What is the difference between UUPS, Transparent, and Beacon proxies for upgradeable contracts?

UUPS, Transparent, and Beacon proxies are distinct OpenZeppelin upgrade patterns. UUPS places upgrade logic in the implementation, Transparent uses a proxy admin to avoid function clashes, and Beacon proxies upgrade multiple contracts simultaneously through a single beacon.

How do I handle storage layout and ERC-7201 namespaced storage during a contract upgrade?

Handling storage layout during a contract upgrade requires following specific storage compatibility rules and utilizing ERC-7201 namespaced storage. This prevents storage collisions and ensures variables remain correctly mapped across upgraded contract versions.

Can I integrate OpenZeppelin upgrade workflows with Hardhat or Foundry?

Yes, you can integrate OpenZeppelin upgrade workflows with Hardhat or Foundry. These frameworks support deploying and upgrading proxies, running validation steps, and executing upgrade safety checks to ensure secure contract migrations.

Why do I need to use initializers instead of constructors in upgradeable Solidity contracts?

You need initializers instead of constructors in upgradeable Solidity contracts because proxy delegate calls execute implementation logic without running the original constructor. Initializers ensure the proxy state is properly initialized upon deployment.

What are the limitations and common pitfalls when migrating upgradeable proxy contracts?

Limitations when migrating upgradeable proxy contracts include strict storage layout constraints and potential cross-version compatibility issues. Common pitfalls involve breaking storage compatibility or skipping upgrade safety checks, which can permanently corrupt contract state.