openzeppelin-rs

Crates.ioopenzeppelin-rs
lib.rsopenzeppelin-rs
version0.1.2
sourcesrc
created_at2023-05-31 16:06:46.255044
updated_at2023-05-31 23:43:08.043022
descriptionTypings for Openzeppelin's contracts in Rust using ethers.
homepage
repositoryhttps://github.com/sshmaxime/openzeppelin-rs
max_upload_size
id878936
size7,146,170
Maxime Aubanel (sshmaxime)

documentation

README

openzeppelin-rs

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

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(())
}
Commit count: 9

cargo fmt