Skip to content

Commit 2c230a5

Browse files
committed
Create README.md
1 parent 0e0f770 commit 2c230a5

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

README.md

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Enzyme Python SDK
2+
3+
[![License: MIT](https://img.shields.io/github/license/enzymefinance/sdk)](/LICENSE)
4+
5+
This is a work in progress. Your mileage may vary.
6+
7+
8+
## Installation
9+
10+
```bash
11+
pip install enzymefinance
12+
```
13+
14+
## Getting started
15+
16+
We are currently in the process of writing thorough documentation & tutorials. In the meantime, here there are some quick start examples.
17+
18+
### Reading Vault info
19+
20+
```python
21+
import asyncio
22+
from enzymefinance.sdk import vault
23+
from enzymefinance.sdk.utils.clients import PublicClient
24+
25+
async def main():
26+
client = PublicClient(<RPC_URL>)
27+
name = await vault.get_name(
28+
client=client,
29+
vault_proxy=<VAULT_ADDRESS>,
30+
)
31+
print(name)
32+
33+
asyncio.run(main())
34+
```
35+
36+
- `<RPC_URL>`: The RPC URL of the network you want to connect to.
37+
- `<VAULT_ADDRESS>`: The **checksum** address of the vault you want to read.
38+
39+
### Writing Vault info
40+
41+
```python
42+
import asyncio
43+
from enzymefinance.sdk import vault
44+
from enzymefinance.sdk.utils.clients import WalletClient
45+
46+
async def main():
47+
client = WalletClient(<RPC_URL>, <PRIVATE_KEY>)
48+
tx_params = await vault.set_name(
49+
client=client,
50+
vault_proxy=<VAULT_ADDRESS>,
51+
name="My new vault",
52+
)
53+
tx_hash = await client.send_transaction(tx_params)
54+
print(tx_hash)
55+
56+
asyncio.run(main())
57+
```
58+
59+
- `<RPC_URL>`: The RPC URL of the network you want to connect to.
60+
- `<VAULT_ADDRESS>`: The **checksum** address of the vault you want to read.
61+
- `<PRIVATE_KEY>`: The private key of the account you want to use to send the transaction.
62+
63+
### Get environment info
64+
65+
```python
66+
from enzymefinance.environment import get_deployment
67+
68+
get_deployment("arbitrum")
69+
```
70+
71+
### Get one specific abi
72+
73+
```python
74+
from enzymefinance.abis import abis
75+
76+
abis.IVaultLib
77+
```
78+
79+
## Community
80+
81+
Check out the following places for support, discussions & feedback:
82+
83+
- Join our [Discord server](https://discord.enzyme.finance)
84+
- Join our [Telegram group](https://telegram.enzyme.finance)
85+
- Join the [Discussions on GitHub](https://github.com/enzymefinance/sdk/discussions)
86+
87+
## Authors
88+
89+
- [@guillemap](https://github.com/guillemap)
90+
91+
## License
92+
93+
[MIT](/LICENSE) License

0 commit comments

Comments
 (0)