·upgrade-stylus-contracts
!

upgrade-stylus-contracts

使用 Arbitrum 上的 OpenZeppelin 代理模式升级 Stylus 智能合约。当用户需要:(1) 使 Stylus Rust 合约可通过 UUPS 或 Beacon 代理进行升级,(2) 了解 Stylus 特定的代理机制(logic_flag、WASM 重新激活),(3) 将 UUPSUpgradeable 与访问控制集成,(4) 确保升级过程中的存储兼容性,或 (5) 测试 Stylus 合约的升级路径。

44安装·5热度·@openzeppelin

安装

$npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-stylus-contracts

如何安装 upgrade-stylus-contracts

通过命令行快速安装 upgrade-stylus-contracts AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-stylus-contracts
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:openzeppelin/openzeppelin-skills。

SKILL.md

查看原文

Stylus contracts run on Arbitrum as WebAssembly (WASM) programs alongside the EVM. They share the same state trie, storage model, and account system as Solidity contracts. Because of this, EVM proxy patterns work identically for Stylus — a Solidity proxy can delegate to a Stylus implementation and vice versa.

| Proxy mechanism | Same — delegatecall to implementation contract | delegatecall to implementation contract | | Storage layout | #[storage] fields map to the same EVM slots as equivalent Solidity structs | Sequential slot allocation per Solidity rules | | EIP standards | ERC-1967 storage slots, ERC-1822 proxiable UUID | Same |

| Context detection | logicflag boolean in a unique storage slot (no immutable support) | address(this) stored as immutable | | Initialization | Two-step: constructor sets logicflag, then setversion() via proxy | Constructor + initializer via proxy |

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-stylus-contracts
分类
!安全工具
认证
收录时间
2026-03-06
更新时间
2026-03-10

Browse more skills from openzeppelin/openzeppelin-skills

快速解答

什么是 upgrade-stylus-contracts?

使用 Arbitrum 上的 OpenZeppelin 代理模式升级 Stylus 智能合约。当用户需要:(1) 使 Stylus Rust 合约可通过 UUPS 或 Beacon 代理进行升级,(2) 了解 Stylus 特定的代理机制(logic_flag、WASM 重新激活),(3) 将 UUPSUpgradeable 与访问控制集成,(4) 确保升级过程中的存储兼容性,或 (5) 测试 Stylus 合约的升级路径。 来源:openzeppelin/openzeppelin-skills。

如何安装 upgrade-stylus-contracts?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/openzeppelin/openzeppelin-skills --skill upgrade-stylus-contracts 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/openzeppelin/openzeppelin-skills