Metadata-Version: 2.1
Name: yearn-treasury
Version: 0.0.17
Summary: This WIP library runs the eth-portfolio and dao-treasury exporters for the Yearn Finance treasury.
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10,<3.13
Description-Content-Type: text/markdown

This WIP library runs the [dao-treasury](https://github.com/BobTheBuidler/dao-treasury) exporter for the [Yearn Finance](https://yearn.fi/) treasury.

## Installation

- **pip:**
  ```bash
   pip install yearn-treasury
  ```

- **From Source:**  
  ```bash
  git clone https://github.com/BobTheBuidler/yearn-treasury
  cd yearn-treasury
  poetry install
  ```

## Requirements
- Python 3.10 or higher.
- At least 16GB of RAM.
- All dependencies installed as specified in the project’s pyproject.toml file.

## Prerequisites

- First, you will need to bring your own archive node. This can be one you run yourself, or one from one of the common providers (Tenderly, Alchemy, QuickNode, etc.)
- You must configure a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) to use your RPC.
- You'll also need [Docker](https://www.docker.com/get-started/) installed on your system. If on MacOS, you will need to leave Docker Desktop open while Yearn Treasury is running.

## Usage

Run the treasury export tool:

```bash
# For pip installations:
yearn-treasury run --network mainnet --interval 12h
```

For local development (from source installation), use:
```bash
poetry run yearn-treasury run --network mainnet --interval 12h
```

**CLI Options:**
- `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
- `--interval`: The time interval between each data snapshot (default: 12h)
- `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
- `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
- `--renderer-port`: Set the port for the report rendering service (default: 8080)
- `--victoria-port`: Set the port for the Victoria metrics reporting endpoint (default: 8430)

After running the command, the export script will run continuously until you close your terminal.
To access the dashboard, open your browser and navigate to [http://localhost:3004](http://localhost:3004) for the [dao-treasury](https://github.com/BobTheBuidler/dao-treasury) dashboard.

Enjoy!

## Screenshots

#### [Transactions Dashboard](https://bobthebuidler.github.io/yearn-treasury/transactions.html)

![image](https://github.com/user-attachments/assets/4293b62d-827a-4bae-af4f-014c99511f99)
