dao-treasury 0.0.30__tar.gz → 1.0.0__tar.gz
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.
- {dao_treasury-0.0.30/dao_treasury.egg-info → dao_treasury-1.0.0}/PKG-INFO +35 -6
- dao_treasury-0.0.30/PKG-INFO → dao_treasury-1.0.0/README.md +24 -20
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +567 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +569 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +10 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +213 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +368 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +370 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json +367 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +798 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +595 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +997 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +3931 -0
- dao_treasury-1.0.0/dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +473 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/.grafana/provisioning/datasources/datasources.yaml +9 -4
- dao_treasury-1.0.0/dao_treasury/ENVIRONMENT_VARIABLES.py +19 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/__init__.py +14 -5
- dao_treasury-1.0.0/dao_treasury/_docker.py +280 -0
- dao_treasury-1.0.0/dao_treasury/_nicknames.py +32 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/_wallet.py +30 -45
- dao_treasury-1.0.0/dao_treasury/constants.py +38 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/db.py +697 -219
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/docker-compose.yaml +21 -8
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/main.py +65 -11
- dao_treasury-1.0.0/dao_treasury/sorting/__init__.py +311 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/sorting/_matchers.py +24 -20
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/sorting/_rules.py +14 -16
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/sorting/factory.py +8 -12
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/sorting/rule.py +15 -27
- dao_treasury-1.0.0/dao_treasury/sorting/rules/__init__.py +1 -0
- dao_treasury-1.0.0/dao_treasury/sorting/rules/ignore/__init__.py +1 -0
- dao_treasury-1.0.0/dao_treasury/sorting/rules/ignore/llamapay.py +20 -0
- dao_treasury-1.0.0/dao_treasury/streams/__init__.py +0 -0
- dao_treasury-1.0.0/dao_treasury/streams/llamapay.py +337 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/treasury.py +63 -32
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/types.py +2 -1
- dao_treasury-0.0.30/README.md → dao_treasury-1.0.0/dao_treasury.egg-info/PKG-INFO +49 -3
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury.egg-info/SOURCES.txt +16 -2
- dao_treasury-1.0.0/dao_treasury.egg-info/requires.txt +2 -0
- dao_treasury-1.0.0/pyproject.toml +60 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/setup.py +7 -7
- dao_treasury-1.0.0/tests/test_treasury.py +63 -0
- dao_treasury-1.0.0/tests/test_wallet.py +296 -0
- dao_treasury-0.0.30/dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +0 -26
- dao_treasury-0.0.30/dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +0 -112
- dao_treasury-0.0.30/dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +0 -387
- dao_treasury-0.0.30/dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +0 -1018
- dao_treasury-0.0.30/dao_treasury/.grafana/provisioning/dashboards/treasury/Treasury.json +0 -2018
- dao_treasury-0.0.30/dao_treasury/ENVIRONMENT_VARIABLES.py +0 -8
- dao_treasury-0.0.30/dao_treasury/_docker.py +0 -177
- dao_treasury-0.0.30/dao_treasury/_nicknames.py +0 -17
- dao_treasury-0.0.30/dao_treasury/constants.py +0 -15
- dao_treasury-0.0.30/dao_treasury/sorting/__init__.py +0 -191
- dao_treasury-0.0.30/dao_treasury.egg-info/requires.txt +0 -1
- dao_treasury-0.0.30/pyproject.toml +0 -40
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/MANIFEST.in +0 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury/py.typed +0 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury.egg-info/dependency_links.txt +0 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury.egg-info/not-zip-safe +0 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/dao_treasury.egg-info/top_level.txt +0 -0
- {dao_treasury-0.0.30 → dao_treasury-1.0.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 0.0
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dao_treasury
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Produce comprehensive financial reports for your on-chain org
|
|
5
5
|
Classifier: Development Status :: 3 - Alpha
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -14,6 +14,14 @@ Classifier: Operating System :: OS Independent
|
|
|
14
14
|
Classifier: Topic :: Software Development :: Libraries
|
|
15
15
|
Requires-Python: >=3.10,<3.13
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: eth-portfolio==0.5.11
|
|
18
|
+
Requires-Dist: psycopg2-binary==2.9.11
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: requires-dist
|
|
23
|
+
Dynamic: requires-python
|
|
24
|
+
Dynamic: summary
|
|
17
25
|
|
|
18
26
|
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.
|
|
19
27
|
|
|
@@ -22,6 +30,7 @@ DAO Treasury is a comprehensive financial reporting and treasury management solu
|
|
|
22
30
|
- **Financial Reporting for DAOs:** Extends core portfolio functionalities to generate detailed reports tailored for on-chain organizations.
|
|
23
31
|
- **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.
|
|
24
32
|
- **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.
|
|
33
|
+
- **Custom Buckets for Wallets:** Assign custom categories ("buckets") to specific wallet addresses for more granular reporting using the `--custom-bucket` CLI option.
|
|
25
34
|
- **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.
|
|
26
35
|
|
|
27
36
|
## Requirements
|
|
@@ -34,7 +43,10 @@ DAO Treasury is a comprehensive financial reporting and treasury management solu
|
|
|
34
43
|
- 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).
|
|
35
44
|
- You must configure a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) to use your RPC.
|
|
36
45
|
- 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.
|
|
37
|
-
- 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
|
|
46
|
+
- 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.
|
|
47
|
+
|
|
48
|
+
## Debug logging
|
|
49
|
+
DAO Treasury relies on ypricemagic for price lookups. If you need to spot long-running price calls, enable the `y.stuck?` logger at DEBUG. Details: [y.stuck? logger](CONTRIBUTING.md#y-stuck-logger).
|
|
38
50
|
|
|
39
51
|
## Installation
|
|
40
52
|
|
|
@@ -56,17 +68,31 @@ For local development (from source installation), use:
|
|
|
56
68
|
poetry run dao-treasury run --wallet 0x123 --network mainnet --interval 12h
|
|
57
69
|
```
|
|
58
70
|
|
|
71
|
+
**Assigning Custom Buckets to Wallets:**
|
|
72
|
+
|
|
73
|
+
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`:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
dao-treasury run --wallet 0x123 --network mainnet --custom-bucket "0x123:Operations" --custom-bucket "0x456:Grants" --custom-bucket "0x789:Investments"
|
|
77
|
+
```
|
|
78
|
+
|
|
59
79
|
**CLI Options:**
|
|
80
|
+
> Only optional arguments are listed here. Required arguments (such as `--wallet` or `--wallets`) are shown in the usage examples above.
|
|
81
|
+
|
|
60
82
|
- `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
|
|
61
83
|
- `--interval`: The time interval between each data snapshot (default: 12h)
|
|
84
|
+
- `--concurrency`: The max number of historical blocks to export concurrently. (default: 30)
|
|
62
85
|
- `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
|
|
86
|
+
- `--sort-rules`: Directory containing sort rules definitions for transaction categorization.
|
|
87
|
+
- `--nicknames`: File containing address nicknames for reporting.
|
|
63
88
|
- `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
|
|
64
89
|
- `--renderer-port`: Set the port for the report rendering service (default: 8091)
|
|
65
90
|
- `--victoria-port`: Set the port for the Victoria metrics reporting endpoint (default: 8430)
|
|
66
91
|
- `--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.
|
|
92
|
+
- `--custom-bucket`: Assign a custom bucket/category to a wallet address for reporting. Specify as `address:bucket_name`. Can be used multiple times.
|
|
67
93
|
|
|
68
94
|
After running the command, the export script will run continuously until you close your terminal.
|
|
69
|
-
To view the dashboards,
|
|
95
|
+
To view the dashboards, open your browser and navigate to [http://localhost:3004](http://localhost:3004). Log in with the Grafana admin credentials you set via `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD` (or enable anonymous access with `DAO_TREASURY_GRAFANA_ANON_ENABLED=true`).
|
|
70
96
|
|
|
71
97
|
## Docker
|
|
72
98
|
|
|
@@ -77,7 +103,10 @@ When you run DAO Treasury, [eth-portfolio](https://github.com/BobTheBuidler/eth-
|
|
|
77
103
|
- Pre-configured with dashboards and plugins for real-time monitoring.
|
|
78
104
|
- Uses persistent storage to retain dashboard settings and data.
|
|
79
105
|
- Accessible locally (default port `3004`, configurable via `--grafana-port`).
|
|
80
|
-
-
|
|
106
|
+
- Requires login by default using `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD`.
|
|
107
|
+
- Optional anonymous access via `DAO_TREASURY_GRAFANA_ANON_ENABLED=true` (Viewer-only).
|
|
108
|
+
- Sign-ups are disabled for safety.
|
|
109
|
+
- Validates admin credentials on startup and fails fast if they are incorrect.
|
|
81
110
|
- Integrates with the renderer container for dashboard image export.
|
|
82
111
|
- Loads dashboards and data sources automatically via provisioning files.
|
|
83
112
|
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: dao_treasury
|
|
3
|
-
Version: 0.0.30
|
|
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
|
-
|
|
18
1
|
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.
|
|
19
2
|
|
|
20
3
|
## Key Features
|
|
@@ -22,6 +5,7 @@ DAO Treasury is a comprehensive financial reporting and treasury management solu
|
|
|
22
5
|
- **Financial Reporting for DAOs:** Extends core portfolio functionalities to generate detailed reports tailored for on-chain organizations.
|
|
23
6
|
- **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.
|
|
24
7
|
- **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.
|
|
8
|
+
- **Custom Buckets for Wallets:** Assign custom categories ("buckets") to specific wallet addresses for more granular reporting using the `--custom-bucket` CLI option.
|
|
25
9
|
- **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.
|
|
26
10
|
|
|
27
11
|
## Requirements
|
|
@@ -34,7 +18,10 @@ DAO Treasury is a comprehensive financial reporting and treasury management solu
|
|
|
34
18
|
- 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).
|
|
35
19
|
- You must configure a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) to use your RPC.
|
|
36
20
|
- 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.
|
|
37
|
-
- 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
|
|
21
|
+
- 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.
|
|
22
|
+
|
|
23
|
+
## Debug logging
|
|
24
|
+
DAO Treasury relies on ypricemagic for price lookups. If you need to spot long-running price calls, enable the `y.stuck?` logger at DEBUG. Details: [y.stuck? logger](CONTRIBUTING.md#y-stuck-logger).
|
|
38
25
|
|
|
39
26
|
## Installation
|
|
40
27
|
|
|
@@ -56,17 +43,31 @@ For local development (from source installation), use:
|
|
|
56
43
|
poetry run dao-treasury run --wallet 0x123 --network mainnet --interval 12h
|
|
57
44
|
```
|
|
58
45
|
|
|
46
|
+
**Assigning Custom Buckets to Wallets:**
|
|
47
|
+
|
|
48
|
+
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`:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
dao-treasury run --wallet 0x123 --network mainnet --custom-bucket "0x123:Operations" --custom-bucket "0x456:Grants" --custom-bucket "0x789:Investments"
|
|
52
|
+
```
|
|
53
|
+
|
|
59
54
|
**CLI Options:**
|
|
55
|
+
> Only optional arguments are listed here. Required arguments (such as `--wallet` or `--wallets`) are shown in the usage examples above.
|
|
56
|
+
|
|
60
57
|
- `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
|
|
61
58
|
- `--interval`: The time interval between each data snapshot (default: 12h)
|
|
59
|
+
- `--concurrency`: The max number of historical blocks to export concurrently. (default: 30)
|
|
62
60
|
- `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
|
|
61
|
+
- `--sort-rules`: Directory containing sort rules definitions for transaction categorization.
|
|
62
|
+
- `--nicknames`: File containing address nicknames for reporting.
|
|
63
63
|
- `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
|
|
64
64
|
- `--renderer-port`: Set the port for the report rendering service (default: 8091)
|
|
65
65
|
- `--victoria-port`: Set the port for the Victoria metrics reporting endpoint (default: 8430)
|
|
66
66
|
- `--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.
|
|
67
|
+
- `--custom-bucket`: Assign a custom bucket/category to a wallet address for reporting. Specify as `address:bucket_name`. Can be used multiple times.
|
|
67
68
|
|
|
68
69
|
After running the command, the export script will run continuously until you close your terminal.
|
|
69
|
-
To view the dashboards,
|
|
70
|
+
To view the dashboards, open your browser and navigate to [http://localhost:3004](http://localhost:3004). Log in with the Grafana admin credentials you set via `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD` (or enable anonymous access with `DAO_TREASURY_GRAFANA_ANON_ENABLED=true`).
|
|
70
71
|
|
|
71
72
|
## Docker
|
|
72
73
|
|
|
@@ -77,7 +78,10 @@ When you run DAO Treasury, [eth-portfolio](https://github.com/BobTheBuidler/eth-
|
|
|
77
78
|
- Pre-configured with dashboards and plugins for real-time monitoring.
|
|
78
79
|
- Uses persistent storage to retain dashboard settings and data.
|
|
79
80
|
- Accessible locally (default port `3004`, configurable via `--grafana-port`).
|
|
80
|
-
-
|
|
81
|
+
- Requires login by default using `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD`.
|
|
82
|
+
- Optional anonymous access via `DAO_TREASURY_GRAFANA_ANON_ENABLED=true` (Viewer-only).
|
|
83
|
+
- Sign-ups are disabled for safety.
|
|
84
|
+
- Validates admin credentials on startup and fails fast if they are incorrect.
|
|
81
85
|
- Integrates with the renderer container for dashboard image export.
|
|
82
86
|
- Loads dashboards and data sources automatically via provisioning files.
|
|
83
87
|
|