7 releases

new 0.2.0-alpha.2 Dec 19, 2024
0.2.0-alpha.1 Nov 15, 2024
0.1.1 Oct 28, 2024
0.1.0-rc Aug 29, 2024
0.0.1 Jun 3, 2024

#232 in Magic Beans

Download history 18/week @ 2024-08-31 41/week @ 2024-09-14 23/week @ 2024-09-21 17/week @ 2024-09-28 1/week @ 2024-10-05 135/week @ 2024-10-12 28/week @ 2024-10-19 130/week @ 2024-10-26 25/week @ 2024-11-02 90/week @ 2024-11-09 38/week @ 2024-11-16 31/week @ 2024-11-23 35/week @ 2024-11-30 26/week @ 2024-12-07 87/week @ 2024-12-14

181 downloads per month

MIT license

475KB
8K SLoC

OpenZeppelin Contracts for Arbitrum Stylus

Robust, reliable, and secure smart contracts for the Arbitrum Stylus upgrade.

[!WARNING] Note that contracts is still 0.*.*, so breaking changes may occur at any time. If you must depend on contracts, we recommend pinning to a specific version, i.e., =0.y.z.

Security

Refer to our Security Policy for more details.


lib.rs:

OpenZeppelin Contracts for Stylus

A library for secure smart contract development written in Rust for Arbitrum Stylus. This library offers common smart contract primitives and affordances that take advantage of the nature of Stylus.

Usage

To start using it, add openzeppelin-stylus to your Cargo.toml, or simply run cargo add openzeppelin-stylus.

[dependencies]
openzeppelin-stylus = "x.x.x"

We recommend pinning to a specific version -- expect rapid iteration.

Once defined as a dependency, use one of our pre-defined implementations by importing them:

use stylus_sdk::prelude::*;
use openzeppelin_stylus::token::erc20::Erc20;

#[entrypoint]
#[storage]
struct MyContract {
#[borrow]
pub erc20: Erc20,
}

#[public]
#[inherit(Erc20)]
impl MyContract { }

Dependencies

~12MB
~202K SLoC