AgentSkillsCN

openzeppelin-contracts

安全智能合约库——涵盖访问控制、代币(ERC20/721/1155/4626/6909)、可升级合约以及各类实用工具。

SKILL.md
--- frontmatter
name: openzeppelin-contracts
description: Secure smart contract library—access control, tokens (ERC20/721/1155/4626/6909), upgradeable contracts, and utilities.
metadata:
  author: hairy
  version: "2026.2.9"
  source: Generated from https://github.com/OpenZeppelin/openzeppelin-contracts, scripts at https://github.com/antfu/skills

Skill based on OpenZeppelin Contracts (docs as of 2026-02-09), generated from sources/openzeppelin.

OpenZeppelin Contracts is a library for secure smart contract development on EVM. Use via inheritance (e.g. ERC20, AccessControl) or using for (e.g. ECDSA, Math). Covers access control (Ownable, RBAC, AccessManager, TimelockController), tokens (ERC20, ERC721, ERC1155, ERC4626, ERC6909), upgradeable variants, and utilities (crypto, math, introspection, structures, storage).

Core References

TopicDescriptionReference
OverviewLibrary usage, inheritance, extending contractscore-overview
Access ControlOwnable, AccessControl (RBAC), AccessManager, TimelockControllercore-access-control
TokensToken standards and when to use ERC20/721/1155/4626/6909core-tokens
ERC20Fungible tokens, decimals, transfer, supplycore-erc20
ERC721Non-fungible tokens, URI storage, mintingcore-erc721

Features

Upgradeable

TopicDescriptionReference
Upgradeable Contractscontracts-upgradeable, initializers, namespaced storagefeatures-upgradeable

Utilities

TopicDescriptionReference
UtilitiesECDSA, MerkleProof, Math, ERC165, structures, StorageSlot, Multicallfeatures-utilities

Best Practices

TopicDescriptionReference
Backwards CompatibilitySemantic versioning, storage layout, safe overridesbest-practices-backwards-compatibility