https://github.com/sshmaxime/openzeppelin-rs
Use OpenZeppelin's contracts in Rust using ethers-rs library.
https://github.com/sshmaxime/openzeppelin-rs
contracts ethers-rs openzeppelin web3
Last synced: 12 months ago
JSON representation
Use OpenZeppelin's contracts in Rust using ethers-rs library.
- Host: GitHub
- URL: https://github.com/sshmaxime/openzeppelin-rs
- Owner: sshmaxime
- Created: 2023-05-29T19:28:35.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-31T23:35:56.000Z (about 3 years ago)
- Last Synced: 2025-06-05T05:15:02.087Z (about 1 year ago)
- Topics: contracts, ethers-rs, openzeppelin, web3
- Language: Rust
- Homepage: https://crates.io/crates/openzeppelin-rs
- Size: 5.88 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# openzeppelin-rs
> The library is actually located in the openzeppelin-rs folder.
## Quickstart
> This library depends on `ethers-rs`. If you haven't already added it to your project you can do it with `cargo add ethers`.
Add `openzeppelin-rs` to your project:
```
cargo add openzeppelin-rs
```
And add this to your code:
```
use openzeppelin_rs::*;
```
You are good to go !
## Exemple
```rust
use ethers::types::Address;
use openzeppelin_rs::*;
#[tokio::main]
async fn main() -> Result<(), Box> {
let address: Address = WETH_ADDRESS.parse()?;
let contract = ERC20::new(address, **yourProvider**);
println!("{}", contract.symbol().await?);
Ok(())
}
```