Skip to content

Commit 68745a7

Browse files
bidzyyysqalisander
andauthored
docs: update README for v0.1.0 (#365)
Co-authored-by: Alisander Qoshqosh <[email protected]>
1 parent 1703d1e commit 68745a7

18 files changed

+32
-42
lines changed

README.md

+13-16
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
**A library for secure smart contract development** written in Rust for
44
[Arbitrum Stylus](https://docs.arbitrum.io/stylus/stylus-gentle-introduction).
55

6-
> [!WARNING]
7-
> This project is still in a very early and experimental phase. It has never
8-
> been audited nor thoroughly reviewed for security vulnerabilities. Do not use
9-
> in production.
10-
116
## Features
127

138
- Security-first smart contracts, ported from the [`openzeppelin-contracts`]
@@ -23,16 +18,21 @@
2318

2419
## Usage
2520

26-
The library has not been published yet to `crates.io`, and this will be the case
27-
until we reach a stable version. However, one can [specify a git dependency] in
28-
a `Cargo.toml`, like so:
21+
You can import OpenZeppelin Contracts from crates.io by adding the following
22+
line to your `Cargo.toml` (We recommend pinning to a specific version):
2923

3024
```toml
3125
[dependencies]
32-
openzeppelin-stylus = { git = "https://github.com/OpenZeppelin/rust-contracts-stylus" }
26+
openzeppelin-stylus = "0.1.0"
3327
```
3428

35-
We recommend pinning to a specific version -- expect rapid iteration.
29+
Optionally, you can specify a git dependency if you want to have the latest
30+
changes from the `main` branch:
31+
32+
```toml
33+
[dependencies]
34+
openzeppelin-stylus = { git = "https://github.com/OpenZeppelin/rust-contracts-stylus" }
35+
```
3636

3737
Once defined as a dependency, use one of our pre-defined implementations by
3838
importing them:
@@ -48,7 +48,7 @@ sol_storage! {
4848
}
4949
}
5050

51-
#[external]
51+
#[public]
5252
#[inherit(Erc20)]
5353
impl Erc20Example { }
5454
```
@@ -65,7 +65,7 @@ For more information on what this library will include in the future, see our
6565
[specify a git dependency]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories
6666
[examples]: ./examples
6767
[basic]: ./examples/basic
68-
[roadmap]: https://github.com/OpenZeppelin/rust-contracts-stylus/milestone/1
68+
[roadmap]: https://github.com/OpenZeppelin/rust-contracts-stylus/milestone/2
6969

7070
## Contribute
7171

@@ -75,10 +75,7 @@ the [contribution guide](CONTRIBUTING.md)!
7575

7676
## Security
7777

78-
> [!WARNING]
79-
> This project is still in a very early and experimental phase. It has never
80-
> been audited nor thoroughly reviewed for security vulnerabilities. Do not use
81-
> in production.
78+
Past audits can be found in [`audits/`](./audits).
8279

8380
Refer to our [Security Policy](SECURITY.md) for more details.
8481

SECURITY.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Security
22

3-
> [!WARNING]
4-
> This project is still in a very early and experimental phase. It has never
5-
> been audited nor thoroughly reviewed for security vulnerabilities. Do not use
6-
> in production.
3+
Past audits can be found in [`audits/`](./audits).
74

85
Please report any security issues you find to [email protected].

contracts/src/lib.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ A library for secure smart contract development written in Rust for
66
This library offers common smart contract primitives and affordances that take
77
advantage of the nature of Stylus.
88
9-
> This project is still in a very early and experimental phase. It has never
10-
> been audited nor thoroughly reviewed for security vulnerabilities. Do not use
11-
> in production.
12-
139
## Usage
1410
1511
To start using it, add `openzeppelin-stylus` to your `Cargo.toml`, or simply run
@@ -36,7 +32,7 @@ sol_storage! {
3632
}
3733
}
3834
39-
#[external]
35+
#[public]
4036
#[inherit(Erc20)]
4137
impl MyContract { }
4238
```

docs/modules/ROOT/pages/access-control.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sol_storage! {
2121
}
2222
}
2323
24-
#[external]
24+
#[public]
2525
#[inherit(Ownable)]
2626
impl MyContract {
2727
fn normal_thing(&self) {
@@ -90,7 +90,7 @@ pub const MINTER_ROLE: [u8; 32] = [
9090
166,
9191
];
9292
93-
#[external]
93+
#[public]
9494
#[inherit(Erc20, AccessControl)]
9595
impl Example {
9696
pub const MINTER_ROLE: [u8; 32] = MINTER_ROLE;
@@ -136,7 +136,7 @@ pub const BURNER_ROLE: [u8; 32] = [
136136
224, 87, 73, 143, 95, 0, 36, 97, 144, 234, 84, 34, 5, 118, 168, 72,
137137
];
138138
139-
#[external]
139+
#[public]
140140
#[inherit(Erc20, AccessControl)]
141141
impl Example {
142142
pub const MINTER_ROLE: [u8; 32] = MINTER_ROLE;

docs/modules/ROOT/pages/deploy.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ sol_storage! {
3737
}
3838
}
3939
40-
#[external]
40+
#[public]
4141
impl Counter {
4242
pub fn number(&self) -> U256 {
4343
self.number.get()

docs/modules/ROOT/pages/erc20-burnable.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sol_storage! {
2424
}
2525
}
2626
27-
#[external]
27+
#[public]
2828
#[inherit(Erc20)]
2929
impl Erc20Example {
3030
pub fn burn(&mut self, value: U256) -> Result<(), Vec<u8>> {

docs/modules/ROOT/pages/erc20-capped.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sol_storage! {
2626
}
2727
}
2828
29-
#[external]
29+
#[public]
3030
#[inherit(Erc20, Capped)]
3131
impl Erc20Example {
3232
// Add token minting feature.

docs/modules/ROOT/pages/erc20-metadata.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sol_storage! {
2626
}
2727
}
2828
29-
#[external]
29+
#[public]
3030
#[inherit(Erc20, Erc20Metadata, Capped, Pausable)]
3131
impl Erc20Example {
3232
// ...

docs/modules/ROOT/pages/erc20-pausable.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sol_storage! {
2626
}
2727
}
2828
29-
#[external]
29+
#[public]
3030
#[inherit(Erc20, Pausable)]
3131
impl Erc20Example {
3232
pub fn burn(&mut self, value: U256) -> Result<(), Vec<u8>> {

docs/modules/ROOT/pages/erc20-permit.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl IEip712 for Eip712 {
3131
const VERSION: &'static str = "1";
3232
}
3333
34-
#[external]
34+
#[public]
3535
#[inherit(Erc20Permit<Eip712>)]
3636
impl Erc20PermitExample {
3737
// ...

docs/modules/ROOT/pages/erc20.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sol_storage! {
2525
}
2626
}
2727
28-
#[external]
28+
#[public]
2929
#[inherit(Erc20, Erc20Metadata)]
3030
impl GLDToken {}
3131
----

docs/modules/ROOT/pages/erc721-burnable.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sol_storage! {
2424
}
2525
}
2626
27-
#[external]
27+
#[public]
2828
#[inherit(Erc721)]
2929
impl Erc721Example {
3030
pub fn burn(&mut self, token_id: U256) -> Result<(), Vec<u8>> {

docs/modules/ROOT/pages/erc721-consecutive.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sol_storage! {
2121
}
2222
}
2323
24-
#[external]
24+
#[public]
2525
#[inherit(Erc721Consecutive)]
2626
impl Erc721ConsecutiveExample {
2727
pub fn burn(&mut self, token_id: U256) -> Result<(), Error> {

docs/modules/ROOT/pages/erc721-enumerable.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sol_storage! {
2525
}
2626
}
2727
28-
#[external]
28+
#[public]
2929
#[inherit(Erc721, Erc721Enumerable)]
3030
impl Erc721Example {
3131
pub fn burn(&mut self, token_id: U256) -> Result<(), Vec<u8>> {

docs/modules/ROOT/pages/erc721-metadata.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sol_storage! {
2626
}
2727
}
2828
29-
#[external]
29+
#[public]
3030
#[inherit(Erc721, Erc721Metadata)]
3131
impl Erc721Example {
3232
// ...

docs/modules/ROOT/pages/erc721-pausable.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sol_storage! {
2626
}
2727
}
2828
29-
#[external]
29+
#[public]
3030
#[inherit(Erc721, Pausable)]
3131
impl Erc721Example {
3232
pub fn burn(&mut self, token_id: U256) -> Result<(), Vec<u8>> {

docs/modules/ROOT/pages/erc721-uri-storage.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ sol_storage! {
3333
}
3434
}
3535
36-
#[external]
36+
#[public]
3737
#[inherit(Erc721, Erc721Metadata, Erc721UriStorage)]
3838
impl Erc721MetadataExample {
3939
pub fn mint(&mut self, to: Address, token_id: U256) -> Result<(), Vec<u8>> {

docs/modules/ROOT/pages/erc721.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sol_storage! {
3232
}
3333
}
3434
35-
#[external]
35+
#[public]
3636
#[inherit(Erc721, Metadata)]
3737
impl GameItem {
3838
pub fn award_item(

0 commit comments

Comments
 (0)