File tree 2 files changed +39
-3
lines changed
2 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 1
- openzeppelin-rs/README.md
1
+ # openzeppelin-rs
2
+
3
+ > The library is actually located in the openzeppelin-rs folder.
4
+
5
+ ## Quickstart
6
+
7
+ > This library depends on ` ethers-rs ` . If you haven't already added it to your project you can do it with ` cargo add ethers ` .
8
+
9
+ Add ` openzeppelin-rs ` to your project:
10
+
11
+ ```
12
+ cargo add openzeppelin-rs
13
+ ```
14
+
15
+ And add this to your code:
16
+
17
+ ```
18
+ use openzeppelin_rs::*;
19
+ ```
20
+
21
+ You are good to go !
22
+
23
+ ## Exemple
24
+
25
+ ``` rust
26
+ use ethers :: types :: Address ;
27
+ use openzeppelin_rs :: * ;
28
+
29
+ #[tokio:: main]
30
+ async fn main () -> Result <(), Box <dyn std :: error :: Error >> {
31
+
32
+ let address : Address = WETH_ADDRESS . parse ()? ;
33
+ let contract = ERC20 :: new (address , * * yourProvider** );
34
+
35
+ println! (" {}" , contract . symbol (). await ? );
36
+
37
+ Ok (())
38
+ }
39
+ ```
Original file line number Diff line number Diff line change 1
1
# openzeppelin-rs
2
2
3
- > The library is actually located in the openzeppelin-rs folder.
4
-
5
3
## Quickstart
6
4
7
5
> This library depends on ` ethers-rs ` . If you haven't already added it to your project you can do it with ` cargo add ethers ` .
You can’t perform that action at this time.
0 commit comments