Skip to main content

Official Python SDK for the Enzyme Protocol

Project description

Enzyme Python SDK

License: MIT

This is a work in progress. Your mileage may vary.

Installation

pip install enzymefinance

Getting started

We are currently in the process of writing thorough documentation & tutorials. In the meantime, here there are some quick start examples.

Reading Vault info

import asyncio
from enzymefinance.sdk import vault
from enzymefinance.sdk.utils.clients import PublicClient

async def main():
    client = PublicClient(<RPC_URL>)
    name = await vault.get_name(
        client=client,
        vault_proxy=<VAULT_ADDRESS>,
    )
    print(name)

asyncio.run(main())
  • <RPC_URL>: The RPC URL of the network you want to connect to.
  • <VAULT_ADDRESS>: The checksum address of the vault you want to read.

Writing Vault info

import asyncio
from enzymefinance.sdk import vault
from enzymefinance.sdk.utils.clients import WalletClient

async def main():
    client = WalletClient(<RPC_URL>, <PRIVATE_KEY>)
    tx_params = await vault.set_name(
        client=client,
        vault_proxy=<VAULT_ADDRESS>,
        name="My new vault",
    )
    tx_hash = await client.send_transaction(tx_params)
    print(tx_hash)

asyncio.run(main())
  • <RPC_URL>: The RPC URL of the network you want to connect to.
  • <VAULT_ADDRESS>: The checksum address of the vault you want to read.
  • <PRIVATE_KEY>: The private key of the account you want to use to send the transaction.

Get environment info

from enzymefinance.environment import get_deployment

get_deployment("arbitrum")

Get one specific abi

from enzymefinance.abis import abis

abis.IVaultLib

Community

Check out the following places for support, discussions & feedback:

Authors

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enzymefinance-0.1.1.tar.gz (157.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enzymefinance-0.1.1-py3-none-any.whl (255.2 kB view details)

Uploaded Python 3

File details

Details for the file enzymefinance-0.1.1.tar.gz.

File metadata

  • Download URL: enzymefinance-0.1.1.tar.gz
  • Upload date:
  • Size: 157.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for enzymefinance-0.1.1.tar.gz
Algorithm Hash digest
SHA256 509481c2b746f529cb08a4a4897ea46cb9b15831ac3cba67bbd151d40089e014
MD5 c4a136ff855f5473a130fea0f3a86030
BLAKE2b-256 be3525e8deaf81e303a790fe136b1e064d640ebd2b5570755cd2b94160158815

See more details on using hashes here.

File details

Details for the file enzymefinance-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: enzymefinance-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 255.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for enzymefinance-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ad97a734c15a6e64c325f5501d089852c9b6ab30de54923c70f61f2606ef648
MD5 ab68c1876918a05716dfc157e76f5e8c
BLAKE2b-256 8308e97b3f98864e1dcfa39c7c41a6b2f1e2173d3783a5abb7efd440cebf94c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page