You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ If you want to use some of our newest features before they are fully stable or a
28
28
29
29
```toml
30
30
[dependencies]
31
-
openzeppelin-stylus = "=0.2.0-alpha.4"
31
+
openzeppelin-stylus = "=0.2.0-rc.0"
32
32
```
33
33
34
34
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.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/access-control.adoc
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Access control—that is, "who is allowed to do this thing"—is incredibly impo
7
7
8
8
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.
9
9
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.
11
11
12
12
[source,rust]
13
13
----
@@ -74,12 +74,12 @@ impl IOwnable for MyContract {
74
74
}
75
75
----
76
76
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.
78
78
79
79
Ownable also lets you:
80
80
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.
83
83
84
84
WARNING: Removing the owner altogether will mean that administrative tasks that are protected by `only_owner` will no longer be callable!
85
85
@@ -100,7 +100,7 @@ Most software uses access control systems that are role-based: some users are re
100
100
[[using-access-control]]
101
101
=== Using `AccessControl`
102
102
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,
104
104
you will create a new _role identifier_ that is used to grant, revoke, and check if an account has that role.
105
105
106
106
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 {
256
256
}
257
257
----
258
258
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.
260
260
261
261
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.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/crypto.adoc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ Developers can build a Merkle Tree off-chain, which allows for verifying that an
8
8
9
9
TIP: OpenZeppelin Contracts provides a https://github.com/OpenZeppelin/merkle-tree[JavaScript library] for building trees off-chain and generating proofs.
* 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].
14
14
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.
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`].
26
26
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.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/erc1155-burnable.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ own tokens and those that they have been approved to use.
6
6
[[usage]]
7
7
== Usage
8
8
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:
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/erc1155-metadata-uri.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This is particularly useful for non-fungible tokens (NFTs) where each token is u
7
7
[[usage]]
8
8
== Usage
9
9
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,
11
11
you need to add the following code to your contract:
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/erc1155-pausable.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Useful for scenarios such as preventing trades until the end of an evaluation pe
7
7
[[usage]]
8
8
== Usage
9
9
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:
0 commit comments