dao-treasury 0.0.21__cp311-cp311-win_amd64.whl → 0.0.71__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dao-treasury might be problematic. Click here for more details.
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +551 -0
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +551 -0
- dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -7
- dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +220 -0
- dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +286 -29
- dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +217 -84
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +808 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +602 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +981 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +3060 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +478 -0
- dao_treasury/.grafana/provisioning/datasources/datasources.yaml +17 -0
- dao_treasury/ENVIRONMENT_VARIABLES.py +20 -0
- dao_treasury/__init__.py +20 -0
- dao_treasury/_docker.cp311-win_amd64.pyd +0 -0
- dao_treasury/_docker.py +67 -38
- dao_treasury/_nicknames.cp311-win_amd64.pyd +0 -0
- dao_treasury/_nicknames.py +24 -2
- dao_treasury/_wallet.cp311-win_amd64.pyd +0 -0
- dao_treasury/_wallet.py +157 -16
- dao_treasury/constants.cp311-win_amd64.pyd +0 -0
- dao_treasury/constants.py +39 -0
- dao_treasury/db.py +384 -45
- dao_treasury/docker-compose.yaml +6 -5
- dao_treasury/main.py +118 -17
- dao_treasury/sorting/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/__init__.py +171 -42
- dao_treasury/sorting/_matchers.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/_rules.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/_rules.py +1 -3
- dao_treasury/sorting/factory.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/factory.py +2 -6
- dao_treasury/sorting/rule.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rule.py +13 -10
- dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/__init__.py +1 -0
- dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.py +1 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.py +20 -0
- dao_treasury/streams/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/streams/__init__.py +0 -0
- dao_treasury/streams/llamapay.cp311-win_amd64.pyd +0 -0
- dao_treasury/streams/llamapay.py +388 -0
- dao_treasury/treasury.py +79 -30
- dao_treasury/types.cp311-win_amd64.pyd +0 -0
- dao_treasury-0.0.71.dist-info/METADATA +134 -0
- dao_treasury-0.0.71.dist-info/RECORD +54 -0
- dao_treasury-0.0.71.dist-info/top_level.txt +2 -0
- dao_treasury__mypyc.cp311-win_amd64.pyd +0 -0
- 52b51d40e96d4333695d__mypyc.cp311-win_amd64.pyd +0 -0
- dao_treasury/.grafana/provisioning/datasources/sqlite.yaml +0 -10
- dao_treasury-0.0.21.dist-info/METADATA +0 -63
- dao_treasury-0.0.21.dist-info/RECORD +0 -31
- dao_treasury-0.0.21.dist-info/top_level.txt +0 -2
- {dao_treasury-0.0.21.dist-info → dao_treasury-0.0.71.dist-info}/WHEEL +0 -0
dao_treasury/treasury.py
CHANGED
|
@@ -1,19 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
"""Treasury orchestration and analytics interface.
|
|
2
|
+
|
|
3
|
+
This module defines the Treasury class, which aggregates DAO wallets, sets up
|
|
4
|
+
sorting rules, and manages transaction ingestion and streaming analytics.
|
|
5
|
+
It coordinates the end-to-end flow from wallet configuration to database
|
|
6
|
+
population and dashboard analytics.
|
|
7
|
+
|
|
8
|
+
Key Responsibilities:
|
|
9
|
+
- Aggregate and manage DAO-controlled wallets.
|
|
10
|
+
- Ingest and process on-chain transactions.
|
|
11
|
+
- Apply sorting/categorization rules.
|
|
12
|
+
- Integrate with streaming protocols (e.g., LlamaPay).
|
|
13
|
+
- Populate the database for analytics and dashboards.
|
|
14
|
+
|
|
15
|
+
This is the main entry point for orchestrating DAO treasury analytics.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from asyncio import create_task, gather
|
|
2
19
|
from logging import getLogger
|
|
3
20
|
from pathlib import Path
|
|
4
|
-
from typing import Final, Iterable, List, Optional, Union
|
|
21
|
+
from typing import Dict, Final, Iterable, List, Optional, Union
|
|
5
22
|
|
|
6
23
|
import a_sync
|
|
7
24
|
from a_sync.a_sync.abstract import ASyncABC
|
|
8
|
-
from eth_typing import BlockNumber
|
|
25
|
+
from eth_typing import BlockNumber, HexAddress
|
|
9
26
|
from eth_portfolio.structs import LedgerEntry
|
|
10
27
|
from eth_portfolio.typing import PortfolioBalances
|
|
11
28
|
from eth_portfolio_scripts._portfolio import ExportablePortfolio
|
|
29
|
+
from pony.orm import db_session
|
|
12
30
|
from tqdm.asyncio import tqdm_asyncio
|
|
13
31
|
|
|
14
32
|
from dao_treasury._wallet import TreasuryWallet
|
|
33
|
+
from dao_treasury.constants import CHAINID
|
|
15
34
|
from dao_treasury.db import TreasuryTx
|
|
16
35
|
from dao_treasury.sorting._rules import Rules
|
|
36
|
+
from dao_treasury.streams import llamapay
|
|
17
37
|
|
|
18
38
|
|
|
19
39
|
Wallet = Union[TreasuryWallet, str]
|
|
@@ -32,6 +52,7 @@ class Treasury(a_sync.ASyncGenericBase): # type: ignore [misc]
|
|
|
32
52
|
sort_rules: Optional[Path] = None,
|
|
33
53
|
start_block: int = 0,
|
|
34
54
|
label: str = "your org's treasury",
|
|
55
|
+
custom_buckets: Optional[Dict[HexAddress, str]] = None,
|
|
35
56
|
asynchronous: bool = False,
|
|
36
57
|
) -> None:
|
|
37
58
|
"""Initialize the Treasury singleton for managing DAO funds.
|
|
@@ -56,20 +77,22 @@ class Treasury(a_sync.ASyncGenericBase): # type: ignore [misc]
|
|
|
56
77
|
TypeError: If any item in `wallets` is not a str or TreasuryWallet.
|
|
57
78
|
|
|
58
79
|
Examples:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
.. code-block:: python
|
|
81
|
+
|
|
82
|
+
# Create a synchronous Treasury
|
|
83
|
+
treasury = Treasury(
|
|
84
|
+
wallets=["0xAbc123...", TreasuryWallet("0xDef456...", start_block=1000)],
|
|
85
|
+
sort_rules=Path("/path/to/rules"),
|
|
86
|
+
start_block=500,
|
|
87
|
+
label="DAO Treasury",
|
|
88
|
+
asynchronous=False
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
# Create an asynchronous Treasury
|
|
92
|
+
treasury_async = Treasury(
|
|
93
|
+
wallets=["0xAbc123..."],
|
|
94
|
+
asynchronous=True
|
|
95
|
+
)
|
|
73
96
|
"""
|
|
74
97
|
global TREASURY
|
|
75
98
|
if TREASURY is not None:
|
|
@@ -94,14 +117,23 @@ class Treasury(a_sync.ASyncGenericBase): # type: ignore [misc]
|
|
|
94
117
|
self.sort_rules: Final = Rules(sort_rules) if sort_rules else None
|
|
95
118
|
|
|
96
119
|
self.portfolio: Final = ExportablePortfolio(
|
|
97
|
-
addresses=(
|
|
120
|
+
addresses=(
|
|
121
|
+
wallet.address
|
|
122
|
+
for wallet in self.wallets
|
|
123
|
+
if wallet.networks is None or CHAINID in wallet.networks
|
|
124
|
+
),
|
|
98
125
|
start_block=start_block,
|
|
99
126
|
label=label,
|
|
100
127
|
load_prices=True,
|
|
128
|
+
custom_buckets=custom_buckets,
|
|
101
129
|
asynchronous=asynchronous,
|
|
102
130
|
)
|
|
103
131
|
"""An eth_portfolio.Portfolio object used for exporting tx and balance history"""
|
|
104
132
|
|
|
133
|
+
self._llamapay: Final = (
|
|
134
|
+
llamapay.LlamaPayProcessor() if CHAINID in llamapay.networks else None
|
|
135
|
+
)
|
|
136
|
+
|
|
105
137
|
self.asynchronous: Final = asynchronous
|
|
106
138
|
"""A boolean flag indicating whether the API for this `Treasury` object is sync or async by default"""
|
|
107
139
|
|
|
@@ -114,7 +146,7 @@ class Treasury(a_sync.ASyncGenericBase): # type: ignore [misc]
|
|
|
114
146
|
def txs(self) -> a_sync.ASyncIterator[LedgerEntry]:
|
|
115
147
|
return self.portfolio.ledger.all_entries
|
|
116
148
|
|
|
117
|
-
async def
|
|
149
|
+
async def _insert_txs(
|
|
118
150
|
self, start_block: BlockNumber, end_block: BlockNumber
|
|
119
151
|
) -> None:
|
|
120
152
|
"""Populate the database with treasury transactions in a block range.
|
|
@@ -130,15 +162,32 @@ class Treasury(a_sync.ASyncGenericBase): # type: ignore [misc]
|
|
|
130
162
|
|
|
131
163
|
Examples:
|
|
132
164
|
>>> # Insert transactions from block 0 to 10000
|
|
133
|
-
>>> await treasury.
|
|
165
|
+
>>> await treasury._insert_txs(0, 10000)
|
|
166
|
+
"""
|
|
167
|
+
with db_session:
|
|
168
|
+
futs = []
|
|
169
|
+
async for entry in self.portfolio.ledger[start_block:end_block]:
|
|
170
|
+
if not entry.value:
|
|
171
|
+
# TODO: add an arg in eth-port to skip 0 value
|
|
172
|
+
logger.debug("zero value transfer, skipping %s", entry)
|
|
173
|
+
continue
|
|
174
|
+
futs.append(create_task(TreasuryTx.insert(entry)))
|
|
175
|
+
if futs:
|
|
176
|
+
await tqdm_asyncio.gather(*futs, desc="Insert Txs to Postgres")
|
|
177
|
+
logger.info(f"{len(futs)} transfers exported")
|
|
178
|
+
|
|
179
|
+
async def _process_streams(self) -> None:
|
|
180
|
+
if self._llamapay is not None:
|
|
181
|
+
await self._llamapay.process_streams(run_forever=True)
|
|
182
|
+
|
|
183
|
+
async def populate_db(
|
|
184
|
+
self, start_block: BlockNumber, end_block: BlockNumber
|
|
185
|
+
) -> None:
|
|
186
|
+
"""
|
|
187
|
+
Populate the database with treasury transactions and streams in parallel.
|
|
134
188
|
"""
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
continue
|
|
141
|
-
futs.append(create_task(TreasuryTx.insert(entry)))
|
|
142
|
-
|
|
143
|
-
if futs:
|
|
144
|
-
await tqdm_asyncio.gather(*futs, desc="Insert Txs to Postgres")
|
|
189
|
+
tasks = [self._insert_txs(start_block, end_block)]
|
|
190
|
+
if self._llamapay:
|
|
191
|
+
tasks.append(self._process_streams())
|
|
192
|
+
await gather(*tasks)
|
|
193
|
+
logger.info("db connection closed")
|
|
Binary file
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dao_treasury
|
|
3
|
+
Version: 0.0.71
|
|
4
|
+
Summary: Produce comprehensive financial reports for your on-chain org
|
|
5
|
+
Classifier: Development Status :: 3 - Alpha
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: Intended Audience :: Science/Research
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
15
|
+
Requires-Python: >=3.10,<3.13
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: eth-portfolio-temp==0.3.1
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: requires-dist
|
|
22
|
+
Dynamic: requires-python
|
|
23
|
+
Dynamic: summary
|
|
24
|
+
|
|
25
|
+
DAO Treasury is a comprehensive financial reporting and treasury management solution designed specifically for decentralized organizations. Built as an extension to [eth-portfolio](https://github.com/BobTheBuidler/eth-portfolio)'s [Portfolio Exporter](https://bobthebuidler.github.io/eth-portfolio/exporter.html), DAO Treasury automates the collection and visualization of financial data, enabling organizations to monitor and report on treasury activities with clarity and transparency.
|
|
26
|
+
|
|
27
|
+
## Key Features
|
|
28
|
+
|
|
29
|
+
- **Financial Reporting for DAOs:** Extends core portfolio functionalities to generate detailed reports tailored for on-chain organizations.
|
|
30
|
+
- **Dashboard Provisioning:** Utilizes [Grafana](https://grafana.com/) dashboards—defined in JSON files within the .grafana/provisioning directories—to offer real-time, dynamic visualizations of treasury data.
|
|
31
|
+
- **Automated Data Export:** Features a treasury export tool that, once configured (with a supported [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) and [Docker](https://www.docker.com/get-started/)), continuously captures financial snapshots at set intervals.
|
|
32
|
+
- **Custom Buckets for Wallets:** Assign custom categories ("buckets") to specific wallet addresses for more granular reporting using the `--custom-bucket` CLI option.
|
|
33
|
+
- **Ease of Contribution:** Non-technical users can easily update or create dashboard visuals using Grafana’s intuitive UI. The [Contributing Guidelines](https://github.com/BobTheBuidler/dao-treasury/blob/master/CONTRIBUTING.md) document provides a step-by-step guide to defining new visuals and dashboards and integrating those changes into the repository, ensuring that anyone can contribute to the visual reporting aspect of the project.
|
|
34
|
+
|
|
35
|
+
## Requirements
|
|
36
|
+
- Python 3.10 or higher.
|
|
37
|
+
- At least 16GB of RAM.
|
|
38
|
+
- All dependencies installed as specified in the project’s pyproject.toml file.
|
|
39
|
+
|
|
40
|
+
## Prerequisites
|
|
41
|
+
|
|
42
|
+
- 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.). Your archive node must have tracing enabled (free-tier Alchemy nodes do not support this option).
|
|
43
|
+
- You must configure a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) to use your RPC.
|
|
44
|
+
- You will need an auth token for [Etherscan](https://etherscan.io/)'s API. Follow their [guide](https://docs.etherscan.io/etherscan-v2/getting-an-api-key) to get your key, and set env var `ETHERSCAN_TOKEN` with its value.
|
|
45
|
+
- 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 DAO Treasury is running.
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install dao-treasury
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
Run the treasury export tool:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# For pip installations:
|
|
59
|
+
dao-treasury run --wallet 0x123 --network mainnet --interval 12h
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
For local development (from source installation), use:
|
|
63
|
+
```bash
|
|
64
|
+
poetry run dao-treasury run --wallet 0x123 --network mainnet --interval 12h
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Assigning Custom Buckets to Wallets:**
|
|
68
|
+
|
|
69
|
+
You can assign custom categories ("buckets") to specific wallet addresses for more granular reporting. Use the `--custom-bucket` option one or more times, each with the format `address:bucket_name`:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
dao-treasury run --wallet 0x123 --network mainnet --custom-bucket "0x123:Operations" --custom-bucket "0x456:Grants" --custom-bucket "0x789:Investments"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**CLI Options:**
|
|
76
|
+
> Only optional arguments are listed here. Required arguments (such as `--wallet` or `--wallets`) are shown in the usage examples above.
|
|
77
|
+
|
|
78
|
+
- `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
|
|
79
|
+
- `--interval`: The time interval between each data snapshot (default: 12h)
|
|
80
|
+
- `--concurrency`: The max number of historical blocks to export concurrently. (default: 30)
|
|
81
|
+
- `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
|
|
82
|
+
- `--sort-rules`: Directory containing sort rules definitions for transaction categorization.
|
|
83
|
+
- `--nicknames`: File containing address nicknames for reporting.
|
|
84
|
+
- `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
|
|
85
|
+
- `--renderer-port`: Set the port for the report rendering service (default: 8091)
|
|
86
|
+
- `--victoria-port`: Set the port for the Victoria metrics reporting endpoint (default: 8430)
|
|
87
|
+
- `--start-renderer`: If set, both the Grafana and renderer containers will be started for dashboard image export. By default, only the grafana container is started.
|
|
88
|
+
- `--custom-bucket`: Assign a custom bucket/category to a wallet address for reporting. Specify as `address:bucket_name`. Can be used multiple times.
|
|
89
|
+
|
|
90
|
+
After running the command, the export script will run continuously until you close your terminal.
|
|
91
|
+
To view the dashboards, just open your browser and navigate to [http://localhost:3004](http://localhost:3004)!
|
|
92
|
+
|
|
93
|
+
## Docker
|
|
94
|
+
|
|
95
|
+
When you run DAO Treasury, [eth-portfolio](https://github.com/BobTheBuidler/eth-portfolio) will build and start 4 [required Docker containers](https://bobthebuidler.github.io/eth-portfolio/exporter.html#docker-containers) on your system. Additionally, DAO Treasury will build and start 2 more required containers:
|
|
96
|
+
|
|
97
|
+
- **grafana**
|
|
98
|
+
- Provides a web-based dashboard for visualizing your treasury data.
|
|
99
|
+
- Pre-configured with dashboards and plugins for real-time monitoring.
|
|
100
|
+
- Uses persistent storage to retain dashboard settings and data.
|
|
101
|
+
- Accessible locally (default port `3004`, configurable via `--grafana-port`).
|
|
102
|
+
- Supports anonymous access for convenience.
|
|
103
|
+
- Integrates with the renderer container for dashboard image export.
|
|
104
|
+
- Loads dashboards and data sources automatically via provisioning files.
|
|
105
|
+
|
|
106
|
+
- **renderer**
|
|
107
|
+
- Runs the official Grafana image renderer service.
|
|
108
|
+
- Enables Grafana to export dashboards as images for reporting or sharing.
|
|
109
|
+
- Operates on port `8091` by default (configurable via `--renderer-port`).
|
|
110
|
+
- Tightly integrated with the Grafana container for seamless image rendering.
|
|
111
|
+
- **Note:** The renderer container is only started if you pass the `--start-renderer` CLI flag.
|
|
112
|
+
|
|
113
|
+
**How it works:**
|
|
114
|
+
1. DAO Treasury collects and exports treasury data.
|
|
115
|
+
2. Grafana displays this data in pre-built dashboards for analysis and reporting.
|
|
116
|
+
3. The renderer container allows dashboards to be exported as images directly from Grafana (if enabled).
|
|
117
|
+
|
|
118
|
+
**Additional Information:**
|
|
119
|
+
- All containers are orchestrated via Docker Compose and started automatically as needed.
|
|
120
|
+
- Grafana provisioning ensures dashboards and data sources are set up out-of-the-box.
|
|
121
|
+
- All dashboard data and settings are persisted for durability.
|
|
122
|
+
- Dashboard images can be generated for reporting via the renderer (if enabled).
|
|
123
|
+
|
|
124
|
+
## Screenshots
|
|
125
|
+
|
|
126
|
+
#### [DAO Transactions Dashboard](https://bobthebuidler.github.io/dao-treasury/transactions.html)
|
|
127
|
+
|
|
128
|
+

|
|
129
|
+
|
|
130
|
+
## Contributing
|
|
131
|
+
|
|
132
|
+
We welcome contributions to DAO Treasury! For detailed guidelines on how to contribute, please see the [Contributing Guidelines](https://github.com/BobTheBuidler/dao-treasury/blob/master/CONTRIBUTING.md).
|
|
133
|
+
|
|
134
|
+
Enjoy!
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
dao_treasury__mypyc.cp311-win_amd64.pyd,sha256=e-BP46HP-JavVWZ6Q8fyzefsj3BZh2sn3dUTKz-6tx0,453120
|
|
2
|
+
dao_treasury/ENVIRONMENT_VARIABLES.py,sha256=LS_D4ALB3BO-vYKyh1tzRHi10QBE6f654Zy8pmJ_xPY,656
|
|
3
|
+
dao_treasury/__init__.py,sha256=ai8iALE_Zv43O9cH1jkNJ39bzhr60kBDX6L7C4Nj9FA,1539
|
|
4
|
+
dao_treasury/_docker.cp311-win_amd64.pyd,sha256=Kn3vaKxqPUn3PczU1ff-ezjwyvfvlzAmGdByYbOnBMk,10752
|
|
5
|
+
dao_treasury/_docker.py,sha256=Rki3eLKOmsNxN3nF-gmbM9UQV49SY7ToEHZboL_HYvA,6118
|
|
6
|
+
dao_treasury/_nicknames.cp311-win_amd64.pyd,sha256=kf40nS73G_h3PGINNg6R_ufaJlg8oxG4ENaluFHhem0,10752
|
|
7
|
+
dao_treasury/_nicknames.py,sha256=n8c-JZhORYymCMv6jsC96IthAzAhpslyEn-KCk_YiSM,1049
|
|
8
|
+
dao_treasury/_wallet.cp311-win_amd64.pyd,sha256=d8A59yYN1FwEFHkPVgaxKawHRWB9daj0qNWRfK7eWz4,10752
|
|
9
|
+
dao_treasury/_wallet.py,sha256=nHBAKFJstdKuYbvpskGVx2KU80YrZHGHsEh5V3TwIHs,10712
|
|
10
|
+
dao_treasury/constants.cp311-win_amd64.pyd,sha256=Ahz2-6EyLk-m-RZPay4UFFfZc4-dS8M6SQcK08s4Lng,10752
|
|
11
|
+
dao_treasury/constants.py,sha256=-T0oPw7lC5YeaiplHAtYL-2ss7knvKrJKQ1LCc8kX8g,1483
|
|
12
|
+
dao_treasury/db.py,sha256=4Vc_U3mmrG8hOpsuDcgCQQuwGyL3pyfYH2jjktDXx48,50734
|
|
13
|
+
dao_treasury/docker-compose.yaml,sha256=wNNE9xmkchcV-nJxzrmUkbUA0CW1qgdGQKJ7uw2P8nU,1350
|
|
14
|
+
dao_treasury/main.py,sha256=_Q-Nhn9WJ6alovqxt8Aa2X24-cxPgH4b25ulj0mEygs,9611
|
|
15
|
+
dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
dao_treasury/treasury.py,sha256=K4XOg-5BHoP5HoRlHNu4afNpYs2-8sjCOOGwdt3M21w,7541
|
|
17
|
+
dao_treasury/types.cp311-win_amd64.pyd,sha256=RvzU28NR4sj9OmJO-omGWCYldXzc-70T04DH6sgQMO4,10752
|
|
18
|
+
dao_treasury/types.py,sha256=KFz4WKPp4t_RBwIT6YGwOcgbzw8tdHIOcXTFsUA0pJA,3818
|
|
19
|
+
dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=to_cVfl8X6-5zVskkDxNtTE191TH52XO2peGfHPI5F0,201
|
|
20
|
+
dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json,sha256=seX4E48q7XTIDYTzwiZzDR_n-vii-MqfT8MJ4mIhpUc,19964
|
|
21
|
+
dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json,sha256=tdHBpE0gMk3tcVyT2rP4eMNUbTs5c98zjv_hPlMvhmM,19171
|
|
22
|
+
dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json,sha256=rQ3-eFc9vk4AzQfwG5d1NlonyPTlHuBQfr-IdlAI-QE,7724
|
|
23
|
+
dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json,sha256=EguedPwRdraMQlyj5BOKtWcHaFGwainu-5At5z9uZaM,15448
|
|
24
|
+
dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json,sha256=eQLZMnY4enc7dwdYBxHjgkadjXU_ie4qsWEhAQxDsBo,14557
|
|
25
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json,sha256=nu_bCHebLAjnz-CUFd6qaU50mokWcjTns2L8AWpeStg,28156
|
|
26
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json,sha256=T5jyhDh41PKoZdK-QrcMyGCT6Mg3MZRLnDaIE2-xM1w,20241
|
|
27
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json,sha256=HCzFfESFmLruuKxMKOatkoFcHXgx90dnyuFgHmcocKk,26281
|
|
28
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json,sha256=Np1oh1Dm_B9oTPFifLDgRYeqa5Lk23nZUGZ50hY0XgY,109466
|
|
29
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json,sha256=TSmhQGX_0mHN0-JJebhkUXosD09rMa69oRlUWatHxUk,15951
|
|
30
|
+
dao_treasury/.grafana/provisioning/datasources/datasources.yaml,sha256=gLmJsOkEXNzWRDibShfHFySWeuExW-dSB_U0OSfH868,344
|
|
31
|
+
dao_treasury/sorting/__init__.cp311-win_amd64.pyd,sha256=n1XUYxqtT8PjeL7IAaCWxLKYY498-Yw8J1jhK5LLlt4,10752
|
|
32
|
+
dao_treasury/sorting/__init__.py,sha256=_uxM_FE1paM8oDAhDdHSyhDwnrlxCYX_lGn2DOqCaHU,10666
|
|
33
|
+
dao_treasury/sorting/_matchers.cp311-win_amd64.pyd,sha256=YhVf2kk0CQLeTwJo8ZmunaHyrq-Gp2bbCP8d3L2l-oI,10752
|
|
34
|
+
dao_treasury/sorting/_matchers.py,sha256=ACi6aXZCKW5OTiztsID7CXCGJounj5c6ivhOCg2436M,14392
|
|
35
|
+
dao_treasury/sorting/_rules.cp311-win_amd64.pyd,sha256=EDQRyGo0Fyr1irjExYBDBznpeRsyQ-_o9algkZnZQ8g,10752
|
|
36
|
+
dao_treasury/sorting/_rules.py,sha256=DxhdUgpS0q0LWeLl9W1Bjn5LZz9z4OLA03vQllPMH9k,9229
|
|
37
|
+
dao_treasury/sorting/factory.cp311-win_amd64.pyd,sha256=lqf_aWxj94vcNkDuudTCwi7Ls8Ovf1yIALyMBaJAdUA,10752
|
|
38
|
+
dao_treasury/sorting/factory.py,sha256=zlJ18xlMTxv8ACV6_MimCVIDsw3K5AZcyvKaNYY7R14,10484
|
|
39
|
+
dao_treasury/sorting/rule.cp311-win_amd64.pyd,sha256=76cpAR2rA63NKvv_2wpeE1IECQGBdTXV8BTq37Z7pk4,10752
|
|
40
|
+
dao_treasury/sorting/rule.py,sha256=wbL8s0-6dxcCKghUtEDSkLDBnyvggsJ3gt_RawQ6kB4,11972
|
|
41
|
+
dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd,sha256=YJUU6IGDQsCOmfBlmBB6U2w4uip_MeEr9L9ziJHXlm4,10752
|
|
42
|
+
dao_treasury/sorting/rules/__init__.py,sha256=hcLfejOEwD8RaM2RE-38Ej6_WkvL9BVGvIIGY848E6E,49
|
|
43
|
+
dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd,sha256=98h2mL8oDymHRQM0WqZlFtRNKTyu2yR4DMZ5wOTRR0I,10752
|
|
44
|
+
dao_treasury/sorting/rules/ignore/__init__.py,sha256=16THKoGdj6qfkkytuCFVG_R1M6KSErMI4AVE1p0ukS4,58
|
|
45
|
+
dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd,sha256=4MnFIgT6B33iBJ7_u18qn5wy7rLBa3nJQTbHZSV2h1o,10752
|
|
46
|
+
dao_treasury/sorting/rules/ignore/llamapay.py,sha256=aYyAJRlmv419IeaqkcV5o3ffx0UVfteU0lTl80j0BGo,783
|
|
47
|
+
dao_treasury/streams/__init__.cp311-win_amd64.pyd,sha256=_e7coxdPNR26S3yzz5A-8pwwomOwmlJXkAUKoHK5fp8,10752
|
|
48
|
+
dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
+
dao_treasury/streams/llamapay.cp311-win_amd64.pyd,sha256=Y6zWFsILViSbWxsw32h03sgDhqXMPpsDxI-KDFCsy0g,10752
|
|
50
|
+
dao_treasury/streams/llamapay.py,sha256=rO1Mh2ndTziR6pnRkKHnQ22a_Yx9PM_-BG7I4dspEZ8,13535
|
|
51
|
+
dao_treasury-0.0.71.dist-info/METADATA,sha256=B9eF09wrzznyPsIct4TkbdfXuUX2WDPOZW-krIL8aDU,8267
|
|
52
|
+
dao_treasury-0.0.71.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
|
|
53
|
+
dao_treasury-0.0.71.dist-info/top_level.txt,sha256=CV8aYytuSYplDhLVY4n0GphckdysXCd1lHmbqfsPxNk,33
|
|
54
|
+
dao_treasury-0.0.71.dist-info/RECORD,,
|
|
Binary file
|
|
Binary file
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: dao_treasury
|
|
3
|
-
Version: 0.0.21
|
|
4
|
-
Summary: Produce comprehensive financial reports for your on-chain org
|
|
5
|
-
Classifier: Development Status :: 3 - Alpha
|
|
6
|
-
Classifier: Intended Audience :: Developers
|
|
7
|
-
Classifier: Intended Audience :: Science/Research
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
15
|
-
Requires-Python: >=3.10,<3.13
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
Requires-Dist: eth-portfolio-temp<0.1,>=0.0.11
|
|
18
|
-
Dynamic: classifier
|
|
19
|
-
Dynamic: description
|
|
20
|
-
Dynamic: description-content-type
|
|
21
|
-
Dynamic: requires-dist
|
|
22
|
-
Dynamic: requires-python
|
|
23
|
-
Dynamic: summary
|
|
24
|
-
|
|
25
|
-
This library extends eth_portfolio with additional functionality centered around producing financial reports for DAOs and other on-chain orgs.
|
|
26
|
-
|
|
27
|
-
## Installation
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
pip install dao-treasury
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Prerequisites
|
|
34
|
-
|
|
35
|
-
You must have a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) configured to use your RPC.
|
|
36
|
-
You will also need [Docker](https://www.docker.com/get-started/) installed on your system.
|
|
37
|
-
|
|
38
|
-
## Usage
|
|
39
|
-
|
|
40
|
-
Run the treasury export tool:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# For pip installations:
|
|
44
|
-
dao-treasury run --wallet 0x123 --network mainnet --interval 12h
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
For local development (from source installation), use:
|
|
48
|
-
```bash
|
|
49
|
-
poetry run dao-treasury run --wallet 0x123 --network mainnet --interval 12h
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**CLI Options:**
|
|
53
|
-
- `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
|
|
54
|
-
- `--interval`: The time interval between each data snapshot (default: 12h)
|
|
55
|
-
- `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
|
|
56
|
-
- `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
|
|
57
|
-
- `--renderer-port`: Set the port for the report rendering service (default: 8080)
|
|
58
|
-
- `--victoria-port`: Set the port for the Victoria metrics reporting endpoint (default: 8430)
|
|
59
|
-
|
|
60
|
-
After running the command, the export script will run continuously until you close your terminal.
|
|
61
|
-
To access the dashboard, open your browser and navigate to [http://localhost:3003](http://localhost:3003) for the eth-portfolio dashboard and [http://localhost:3004](http://localhost:3004) for the dao-treasury dashboard. Soon I will combine them into one interface but for now you can check both.
|
|
62
|
-
|
|
63
|
-
Enjoy!
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
52b51d40e96d4333695d__mypyc.cp311-win_amd64.pyd,sha256=3WiMx3nn7ZvM1dQsZkltReasuDcLC4a7F8y1febiLDw,219648
|
|
2
|
-
dao_treasury/__init__.py,sha256=ezGIvpIzBdgtHMVM_AOoU306QrjuO1juxzE24Z1ICV0,921
|
|
3
|
-
dao_treasury/_docker.py,sha256=8JeSI1fXJppnzKJt8weTagKkw6d_vNwHG6kNa_rqhEE,4866
|
|
4
|
-
dao_treasury/_nicknames.py,sha256=At5jHOLs9L5ybVHNxHbesXkRS4mFF-5bJwfoadRo7DA,318
|
|
5
|
-
dao_treasury/_wallet.cp311-win_amd64.pyd,sha256=PBX4plQ1FyuXUY7-4v8OfB7adeckhWMbH3alVijMTv8,10752
|
|
6
|
-
dao_treasury/_wallet.py,sha256=gy5uuhN1xQ65TyQjuK0l5mJy1ZAMyXgX4bQLNQs-DbQ,4518
|
|
7
|
-
dao_treasury/db.py,sha256=sUgx7scvUszyTXe9FrSrDjkdZiIo0icBuNu9pUIyG0E,38613
|
|
8
|
-
dao_treasury/docker-compose.yaml,sha256=hmBB6oxipwzMGa4Wzngcp-Bl51nBwI7_EasJN3ORfS4,1273
|
|
9
|
-
dao_treasury/main.py,sha256=PLmUQQYlZe56B1aFXAVxlx2PK6gnk4sj7oGpVggpNFw,5874
|
|
10
|
-
dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
dao_treasury/treasury.py,sha256=9WYgvVPywXKpp8maVYNG7DnSJcb-t3Gm6rzQF7vo3lM,5581
|
|
12
|
-
dao_treasury/types.cp311-win_amd64.pyd,sha256=6vuSW7_HOTAV-FzofZ6lm5PQ_AD-LnFRKNW_xtYdauM,10752
|
|
13
|
-
dao_treasury/types.py,sha256=KFz4WKPp4t_RBwIT6YGwOcgbzw8tdHIOcXTFsUA0pJA,3818
|
|
14
|
-
dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=t9nGDNaCBOPQsWSDPLefGY7i0NtLGDvTGZyTxWHz2pY,217
|
|
15
|
-
dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json,sha256=pEHnKgiFgL_oscujk2SVEmkwe-PZiuGjlKf7bcLm2uc,8022
|
|
16
|
-
dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json,sha256=lCOGwyonNboVw-iaOD7tsBfiWTnlmfqlRjGp7wH88yc,7836
|
|
17
|
-
dao_treasury/.grafana/provisioning/datasources/sqlite.yaml,sha256=SUwhkoSaSMmvTKEDA3Srdop3Vq09GV5XV9UIEfPEwiU,221
|
|
18
|
-
dao_treasury/sorting/__init__.cp311-win_amd64.pyd,sha256=j6P9zBEuDAGNSjGPbktbFp22l_wiXS-4J_1OpA877lY,10752
|
|
19
|
-
dao_treasury/sorting/__init__.py,sha256=YRa0JtqLSpFbTlB3tWLM1Kb1Jd2iNCyhaArvp3GxffU,5174
|
|
20
|
-
dao_treasury/sorting/_matchers.cp311-win_amd64.pyd,sha256=LO4cB0BbZjsBIixq3vm5H11xKOKBokajH5zqOivwfzo,10752
|
|
21
|
-
dao_treasury/sorting/_matchers.py,sha256=ACi6aXZCKW5OTiztsID7CXCGJounj5c6ivhOCg2436M,14392
|
|
22
|
-
dao_treasury/sorting/_rules.cp311-win_amd64.pyd,sha256=KROV4gGa7COgaDPMmWwsXiZhSGxdQ6S9LFjBbeh4VMg,10752
|
|
23
|
-
dao_treasury/sorting/_rules.py,sha256=7zPChbUbJszjKi7nwS789vEB7cykfT6ZXPVpKbP6loU,9248
|
|
24
|
-
dao_treasury/sorting/factory.cp311-win_amd64.pyd,sha256=OQQP4gCfZ-t5iNsCDcs-d0JqA2FQL6jomQX73R_uWWg,10752
|
|
25
|
-
dao_treasury/sorting/factory.py,sha256=uDjQwefkIQG_egs8iJj_YGh-XdAES-DHlTaOdDcZx0U,10516
|
|
26
|
-
dao_treasury/sorting/rule.cp311-win_amd64.pyd,sha256=cFpL3YnQuXbpGNoaWNmlKhRig8neHR45W1PILxKvZn8,10752
|
|
27
|
-
dao_treasury/sorting/rule.py,sha256=It0DNHavo6eqCNn5l2Mhqt7UUzvf03zhl2KIMkHz65M,11676
|
|
28
|
-
dao_treasury-0.0.21.dist-info/METADATA,sha256=YEwTpDsShrsF3Rk4eDS9YrUeeAWKjwaa8cPJ1WScTVs,2659
|
|
29
|
-
dao_treasury-0.0.21.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
|
|
30
|
-
dao_treasury-0.0.21.dist-info/top_level.txt,sha256=5QDMQ7kRdV8h4wWGRy63D8laHsQl1BS7x4XRXFRhaEs,41
|
|
31
|
-
dao_treasury-0.0.21.dist-info/RECORD,,
|
|
File without changes
|