dao-treasury 0.0.38__cp310-cp310-win_amd64.whl → 0.0.61__cp310-cp310-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.
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +526 -0
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +526 -0
- dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +25 -1
- dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +8 -8
- dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +10 -9
- dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +8 -35
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +74 -33
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +53 -23
- dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +593 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2999 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +38 -17
- dao_treasury/ENVIRONMENT_VARIABLES.py +12 -0
- dao_treasury/__init__.py +14 -0
- dao_treasury/_docker.cp310-win_amd64.pyd +0 -0
- dao_treasury/_docker.py +14 -1
- dao_treasury/_nicknames.cp310-win_amd64.pyd +0 -0
- dao_treasury/_nicknames.py +15 -0
- dao_treasury/_wallet.cp310-win_amd64.pyd +0 -0
- dao_treasury/constants.cp310-win_amd64.pyd +0 -0
- dao_treasury/constants.py +24 -0
- dao_treasury/db.py +68 -3
- dao_treasury/docker-compose.yaml +1 -1
- dao_treasury/main.py +6 -0
- dao_treasury/sorting/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/_matchers.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/_rules.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/factory.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rule.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rule.py +8 -10
- dao_treasury/sorting/rules/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp310-win_amd64.pyd +0 -0
- dao_treasury/streams/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/streams/llamapay.cp310-win_amd64.pyd +0 -0
- dao_treasury/streams/llamapay.py +14 -2
- dao_treasury/treasury.py +33 -14
- dao_treasury/types.cp310-win_amd64.pyd +0 -0
- {dao_treasury-0.0.38.dist-info → dao_treasury-0.0.61.dist-info}/METADATA +3 -2
- dao_treasury-0.0.61.dist-info/RECORD +54 -0
- dao_treasury-0.0.61.dist-info/top_level.txt +2 -0
- dao_treasury__mypyc.cp310-win_amd64.pyd +0 -0
- bf2b4fe1f86ad2ea158b__mypyc.cp310-win_amd64.pyd +0 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Treasury.json +0 -2018
- dao_treasury-0.0.38.dist-info/RECORD +0 -51
- dao_treasury-0.0.38.dist-info/top_level.txt +0 -2
- {dao_treasury-0.0.38.dist-info → dao_treasury-0.0.61.dist-info}/WHEEL +0 -0
dao_treasury/treasury.py
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
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
|
+
|
|
1
18
|
from asyncio import create_task, gather
|
|
2
19
|
from logging import getLogger
|
|
3
20
|
from pathlib import Path
|
|
@@ -59,20 +76,22 @@ class Treasury(a_sync.ASyncGenericBase): # type: ignore [misc]
|
|
|
59
76
|
TypeError: If any item in `wallets` is not a str or TreasuryWallet.
|
|
60
77
|
|
|
61
78
|
Examples:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
.. code-block:: python
|
|
80
|
+
|
|
81
|
+
# Create a synchronous Treasury
|
|
82
|
+
treasury = Treasury(
|
|
83
|
+
wallets=["0xAbc123...", TreasuryWallet("0xDef456...", start_block=1000)],
|
|
84
|
+
sort_rules=Path("/path/to/rules"),
|
|
85
|
+
start_block=500,
|
|
86
|
+
label="DAO Treasury",
|
|
87
|
+
asynchronous=False
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# Create an asynchronous Treasury
|
|
91
|
+
treasury_async = Treasury(
|
|
92
|
+
wallets=["0xAbc123..."],
|
|
93
|
+
asynchronous=True
|
|
94
|
+
)
|
|
76
95
|
"""
|
|
77
96
|
global TREASURY
|
|
78
97
|
if TREASURY is not None:
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dao_treasury
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.61
|
|
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,7 +14,7 @@ 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-temp
|
|
17
|
+
Requires-Dist: eth-portfolio-temp==0.2.13
|
|
18
18
|
Dynamic: classifier
|
|
19
19
|
Dynamic: description
|
|
20
20
|
Dynamic: description-content-type
|
|
@@ -66,6 +66,7 @@ poetry run dao-treasury run --wallet 0x123 --network mainnet --interval 12h
|
|
|
66
66
|
**CLI Options:**
|
|
67
67
|
- `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
|
|
68
68
|
- `--interval`: The time interval between each data snapshot (default: 12h)
|
|
69
|
+
- `--concurrency`: The max number of historical blocks to export concurrently. (default: 30)
|
|
69
70
|
- `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
|
|
70
71
|
- `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
|
|
71
72
|
- `--renderer-port`: Set the port for the report rendering service (default: 8091)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
dao_treasury__mypyc.cp310-win_amd64.pyd,sha256=6I8aT7u5sV2NrCjYA9ViC_tXCQrHs1cNVUm7tp7Rb9Y,454656
|
|
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.cp310-win_amd64.pyd,sha256=xkLD1BT86tybNkHIY8O3Le1sPjLX5ShkicocxGz-A6g,10752
|
|
5
|
+
dao_treasury/_docker.py,sha256=UFMN-TIBUQBheMIhIhSMhaq7UFgt6ubUcfzwPNap_6o,6098
|
|
6
|
+
dao_treasury/_nicknames.cp310-win_amd64.pyd,sha256=mkQQIMP-nEKJvHK8FyPmzCbvUQ6cpC4pr5nobv73DP8,10752
|
|
7
|
+
dao_treasury/_nicknames.py,sha256=n8c-JZhORYymCMv6jsC96IthAzAhpslyEn-KCk_YiSM,1049
|
|
8
|
+
dao_treasury/_wallet.cp310-win_amd64.pyd,sha256=XvuMMnUq-0DDIqzG95V5alwwGyTwG59esLWh6L7aDTk,10752
|
|
9
|
+
dao_treasury/_wallet.py,sha256=nHBAKFJstdKuYbvpskGVx2KU80YrZHGHsEh5V3TwIHs,10712
|
|
10
|
+
dao_treasury/constants.cp310-win_amd64.pyd,sha256=VZQNPu1BeDuqsfyGdODlxQ_L2wji7wPWVU5J9P2dPGk,10752
|
|
11
|
+
dao_treasury/constants.py,sha256=-T0oPw7lC5YeaiplHAtYL-2ss7knvKrJKQ1LCc8kX8g,1483
|
|
12
|
+
dao_treasury/db.py,sha256=3_-nm8vD92ECaHxjMYf0eaXfsBRC2ojGcm-AFz2ZLAQ,50625
|
|
13
|
+
dao_treasury/docker-compose.yaml,sha256=wNNE9xmkchcV-nJxzrmUkbUA0CW1qgdGQKJ7uw2P8nU,1350
|
|
14
|
+
dao_treasury/main.py,sha256=w7VBmBwNBYjOkz2LpT4_9FZ1CI8AVcr4vyfr1wZVk5Q,8458
|
|
15
|
+
dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
dao_treasury/treasury.py,sha256=wh4wESLbYSHjcfpa-sW5TIqa5pSC9Y_7Id8tzLzJLaw,7414
|
|
17
|
+
dao_treasury/types.cp310-win_amd64.pyd,sha256=niN4y43jq-8nSvh36AQRIIxOJ9Oiy2aZ9tevFRNSdaA,10752
|
|
18
|
+
dao_treasury/types.py,sha256=KFz4WKPp4t_RBwIT6YGwOcgbzw8tdHIOcXTFsUA0pJA,3818
|
|
19
|
+
dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=NfmmICGLVfIrI8ulzUTUYc7wFetk2v-x6eaoYHnCvQc,1914
|
|
20
|
+
dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json,sha256=gxfPI4eO3PDPe70Yx7_dN0Yx5isvgy-MKe-fizBClMw,16879
|
|
21
|
+
dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json,sha256=eowBLlWgL3bsE1B17oYZKA-N9woBT4lHlRrhdqSY5KA,16483
|
|
22
|
+
dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json,sha256=zRSpnlDD3_fsynCDxfdV3HRjqWbeAqhad-YBe1rMQGo,7419
|
|
23
|
+
dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json,sha256=eqOVxhBV3YYsGhEs2xvnuDU1VX_DdxDFn-XuXKJ3Tpc,6860
|
|
24
|
+
dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json,sha256=Ig_Z9gdAUnPb3OKZzkokoM9OmFsUiJRIcCTOMImJk-k,13133
|
|
25
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json,sha256=s0SYuemqh9RgYm2H_gApmUJ73w-7P5czviUFmE0qOzE,28145
|
|
26
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json,sha256=MzmeP5fdATIUCzeXV0ZBfzuwef2TRm050Sa6FAjUCpc,20009
|
|
27
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json,sha256=TeVujxB5ibsPdbfwmbpW1ApjcdfKoSGkv_mS4wBDtZQ,14681
|
|
28
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json,sha256=7qVXn2PjeBIp2pFRbVfxA4PeWxhhVKQCr4qIPZoIj90,133963
|
|
29
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json,sha256=fYkiZ37Eg2vu9dPJavCZXPPtX6-rTDbJwE_Ougpo2Mk,15828
|
|
30
|
+
dao_treasury/.grafana/provisioning/datasources/datasources.yaml,sha256=gLmJsOkEXNzWRDibShfHFySWeuExW-dSB_U0OSfH868,344
|
|
31
|
+
dao_treasury/sorting/__init__.cp310-win_amd64.pyd,sha256=sZrdedwUfruPvE8wV4uw9Hc_frwfj0D_EpMRoHZf4KE,10752
|
|
32
|
+
dao_treasury/sorting/__init__.py,sha256=_uxM_FE1paM8oDAhDdHSyhDwnrlxCYX_lGn2DOqCaHU,10666
|
|
33
|
+
dao_treasury/sorting/_matchers.cp310-win_amd64.pyd,sha256=rAnguVqSZF3dG0Fc_yRPMOftZB6hwLI2dbrJ4zGfvw4,10752
|
|
34
|
+
dao_treasury/sorting/_matchers.py,sha256=ACi6aXZCKW5OTiztsID7CXCGJounj5c6ivhOCg2436M,14392
|
|
35
|
+
dao_treasury/sorting/_rules.cp310-win_amd64.pyd,sha256=o_DLUUDgn6spPyN88a_FEdu0m6Xcg11ydBp6CpdOuEE,10752
|
|
36
|
+
dao_treasury/sorting/_rules.py,sha256=DxhdUgpS0q0LWeLl9W1Bjn5LZz9z4OLA03vQllPMH9k,9229
|
|
37
|
+
dao_treasury/sorting/factory.cp310-win_amd64.pyd,sha256=K1QYRJ5uygOJDWn-5g0wXcFkVYpKm7x0eXDciy7p5S4,10752
|
|
38
|
+
dao_treasury/sorting/factory.py,sha256=zlJ18xlMTxv8ACV6_MimCVIDsw3K5AZcyvKaNYY7R14,10484
|
|
39
|
+
dao_treasury/sorting/rule.cp310-win_amd64.pyd,sha256=77R9-hGYrjRD5ftlBVU9UBJ3erzbHKXxjWzCmgYzZsQ,10752
|
|
40
|
+
dao_treasury/sorting/rule.py,sha256=wbL8s0-6dxcCKghUtEDSkLDBnyvggsJ3gt_RawQ6kB4,11972
|
|
41
|
+
dao_treasury/sorting/rules/__init__.cp310-win_amd64.pyd,sha256=WLboZ0n1tHhkSQKVD-sXuJ25EAaoXmDMP1cMeVmkPAs,10752
|
|
42
|
+
dao_treasury/sorting/rules/__init__.py,sha256=hcLfejOEwD8RaM2RE-38Ej6_WkvL9BVGvIIGY848E6E,49
|
|
43
|
+
dao_treasury/sorting/rules/ignore/__init__.cp310-win_amd64.pyd,sha256=4pSlUP8mot2nnXaZCHpq01hKRMZ1Z8xCUMgItESpUbo,10752
|
|
44
|
+
dao_treasury/sorting/rules/ignore/__init__.py,sha256=16THKoGdj6qfkkytuCFVG_R1M6KSErMI4AVE1p0ukS4,58
|
|
45
|
+
dao_treasury/sorting/rules/ignore/llamapay.cp310-win_amd64.pyd,sha256=Oo-3gg6CUl_m6HbgJQcizbTjJXBQ8vAwxq249HZOcHY,10752
|
|
46
|
+
dao_treasury/sorting/rules/ignore/llamapay.py,sha256=aYyAJRlmv419IeaqkcV5o3ffx0UVfteU0lTl80j0BGo,783
|
|
47
|
+
dao_treasury/streams/__init__.cp310-win_amd64.pyd,sha256=kAoOOFqIAzbKRJT1eN7p8AmeUceQ_raWdC-4Gyafb4g,10752
|
|
48
|
+
dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
+
dao_treasury/streams/llamapay.cp310-win_amd64.pyd,sha256=0GysZNinCMIcX3WgnyToVks81zScGP4b_WByJ3tAjMk,10752
|
|
50
|
+
dao_treasury/streams/llamapay.py,sha256=rO1Mh2ndTziR6pnRkKHnQ22a_Yx9PM_-BG7I4dspEZ8,13535
|
|
51
|
+
dao_treasury-0.0.61.dist-info/METADATA,sha256=m857F2a3AqeFIcAOgA-dutGT-Ki5xAut9kHqKs9fxyM,7233
|
|
52
|
+
dao_treasury-0.0.61.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
|
|
53
|
+
dao_treasury-0.0.61.dist-info/top_level.txt,sha256=CV8aYytuSYplDhLVY4n0GphckdysXCd1lHmbqfsPxNk,33
|
|
54
|
+
dao_treasury-0.0.61.dist-info/RECORD,,
|
|
Binary file
|
|
Binary file
|