Files
nexus/wiki/entities/OpenZeppelin.md
2026-05-03 05:42:12 +08:00

32 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "OpenZeppelin"
type: entity
tags: []
last_updated: 2026-05-01
---
## Overview
OpenZeppelin 是最广泛使用的 Solidity 安全合约库和开发框架,为以太坊/EVM 智能合约提供经过专业审计的标准实现。其合约库涵盖 Token 标准、访问控制、可升级代理、安全工具等核心模块,是 Solidity 开发的事实标准基础。
## Key Components
### Contracts
- **Token 标准**ERC-20、ERC-721EIP-721、ERC-1155、ERC-4907租赁 NFT、ERC-2981版税
- **扩展**ERC20Burnable、ERC20Pausable、ERC20PermitEIP-712 授权、ERC20FlashMint
- **访问控制**AccessControl、Ownable、RBAC基于角色的访问控制
- **安全**ReentrancyGuard、Pausable
- **代理模式**TransparentUpgradeableProxy、UUPSUpgradeable、ERC1967Proxy、BeaconProxy
### Defender
- 自动化智能合约运维平台
- 包含 Admin多签管理、Relay自动化交易、Sentinel事件监控、Advisor安全建议
### 重要性
- OpenZeppelin 合约经过多次专业审计,被数千个项目使用
- **关键警示**:使用 OpenZeppelin 不等于安全——对库的错误使用本身就是漏洞来源
- [[blockchain-security-auditor]] 明确指出:审计中常见"看似用了 OpenZeppelin 但用法错误"的漏洞
## Sources
- [[engineering-solidity-smart-contract-engineer]]
- [[blockchain-security-auditor]]