Skip to content

Commit 1aca331

Browse files
authored
Merge pull request #96 from OpenZeppelin/update-contracts-stylus-version
Update contracts stylus version in docs
2 parents e45e3ce + 2b52d72 commit 1aca331

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

content/contracts-stylus/index.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Add the dependency to your `Cargo.toml`:
1919

2020
```toml
2121
[dependencies]
22-
openzeppelin-stylus = "=0.2.0"
22+
openzeppelin-stylus = "=0.3.0"
2323
```
2424

2525
Enable the ABI export feature:
@@ -34,26 +34,26 @@ export-abi = ["openzeppelin-stylus/export-abi"]
3434
A minimal ERC-20 implementation using the library:
3535

3636
```rust
37-
use openzeppelin_stylus::token::erc20::self, Erc20, IErc20;
38-
use stylus_sdk::
39-
alloy_primitives::{Address, U256,
37+
use openzeppelin_stylus::token::erc20::{self, Erc20, IErc20};
38+
use stylus_sdk::{
39+
alloy_primitives::{Address, U256},
4040
prelude::*,
4141
};
4242

4343
#[entrypoint]
4444
#[storage]
45-
struct Erc20Example
45+
struct Erc20Example {
4646
erc20: Erc20,
47-
47+
}
4848

4949
#[public]
5050
#[implements(IErc20<Error = erc20::Error>)]
5151
impl Erc20Example {}
5252

5353
#[public]
54-
impl IErc20 for Erc20Example
54+
impl IErc20 for Erc20Example {
5555
// ERC-20 logic implementation...
56-
56+
}
5757
```
5858

5959
Explore more examples in the [`examples` directory](https://github.com/OpenZeppelin/rust-contracts-stylus/tree/main/examples).
@@ -64,7 +64,7 @@ This library is designed to work with `no_std`. To keep your contracts compatibl
6464

6565
```toml
6666
[dependencies]
67-
alloy-primitives = version = "=0.8.20", default-features = false
67+
alloy-primitives = "=0.8.20"
6868
stylus-sdk = "=0.9.0"
6969
```
7070

0 commit comments

Comments
 (0)