Contracts for Cairo
OpenZeppelin Contracts for Cairo provides modular, reusable, and audited smart-contract building blocks for Starknet. The library ships with ready-to-use components, presets, utilities, and tooling that help you ship production-grade Cairo applications faster.
Getting Started
Latest Stable (2.x)
Explore the stable and audited documentation set, including installation, components, and production-ready guides.
Latest Alpha (3.0.0-alpha.3)
Try the upcoming features, updated APIs, and experimental packages before they are audited, available in the alpha release track.
Contracts Wizard
Bootstrap Cairo contracts with the interactive Wizard and learn how features compose across packages.
Core Features
Components
Reusable building blocks for composing Cairo contracts with mixins and modular architecture.
Presets
Ready-to-deploy contract presets for common Starknet scenarios.
Access Control
Manage permissions and roles for Cairo contracts with flexible access-control patterns.
Security
Harden your contracts with patterns and modules designed to reduce common vulnerabilities.
Token Standards
ERC-20
Implement fungible tokens with hooks, minting, and allowance helpers adapted for Starknet.
ERC-721
Build non-fungible tokens with metadata, enumeration, and minting extensions.
ERC-1155
Support multi-token collections that mix fungible and non-fungible assets.
ERC-4626
Create tokenized vaults that integrate with Starknet DeFi protocols.
Advanced Features
Accounts
Work with smart accounts, multicalls, and account-upgrade flows tailored for Starknet.
Upgradeability
Design upgradeable patterns and learn how to manage storage-safe contract evolution.
Universal Deployer
Deploy contracts deterministically using the Universal Deployer Contract.
Governance
Build Starknet-native governance flows with governor, timelock, multisig, and voting modules.
API Reference
Access Control API
Inspect the full access-control interface, events, and helper methods.
ERC-20 API
Explore the ERC-20 token standard interface, events, and helper methods for fungible tokens.
Upgrades API
Learn the low-level traits and components that power upgradeable contracts in Cairo.
Utilities API
Browse helper libraries, testing utilities, and dispatchers available to every package.