dao-treasury 0.0.62__cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.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.

Files changed (54) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +526 -0
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +526 -0
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +84 -0
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +225 -0
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +108 -0
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +360 -0
  7. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +876 -0
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +645 -0
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +593 -0
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2999 -0
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +513 -0
  12. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +17 -0
  13. dao_treasury/ENVIRONMENT_VARIABLES.py +20 -0
  14. dao_treasury/__init__.py +62 -0
  15. dao_treasury/_docker.cpython-312-i386-linux-gnu.so +0 -0
  16. dao_treasury/_docker.py +193 -0
  17. dao_treasury/_nicknames.cpython-312-i386-linux-gnu.so +0 -0
  18. dao_treasury/_nicknames.py +32 -0
  19. dao_treasury/_wallet.cpython-312-i386-linux-gnu.so +0 -0
  20. dao_treasury/_wallet.py +250 -0
  21. dao_treasury/constants.cpython-312-i386-linux-gnu.so +0 -0
  22. dao_treasury/constants.py +39 -0
  23. dao_treasury/db.py +1450 -0
  24. dao_treasury/docker-compose.yaml +41 -0
  25. dao_treasury/main.py +253 -0
  26. dao_treasury/py.typed +0 -0
  27. dao_treasury/sorting/__init__.cpython-312-i386-linux-gnu.so +0 -0
  28. dao_treasury/sorting/__init__.py +295 -0
  29. dao_treasury/sorting/_matchers.cpython-312-i386-linux-gnu.so +0 -0
  30. dao_treasury/sorting/_matchers.py +387 -0
  31. dao_treasury/sorting/_rules.cpython-312-i386-linux-gnu.so +0 -0
  32. dao_treasury/sorting/_rules.py +235 -0
  33. dao_treasury/sorting/factory.cpython-312-i386-linux-gnu.so +0 -0
  34. dao_treasury/sorting/factory.py +299 -0
  35. dao_treasury/sorting/rule.cpython-312-i386-linux-gnu.so +0 -0
  36. dao_treasury/sorting/rule.py +344 -0
  37. dao_treasury/sorting/rules/__init__.cpython-312-i386-linux-gnu.so +0 -0
  38. dao_treasury/sorting/rules/__init__.py +1 -0
  39. dao_treasury/sorting/rules/ignore/__init__.cpython-312-i386-linux-gnu.so +0 -0
  40. dao_treasury/sorting/rules/ignore/__init__.py +1 -0
  41. dao_treasury/sorting/rules/ignore/llamapay.cpython-312-i386-linux-gnu.so +0 -0
  42. dao_treasury/sorting/rules/ignore/llamapay.py +20 -0
  43. dao_treasury/streams/__init__.cpython-312-i386-linux-gnu.so +0 -0
  44. dao_treasury/streams/__init__.py +0 -0
  45. dao_treasury/streams/llamapay.cpython-312-i386-linux-gnu.so +0 -0
  46. dao_treasury/streams/llamapay.py +388 -0
  47. dao_treasury/treasury.py +191 -0
  48. dao_treasury/types.cpython-312-i386-linux-gnu.so +0 -0
  49. dao_treasury/types.py +133 -0
  50. dao_treasury-0.0.62.dist-info/METADATA +120 -0
  51. dao_treasury-0.0.62.dist-info/RECORD +54 -0
  52. dao_treasury-0.0.62.dist-info/WHEEL +7 -0
  53. dao_treasury-0.0.62.dist-info/top_level.txt +2 -0
  54. dao_treasury__mypyc.cpython-312-i386-linux-gnu.so +0 -0
@@ -0,0 +1,225 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": {
7
+ "type": "grafana",
8
+ "uid": "-- Grafana --"
9
+ },
10
+ "enable": true,
11
+ "hide": true,
12
+ "iconColor": "rgba(0, 211, 255, 1)",
13
+ "name": "Annotations & Alerts",
14
+ "type": "dashboard"
15
+ }
16
+ ]
17
+ },
18
+ "editable": true,
19
+ "fiscalYearStartMonth": 0,
20
+ "graphTooltip": 0,
21
+ "id": 11,
22
+ "links": [],
23
+ "panels": [
24
+ {
25
+ "datasource": {
26
+ "type": "frser-sqlite-datasource",
27
+ "uid": "P2D2EEF3E092AF52B"
28
+ },
29
+ "description": "",
30
+ "fieldConfig": {
31
+ "defaults": {
32
+ "color": {
33
+ "mode": "thresholds"
34
+ },
35
+ "custom": {
36
+ "align": "auto",
37
+ "cellOptions": {
38
+ "type": "auto"
39
+ },
40
+ "inspect": false
41
+ },
42
+ "mappings": [],
43
+ "thresholds": {
44
+ "mode": "absolute",
45
+ "steps": [
46
+ {
47
+ "color": "green",
48
+ "value": 0
49
+ },
50
+ {
51
+ "color": "red",
52
+ "value": 80
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ "overrides": [
58
+ {
59
+ "matcher": {
60
+ "id": "byName",
61
+ "options": "Factory"
62
+ },
63
+ "properties": [
64
+ {
65
+ "id": "links",
66
+ "value": [
67
+ {
68
+ "targetBlank": true,
69
+ "title": "View on Etherscan",
70
+ "url": "https://etherscan.io/address/${__value.raw}"
71
+ }
72
+ ]
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ "matcher": {
78
+ "id": "byName",
79
+ "options": "From"
80
+ },
81
+ "properties": [
82
+ {
83
+ "id": "links",
84
+ "value": [
85
+ {
86
+ "targetBlank": true,
87
+ "title": "View on Etherscan",
88
+ "url": "https://etherscan.io/address/${__value.raw}"
89
+ }
90
+ ]
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "matcher": {
96
+ "id": "byName",
97
+ "options": "To"
98
+ },
99
+ "properties": [
100
+ {
101
+ "id": "links",
102
+ "value": [
103
+ {
104
+ "targetBlank": true,
105
+ "title": "View on Etherscan",
106
+ "url": "https://etherscan.io/address/${__value.raw}"
107
+ }
108
+ ]
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "matcher": {
114
+ "id": "byName",
115
+ "options": "Start Block"
116
+ },
117
+ "properties": [
118
+ {
119
+ "id": "links",
120
+ "value": [
121
+ {
122
+ "targetBlank": true,
123
+ "title": "View on Etherscan",
124
+ "url": "https://etherscan.io/block/${__value.raw}"
125
+ }
126
+ ]
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "matcher": {
132
+ "id": "byName",
133
+ "options": "End Block"
134
+ },
135
+ "properties": [
136
+ {
137
+ "id": "links",
138
+ "value": [
139
+ {
140
+ "targetBlank": true,
141
+ "title": "View on Etherscan",
142
+ "url": "https://etherscan.io/block/${__value.raw}"
143
+ }
144
+ ]
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "matcher": {
150
+ "id": "byName",
151
+ "options": "Budget Request"
152
+ },
153
+ "properties": [
154
+ {
155
+ "id": "links",
156
+ "value": [
157
+ {
158
+ "targetBlank": true,
159
+ "title": "View Budget Request on Github",
160
+ "url": "https://github.com/yearn/budget/issues/${__value.raw}"
161
+ }
162
+ ]
163
+ }
164
+ ]
165
+ }
166
+ ]
167
+ },
168
+ "gridPos": {
169
+ "h": 19,
170
+ "w": 24,
171
+ "x": 0,
172
+ "y": 0
173
+ },
174
+ "id": 1,
175
+ "options": {
176
+ "cellHeight": "sm",
177
+ "footer": {
178
+ "countRows": false,
179
+ "fields": "",
180
+ "reducer": [
181
+ "sum"
182
+ ],
183
+ "show": false
184
+ },
185
+ "showHeader": true
186
+ },
187
+ "pluginVersion": "12.1.1",
188
+ "targets": [
189
+ {
190
+ "datasource": {
191
+ "type": "frser-sqlite-datasource",
192
+ "uid": "P2D2EEF3E092AF52B"
193
+ },
194
+ "queryText": "SELECT\n stream_id as \"Stream ID\",\n b.address as \"Factory\",\n start_block as \"Start Block\",\n end_block as \"End Block\",\n c.symbol as \"Token\",\n d.address as \"From\",\n e.address as \"To\",\n reason as \"Reason\",\n CASE\n WHEN reason LIKE 'gh-%' AND\n -- ensures all after \"gh-\" is digits\n REPLACE(SUBSTR(reason, 4), '0', '') >= '' AND\n CAST(SUBSTR(reason, 4) AS INTEGER) || '' = SUBSTR(reason, 4)\n THEN CAST(SUBSTR(reason, 4) AS INTEGER)\n ELSE NULL\n END AS \"Budget Request\",\n amount_per_second as \"Amount Per Second\",\n status as \"Status\",\n txgroup as \"TxGroup\"\n\nFROM streams a\nLEFT JOIN addresses b ON a.contract = b.address_id\nLEFT JOIN tokens c ON a.token = c.token_id\nLEFT JOIN addresses d ON a.from_address = d.address_id\nLEFT JOIN addresses e ON a.to_address = e.address_id",
195
+ "queryType": "table",
196
+ "rawQueryText": "SELECT\n stream_id as \"Stream ID\",\n b.address as \"Factory\",\n start_block as \"Start Block\",\n end_block as \"End Block\",\n c.symbol as \"Token\",\n d.address as \"From\",\n e.address as \"To\",\n reason as \"Reason\",\n CASE\n WHEN reason LIKE 'gh-%' AND\n -- ensures all after \"gh-\" is digits\n REPLACE(SUBSTR(reason, 4), '0', '') >= '' AND\n CAST(SUBSTR(reason, 4) AS INTEGER) || '' = SUBSTR(reason, 4)\n THEN CAST(SUBSTR(reason, 4) AS INTEGER)\n ELSE NULL\n END AS \"Budget Request\",\n amount_per_second as \"Amount Per Second\",\n status as \"Status\",\n txgroup as \"TxGroup\"\n\nFROM streams a\nLEFT JOIN addresses b ON a.contract = b.address_id\nLEFT JOIN tokens c ON a.token = c.token_id\nLEFT JOIN addresses d ON a.from_address = d.address_id\nLEFT JOIN addresses e ON a.to_address = e.address_id",
197
+ "refId": "A",
198
+ "timeColumns": [
199
+ "time",
200
+ "ts"
201
+ ]
202
+ }
203
+ ],
204
+ "title": "LlamaPay Streams",
205
+ "type": "table"
206
+ }
207
+ ],
208
+ "preload": false,
209
+ "refresh": "",
210
+ "schemaVersion": 41,
211
+ "tags": [],
212
+ "templating": {
213
+ "list": []
214
+ },
215
+ "time": {
216
+ "from": "now-6h",
217
+ "to": "now"
218
+ },
219
+ "timepicker": {},
220
+ "timezone": "",
221
+ "title": "LlamaPay",
222
+ "description": "A simple dashboard with a comprehensive view of all LlamaPay payment streams managed by the DAO, including stream status, participants, configuration, and transaction group.",
223
+ "uid": "aa4d62a2-9e52-4acc-8f38-a96c77810aca",
224
+ "version": 1
225
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": "-- Grafana --",
7
+ "enable": true,
8
+ "hide": true,
9
+ "iconColor": "rgba(0, 211, 255, 1)",
10
+ "name": "Annotations & Alerts",
11
+ "type": "dashboard"
12
+ }
13
+ ]
14
+ },
15
+ "editable": true,
16
+ "fiscalYearStartMonth": 0,
17
+ "graphTooltip": 0,
18
+ "id": 2,
19
+ "links": [],
20
+ "panels": [
21
+ {
22
+ "datasource": "SQLite",
23
+ "fieldConfig": {
24
+ "defaults": {
25
+ "color": {
26
+ "mode": "thresholds"
27
+ },
28
+ "custom": {
29
+ "align": "auto",
30
+ "cellOptions": {
31
+ "type": "auto"
32
+ },
33
+ "inspect": false
34
+ },
35
+ "mappings": [],
36
+ "thresholds": {
37
+ "mode": "absolute",
38
+ "steps": [
39
+ {
40
+ "color": "green",
41
+ "value": 0
42
+ },
43
+ {
44
+ "color": "red",
45
+ "value": 80
46
+ }
47
+ ]
48
+ }
49
+ },
50
+ "overrides": []
51
+ },
52
+ "gridPos": {
53
+ "h": 9,
54
+ "w": 24,
55
+ "x": 0,
56
+ "y": 0
57
+ },
58
+ "id": 1,
59
+ "options": {
60
+ "cellHeight": "sm",
61
+ "footer": {
62
+ "countRows": false,
63
+ "fields": "",
64
+ "reducer": [
65
+ "sum"
66
+ ],
67
+ "show": false
68
+ },
69
+ "showHeader": true,
70
+ "sortBy": [
71
+ {
72
+ "desc": true,
73
+ "displayName": "Month"
74
+ }
75
+ ]
76
+ },
77
+ "pluginVersion": "12.1.1",
78
+ "targets": [
79
+ {
80
+ "datasource": "SQLite",
81
+ "queryText": "SELECT\n month AS \"Month\",\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END) AS \"Revenue\",\n SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END) AS \"Cost of Revenue\",\n SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END) AS \"Expenses\",\n SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END) AS \"Other Income\",\n SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END) AS \"Other Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n ) AS \"Sorted Net\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Income\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n ) AS \"Net\"\nFROM (\n SELECT\n strftime('%Y-%m', datetime(t.timestamp, 'unixepoch')) AS month,\n gh.top_category,\n COALESCE(t.value_usd, 0) AS value_usd\n FROM treasury_txs AS t\n JOIN txgroups AS tg ON t.txgroup_id = tg.txgroup_id\n JOIN txgroup_hierarchy AS gh ON tg.txgroup_id = gh.txgroup_id\n WHERE t.timestamp >= $__from / 1000 AND tg.name <> 'Ignore'\n) AS s\nGROUP BY month;",
82
+ "queryType": "table",
83
+ "rawQueryText": "SELECT\n month AS \"Month\",\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END) AS \"Revenue\",\n SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END) AS \"Cost of Revenue\",\n SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END) AS \"Expenses\",\n SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END) AS \"Other Income\",\n SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END) AS \"Other Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n ) AS \"Sorted Net\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Income\",\n SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END) AS \"Unsorted Expense\",\n (\n SUM(CASE WHEN s.top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN s.top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN s.top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n ) AS \"Net\"\nFROM (\n SELECT\n strftime('%Y-%m', datetime(t.timestamp, 'unixepoch')) AS month,\n gh.top_category,\n COALESCE(t.value_usd, 0) AS value_usd\n FROM treasury_txs AS t\n JOIN txgroups AS tg ON t.txgroup_id = tg.txgroup_id\n JOIN txgroup_hierarchy AS gh ON tg.txgroup_id = gh.txgroup_id\n WHERE t.timestamp >= strftime('%s', '2025-01-01') AND tg.name <> 'Ignore'\n) AS s\nGROUP BY month;",
84
+ "refId": "A"
85
+ }
86
+ ],
87
+ "title": "Monthly Profit & Loss",
88
+ "type": "table"
89
+ }
90
+ ],
91
+ "preload": false,
92
+ "refresh": "",
93
+ "schemaVersion": 41,
94
+ "tags": [],
95
+ "templating": {
96
+ "list": []
97
+ },
98
+ "time": {
99
+ "from": "now/y",
100
+ "to": "now"
101
+ },
102
+ "timepicker": {},
103
+ "timezone": "",
104
+ "title": "Monthly P&L",
105
+ "description": "Summarizes the DAO's monthly profit and loss, providing a breakdown of sorted and unsorted financial activity for each month. Supports financial reporting and tracking the progress of transaction categorization.",
106
+ "uid": "a63fa9a7-d4f3-4092-9bde-194add8bcbeb",
107
+ "version": 2
108
+ }