#ethereum #stylus #arbitrum #smart-contracts

no-std openzeppelin-stylus

OpenZeppelin Contracts for Stylus

4 releases

new 0.1.0 Oct 17, 2024
0.1.0-rc Aug 29, 2024
0.1.0-alpha.1 Aug 2, 2024
0.0.1 Jun 3, 2024

#15 in #arbitrum

Download history 68/week @ 2024-07-28 15/week @ 2024-08-04 90/week @ 2024-08-25 5/week @ 2024-09-01 42/week @ 2024-09-15 22/week @ 2024-09-22 17/week @ 2024-09-29 2/week @ 2024-10-06

83 downloads per month

MIT license

300KB
5K 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 openzeppelin_stylus::token::erc20::Erc20;

sol_storage! {
#[entrypoint]
struct MyContract {
#[borrow]
Erc20 erc20;
}
}

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

Dependencies

~12MB
~203K SLoC