Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cairo-contracts

> 安全
Open source

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup

911 stars0 likes1 views
WebsiteGitHub

About

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup

OpenZeppelin Contracts for Cairo

A library for secure smart contract development written in Cairo for Starknet, a decentralized ZK Rollup.

[!TIP] :mage: Not sure how to get started? Check out Contracts Wizard for Cairo — an interactive smart contract generator.

Usage

Prepare the environment

Simply install Cairo and scarb.

Set up your project

Create a new project and cd into it.

bash
scarb new my_project && cd my_project

The contents of my_project should look like this:

bash
$ ls

Scarb.toml src

Install the library

Edit scarb.toml and add:

toml
[dependencies]
openzeppelin = "4.0.1"

The previous example would import the entire library. We can also add each package as a separate dependency to improve the building time by not including modules that won't be used:

toml
[dependencies]
openzeppelin_token = "4.0.1"

Build the project to download it:

bash
$ scarb build

Updating git repository https://github.com/OpenZeppelin/cairo-contracts
Compiling my_project v0.1.0 (~/my_project/Scarb.toml)
Finished release target(s) in 6 seconds

Using the library

Open src/lib.cairo and write your contract.

For example, this is how to write an ERC20-compliant contract:

…

Learn

Documentation

Check out the full documentation site!

Cairo

  • Cairo book
  • Cairo language documentation
  • Starknet documentation
  • Cairopractice

Tooling

  • Scarb

Development

[!NOTE] You can track our roadmap and future milestones in our Github Project.

OpenZeppelin Contracts for Cairo exists thanks to its contributors. There are many ways you can participate and help build high quality software, make sure to check out the contribution guide in advance.

Set up the project

Clone the repository:

bash
git clone [email protected]:OpenZeppelin/cairo-contracts.git

cd into it and build:

bash
cd cairo-contracts
scarb build -w

Run tests

bash
snforge test -w

Security

This project is maintained by OpenZeppelin with the goal of providing a secure and reliable library of smart contract components for the Starknet ecosystem. We address security through risk management in various areas such as engineering and open source best practices, scoping and API design, multi-layered review processes, and incident response preparedness.

Refer to SECURITY.md for more details.

Past audits can be found in audits/.

Smart contracts are an evolving technology and carry a high level of technical risk and uncertainty. Although OpenZeppelin is well known for its security audits, using OpenZeppelin Contracts for Cairo is not a substitute for a security audit.

License

OpenZeppelin Contracts for Cairo is released under the MIT License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcairoethereumsecuritysmart-contracts

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category安全
PricingOpen source

> Related tools

O
OWASP ZAP
开源 Web 应用安全扫描器
O
owasp-wstg-tracker
Simple web app to track OWASP WSTG security testing progress
H
homebridge-mi-gateway-security
XiaoMi Gateway Security plugin for HomeBridge.