3 releases
0.1.2 | May 31, 2023 |
---|---|
0.1.1 | May 31, 2023 |
0.1.0 | May 31, 2023 |
#142 in #web3
33 downloads per month
7MB
294K
SLoC
openzeppelin-rs
Quickstart
This library depends on
ethers-rs
. If you haven't already added it to your project you can do it withcargo 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
use ethers::types::Address;
use openzeppelin_rs::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let address: Address = WETH_ADDRESS.parse()?;
let contract = ERC20::new(address, **yourProvider**);
println!("{}", contract.symbol().await?);
Ok(())
}
Dependencies
~22–38MB
~698K SLoC