Skip to content

Commit 5ed33dd

Browse files
authored
build: bump to v0.2.0-rc.0 (#630)
1 parent 788c7b2 commit 5ed33dd

31 files changed

+93
-76
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
### Changed
13+
14+
### Changed (Breaking)
15+
16+
## [v0.2.0-rc.0] - 2025-05-22
17+
18+
### Added
19+
1220
- Contracts now support constructors. #639
1321
- Add Pedersen hash with Starknet parameters. #644
1422
- Add shift left, right operators to Uint. #644

Cargo.lock

Lines changed: 38 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ authors = ["OpenZeppelin"]
7070
edition = "2021"
7171
license = "MIT"
7272
repository = "https://github.com/OpenZeppelin/rust-contracts-stylus"
73-
version = "0.2.0-alpha.4"
73+
version = "0.2.0-rc.0"
7474

7575
[workspace.lints.rust]
7676
missing_docs = "warn"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you want to use some of our newest features before they are fully stable or a
2828

2929
```toml
3030
[dependencies]
31-
openzeppelin-stylus = "=0.2.0-alpha.4"
31+
openzeppelin-stylus = "=0.2.0-rc.0"
3232
```
3333

3434
We put great effort in testing the contracts before releasing an alpha, but these are not yet audited and we don't guarantee any backwards compatibility between alpha version.

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Access control—that is, "who is allowed to do this thing"—is incredibly impo
77

88
The most common and basic form of access control is the concept of _ownership_: there's an account that is the `owner` of a contract and can do administrative tasks on it. This approach is perfectly reasonable for contracts that have a single administrative user.
99

10-
OpenZeppelin Contracts for Stylus provides https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/access/ownable/struct.Ownable.html[`Ownable`] for implementing ownership in your contracts.
10+
OpenZeppelin Contracts for Stylus provides https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/access/ownable/struct.Ownable.html[`Ownable`] for implementing ownership in your contracts.
1111

1212
[source,rust]
1313
----
@@ -74,12 +74,12 @@ impl IOwnable for MyContract {
7474
}
7575
----
7676

77-
At deployment, the https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/access/ownable/struct.Ownable.html#method.owner[`owner`] of an `Ownable` contract is set to the provided `initial_owner` parameter.
77+
At deployment, the https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/access/ownable/struct.Ownable.html#method.owner[`owner`] of an `Ownable` contract is set to the provided `initial_owner` parameter.
7878

7979
Ownable also lets you:
8080

81-
* https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/access/ownable/struct.Ownable.html#method.transfer_ownership[`transfer_ownership`] from the owner account to a new one, and
82-
* https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/access/ownable/struct.Ownable.html#method.renounce_ownership[`renounce_ownership`] for the owner to relinquish this administrative privilege, a common pattern after an initial stage with centralized administration is over.
81+
* https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/access/ownable/struct.Ownable.html#method.transfer_ownership[`transfer_ownership`] from the owner account to a new one, and
82+
* https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/access/ownable/struct.Ownable.html#method.renounce_ownership[`renounce_ownership`] for the owner to relinquish this administrative privilege, a common pattern after an initial stage with centralized administration is over.
8383

8484
WARNING: Removing the owner altogether will mean that administrative tasks that are protected by `only_owner` will no longer be callable!
8585

@@ -100,7 +100,7 @@ Most software uses access control systems that are role-based: some users are re
100100
[[using-access-control]]
101101
=== Using `AccessControl`
102102

103-
OpenZeppelin Contracts provides https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/access/control/struct.AccessControl.html[`AccessControl`] for implementing role-based access control. Its usage is straightforward: for each role that you want to define,
103+
OpenZeppelin Contracts provides https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/access/control/struct.AccessControl.html[`AccessControl`] for implementing role-based access control. Its usage is straightforward: for each role that you want to define,
104104
you will create a new _role identifier_ that is used to grant, revoke, and check if an account has that role.
105105

106106
Here's a simple example of using `AccessControl` in an xref:erc20.adoc[ERC-20 token] to define a 'minter' role, which allows accounts that have it create new tokens. Note that the example is unassuming of the way you construct your contract.
@@ -256,7 +256,7 @@ impl IAccessControl for Example {
256256
}
257257
----
258258

259-
NOTE: Make sure you fully understand how https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/access/control/struct.AccessControl.html[`AccessControl`] works before using it on your system, or copy-pasting the examples from this guide.
259+
NOTE: Make sure you fully understand how https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/access/control/struct.AccessControl.html[`AccessControl`] works before using it on your system, or copy-pasting the examples from this guide.
260260

261261
While clear and explicit, this isn't anything we wouldn't have been able to achieve with `Ownable`. Indeed, where `AccessControl` shines is in scenarios where granular permissions are required, which can be implemented by defining _multiple_ roles.
262262

docs/modules/ROOT/pages/crypto.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Developers can build a Merkle Tree off-chain, which allows for verifying that an
88

99
TIP: OpenZeppelin Contracts provides a https://github.com/OpenZeppelin/merkle-tree[JavaScript library] for building trees off-chain and generating proofs.
1010

11-
https://docs.rs/openzeppelin-crypto/0.2.0-alpha.4/openzeppelin_crypto/merkle/struct.Verifier.html[`MerkleProof`] provides:
11+
https://docs.rs/openzeppelin-crypto/0.2.0-rc.0/openzeppelin_crypto/merkle/struct.Verifier.html[`MerkleProof`] provides:
1212

13-
* https://docs.rs/openzeppelin-crypto/0.2.0-alpha.4/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify[`verify`] - can prove that some value is part of a https://en.wikipedia.org/wiki/Merkle_tree[Merkle tree].
13+
* https://docs.rs/openzeppelin-crypto/0.2.0-rc.0/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify[`verify`] - can prove that some value is part of a https://en.wikipedia.org/wiki/Merkle_tree[Merkle tree].
1414

15-
* https://docs.rs/openzeppelin-crypto/0.2.0-alpha.4/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify_multi_proof[`verify_multi_proof`] - can prove multiple values are part of a Merkle tree.
15+
* https://docs.rs/openzeppelin-crypto/0.2.0-rc.0/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify_multi_proof[`verify_multi_proof`] - can prove multiple values are part of a Merkle tree.
1616

1717
[source,rust]
1818
----
@@ -22,6 +22,6 @@ fn verify(&self, proof: Vec<B256>, root: B256, leaf: B256) -> bool {
2222
}
2323
----
2424

25-
Note that these functions use `keccak256` as the hashing algorithm, but our library also provides generic counterparts: https://docs.rs/openzeppelin-crypto/0.2.0-alpha.4/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify_with_builder[`verify_with_builder`] and https://docs.rs/openzeppelin-crypto/0.2.0-alpha.4/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify_multi_proof_with_builder[`verify_multi_proof_with_builder`].
25+
Note that these functions use `keccak256` as the hashing algorithm, but our library also provides generic counterparts: https://docs.rs/openzeppelin-crypto/0.2.0-rc.0/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify_with_builder[`verify_with_builder`] and https://docs.rs/openzeppelin-crypto/0.2.0-rc.0/openzeppelin_crypto/merkle/struct.Verifier.html#method.verify_multi_proof_with_builder[`verify_multi_proof_with_builder`].
2626

27-
We also provide an adapter https://docs.rs/openzeppelin-crypto/0.2.0-alpha.4/openzeppelin_crypto/hash/index.html[`hash`] module to use your own hashers in conjunction with them that resembles Rust's standard library's API.
27+
We also provide an adapter https://docs.rs/openzeppelin-crypto/0.2.0-rc.0/openzeppelin_crypto/hash/index.html[`hash`] module to use your own hashers in conjunction with them that resembles Rust's standard library's API.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ own tokens and those that they have been approved to use.
66
[[usage]]
77
== Usage
88

9-
In order to make https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/token/erc1155/extensions/burnable/index.html[`ERC-1155 Burnable`] methods “external” so that other contracts can call them, you need to implement them by yourself for your final contract as follows:
9+
In order to make https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/token/erc1155/extensions/burnable/index.html[`ERC-1155 Burnable`] methods “external” so that other contracts can call them, you need to implement them by yourself for your final contract as follows:
1010

1111
[source,rust]
1212
----

docs/modules/ROOT/pages/erc1155-metadata-uri.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is particularly useful for non-fungible tokens (NFTs) where each token is u
77
[[usage]]
88
== Usage
99

10-
In order to make an xref:erc1155.adoc[ERC-1155] token with https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/token/erc1155/extensions/metadata_uri/index.html[Metadata URI] flavour,
10+
In order to make an xref:erc1155.adoc[ERC-1155] token with https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/token/erc1155/extensions/metadata_uri/index.html[Metadata URI] flavour,
1111
you need to add the following code to your contract:
1212

1313
[source,rust]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Useful for scenarios such as preventing trades until the end of an evaluation pe
77
[[usage]]
88
== Usage
99

10-
In order to make your xref:erc1155.adoc[ERC-1155] token `pausable`, you need to use the https://docs.rs/openzeppelin-stylus/0.2.0-alpha.4/openzeppelin_stylus/utils/pausable/index.html[`Pausable`] contract and apply its mechanisms to ERC1155 token functions as follows:
10+
In order to make your xref:erc1155.adoc[ERC-1155] token `pausable`, you need to use the https://docs.rs/openzeppelin-stylus/0.2.0-rc.0/openzeppelin_stylus/utils/pausable/index.html[`Pausable`] contract and apply its mechanisms to ERC1155 token functions as follows:
1111

1212
[source,rust]
1313
----

0 commit comments

Comments
 (0)