Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into erc165-supports-inter…
Browse files Browse the repository at this point in the history
…face
  • Loading branch information
qalisander committed Sep 19, 2024
2 parents bec9e4c + d5ed376 commit e385668
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling of files in the workspace
uses: crate-ci/[email protected].1
uses: crate-ci/[email protected].6
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@

## Usage

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

```toml
[dependencies]
openzeppelin-stylus = { git = "https://github.com/OpenZeppelin/rust-contracts-stylus" }
openzeppelin-stylus = "0.1.0-rc"
```

We recommend pinning to a specific version -- expect rapid iteration.
Optionally,you can specify a git dependency if you want to have the latest changes from the `main` branch:

```toml
[dependencies]
openzeppelin-stylus = { git = "https://github.com/OpenZeppelin/rust-contracts-stylus" }
```

Once defined as a dependency, use one of our pre-defined implementations by
importing them:
Expand Down Expand Up @@ -62,8 +65,6 @@ For a full example that includes deploying and querying a contract, see the
For more information on what this library will include in the future, see our
[roadmap].

[specify a git dependency]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories
[examples]: ./examples
[basic]: ./examples/basic
[roadmap]: https://github.com/OpenZeppelin/rust-contracts-stylus/milestone/1

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/crypto.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ pub fn verify(&self, proof: Vec<B256>, root: B256, leaf: B256) -> bool {
}
----

Note that these functions use `keccak256` as the hashing algorithm, but our library also provides generic counterparts: https://docs.rs/crypto/latest/merkle/struct.Verifier.html#method.verify_with_builder[`verify_with_builer`] and https://docs.rs/crypto/latest/merkle/struct.Verifier.html#method.verify_multi_proof_with_builder[`verify_multi_proof_with_builder`].
Note that these functions use `keccak256` as the hashing algorithm, but our library also provides generic counterparts: https://docs.rs/crypto/latest/merkle/struct.Verifier.html#method.verify_with_builder[`verify_with_builder`] and https://docs.rs/crypto/latest/merkle/struct.Verifier.html#method.verify_multi_proof_with_builder[`verify_multi_proof_with_builder`].

We also provide an adapter https://docs.rs/crypto/latest/hash/index.html[`hash`] module to use your own hashers in conjunction with them that resembles Rust's standard library's API.

0 comments on commit e385668

Please sign in to comment.