dao-treasury 0.0.60__cp312-cp312-win32.whl → 0.1.6__cp312-cp312-win32.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 (42) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +195 -154
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +192 -149
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -81
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +10 -22
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +283 -23
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +49 -39
  7. dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json +367 -0
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +109 -187
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +77 -127
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +509 -105
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +3856 -2924
  12. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +57 -97
  13. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +9 -4
  14. dao_treasury/__init__.py +0 -4
  15. dao_treasury/_docker.cp312-win32.pyd +0 -0
  16. dao_treasury/_docker.py +30 -22
  17. dao_treasury/_nicknames.cp312-win32.pyd +0 -0
  18. dao_treasury/_nicknames.py +3 -2
  19. dao_treasury/_wallet.cp312-win32.pyd +0 -0
  20. dao_treasury/constants.cp312-win32.pyd +0 -0
  21. dao_treasury/db.py +383 -131
  22. dao_treasury/docker-compose.yaml +19 -3
  23. dao_treasury/main.py +42 -4
  24. dao_treasury/sorting/__init__.cp312-win32.pyd +0 -0
  25. dao_treasury/sorting/__init__.py +38 -21
  26. dao_treasury/sorting/_matchers.cp312-win32.pyd +0 -0
  27. dao_treasury/sorting/_rules.cp312-win32.pyd +0 -0
  28. dao_treasury/sorting/factory.cp312-win32.pyd +0 -0
  29. dao_treasury/sorting/rule.cp312-win32.pyd +0 -0
  30. dao_treasury/sorting/rules/__init__.cp312-win32.pyd +0 -0
  31. dao_treasury/sorting/rules/ignore/__init__.cp312-win32.pyd +0 -0
  32. dao_treasury/sorting/rules/ignore/llamapay.cp312-win32.pyd +0 -0
  33. dao_treasury/treasury.py +4 -2
  34. dao_treasury/types.cp312-win32.pyd +0 -0
  35. {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/METADATA +18 -4
  36. dao_treasury-0.1.6.dist-info/RECORD +53 -0
  37. dao_treasury__mypyc.cp312-win32.pyd +0 -0
  38. dao_treasury/streams/__init__.cp312-win32.pyd +0 -0
  39. dao_treasury/streams/llamapay.cp312-win32.pyd +0 -0
  40. dao_treasury-0.0.60.dist-info/RECORD +0 -54
  41. {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/WHEEL +0 -0
  42. {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/top_level.txt +0 -0
@@ -22,11 +22,8 @@
22
22
  "links": [],
23
23
  "panels": [
24
24
  {
25
- "datasource": {
26
- "type": "frser-sqlite-datasource",
27
- "uid": "P2D2EEF3E092AF52B"
28
- },
29
- "description": "",
25
+ "datasource": "PostgreSQL",
26
+ "description": "Displays all LlamaPay payment streams managed by the DAO, including stream ID, factory, start/end block, token, sender, recipient, reason, budget request, amount per second, status, and transaction group.\n\nData Links: Click on addresses or blocks to view them on Etherscan. Click on a budget request to view the related Github issue.",
30
27
  "fieldConfig": {
31
28
  "defaults": {
32
29
  "color": {
@@ -177,9 +174,7 @@
177
174
  "footer": {
178
175
  "countRows": false,
179
176
  "fields": "",
180
- "reducer": [
181
- "sum"
182
- ],
177
+ "reducer": ["sum"],
183
178
  "show": false
184
179
  },
185
180
  "showHeader": true
@@ -187,18 +182,11 @@
187
182
  "pluginVersion": "12.1.1",
188
183
  "targets": [
189
184
  {
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",
185
+ "datasource": "PostgreSQL",
186
+ "format": "table",
187
+ "rawSql": "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
188
  "refId": "A",
198
- "timeColumns": [
199
- "time",
200
- "ts"
201
- ]
189
+ "timeColumns": ["time", "ts"]
202
190
  }
203
191
  ],
204
192
  "title": "LlamaPay Streams",
@@ -208,7 +196,7 @@
208
196
  "preload": false,
209
197
  "refresh": "",
210
198
  "schemaVersion": 41,
211
- "tags": [],
199
+ "tags": ["streams", "llamapay", "payments"],
212
200
  "templating": {
213
201
  "list": []
214
202
  },
@@ -221,5 +209,5 @@
221
209
  "title": "LlamaPay",
222
210
  "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
211
  "uid": "aa4d62a2-9e52-4acc-8f38-a96c77810aca",
224
- "version": 1
225
- }
212
+ "version": 5
213
+ }
@@ -12,6 +12,7 @@
12
12
  }
13
13
  ]
14
14
  },
15
+ "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.",
15
16
  "editable": true,
16
17
  "fiscalYearStartMonth": 0,
17
18
  "graphTooltip": 0,
@@ -19,19 +20,31 @@
19
20
  "links": [],
20
21
  "panels": [
21
22
  {
22
- "datasource": "SQLite",
23
+ "datasource": "PostgreSQL",
24
+ "description": "Displays a table of monthly profit and loss for the DAO, including Revenue, Cost of Revenue, Expenses, Other Income, Other Expense, Sorted Net, Unsorted Income, Unsorted Expense.\n\nUseful for high-level financial reporting and tracking the progress of transaction categorization.\n\nClick on any underlined cell value to see all transactions for that transaction group and time period.\n\nYou can download this table as a CSV. Click on the three dots in the upper right corner, navigate \"Inspect\" -> \"Data\", select your desired options and click \"Download CSV\".",
23
25
  "fieldConfig": {
24
26
  "defaults": {
25
27
  "color": {
26
- "mode": "thresholds"
28
+ "mode": "continuous-RdYlGr"
27
29
  },
28
30
  "custom": {
29
31
  "align": "auto",
30
32
  "cellOptions": {
31
33
  "type": "auto"
32
34
  },
33
- "inspect": false
35
+ "footer": {
36
+ "reducers": ["sum", "max", "mean", "median"]
37
+ },
38
+ "inspect": true
34
39
  },
40
+ "fieldMinMax": true,
41
+ "links": [
42
+ {
43
+ "targetBlank": true,
44
+ "title": "View ${__field.name} transactions for this period",
45
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4/treasury-transactions?var-Top=${__field.name}&from=${__data.fields.month_start}&to=${__data.fields.month_end}"
46
+ }
47
+ ],
35
48
  "mappings": [],
36
49
  "thresholds": {
37
50
  "mode": "absolute",
@@ -45,12 +58,268 @@
45
58
  "value": 80
46
59
  }
47
60
  ]
48
- }
61
+ },
62
+ "unit": "currencyUSD"
49
63
  },
50
- "overrides": []
64
+ "overrides": [
65
+ {
66
+ "matcher": {
67
+ "id": "byName",
68
+ "options": "Sorted Net"
69
+ },
70
+ "properties": [
71
+ {
72
+ "id": "custom.cellOptions",
73
+ "value": {
74
+ "type": "color-text"
75
+ }
76
+ },
77
+ {
78
+ "id": "links"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "matcher": {
84
+ "id": "byName",
85
+ "options": "Net"
86
+ },
87
+ "properties": [
88
+ {
89
+ "id": "custom.cellOptions",
90
+ "value": {
91
+ "type": "color-text"
92
+ }
93
+ },
94
+ {
95
+ "id": "links"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "matcher": {
101
+ "id": "byName",
102
+ "options": "Unsorted Income"
103
+ },
104
+ "properties": [
105
+ {
106
+ "id": "custom.cellOptions",
107
+ "value": {
108
+ "type": "color-text"
109
+ }
110
+ },
111
+ {
112
+ "id": "color",
113
+ "value": {
114
+ "mode": "fixed"
115
+ }
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "matcher": {
121
+ "id": "byName",
122
+ "options": "Unsorted Expenses"
123
+ },
124
+ "properties": [
125
+ {
126
+ "id": "custom.cellOptions",
127
+ "value": {
128
+ "type": "color-text"
129
+ }
130
+ },
131
+ {
132
+ "id": "color",
133
+ "value": {
134
+ "mode": "fixed"
135
+ }
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "matcher": {
141
+ "id": "byName",
142
+ "options": "Other Income"
143
+ },
144
+ "properties": [
145
+ {
146
+ "id": "custom.cellOptions",
147
+ "value": {
148
+ "type": "color-text"
149
+ }
150
+ },
151
+ {
152
+ "id": "color",
153
+ "value": {
154
+ "mode": "fixed"
155
+ }
156
+ }
157
+ ]
158
+ },
159
+ {
160
+ "matcher": {
161
+ "id": "byName",
162
+ "options": "Other Expenses"
163
+ },
164
+ "properties": [
165
+ {
166
+ "id": "custom.cellOptions",
167
+ "value": {
168
+ "type": "color-text"
169
+ }
170
+ },
171
+ {
172
+ "id": "color",
173
+ "value": {
174
+ "mode": "fixed"
175
+ }
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ "matcher": {
181
+ "id": "byName",
182
+ "options": "Operating Net"
183
+ },
184
+ "properties": [
185
+ {
186
+ "id": "custom.cellOptions",
187
+ "value": {
188
+ "type": "color-text"
189
+ }
190
+ },
191
+ {
192
+ "id": "color",
193
+ "value": {
194
+ "mode": "continuous-RdYlGr"
195
+ }
196
+ },
197
+ {
198
+ "id": "links"
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ "matcher": {
204
+ "id": "byName",
205
+ "options": "month_start"
206
+ },
207
+ "properties": [
208
+ {
209
+ "id": "unit"
210
+ },
211
+ {
212
+ "id": "custom.hideFrom.viz",
213
+ "value": true
214
+ }
215
+ ]
216
+ },
217
+ {
218
+ "matcher": {
219
+ "id": "byName",
220
+ "options": "month_end"
221
+ },
222
+ "properties": [
223
+ {
224
+ "id": "unit"
225
+ },
226
+ {
227
+ "id": "custom.hideFrom.viz",
228
+ "value": true
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ "matcher": {
234
+ "id": "byName",
235
+ "options": "Revenue"
236
+ },
237
+ "properties": [
238
+ {
239
+ "id": "custom.cellOptions",
240
+ "value": {
241
+ "type": "color-text"
242
+ }
243
+ },
244
+ {
245
+ "id": "color",
246
+ "value": {
247
+ "fixedColor": "#ffffff",
248
+ "mode": "fixed"
249
+ }
250
+ }
251
+ ]
252
+ },
253
+ {
254
+ "matcher": {
255
+ "id": "byName",
256
+ "options": "Expenses"
257
+ },
258
+ "properties": [
259
+ {
260
+ "id": "custom.cellOptions",
261
+ "value": {
262
+ "type": "color-text"
263
+ }
264
+ },
265
+ {
266
+ "id": "color",
267
+ "value": {
268
+ "fixedColor": "#ffffff",
269
+ "mode": "fixed"
270
+ }
271
+ }
272
+ ]
273
+ },
274
+ {
275
+ "matcher": {
276
+ "id": "byName",
277
+ "options": "Cost of Revenue"
278
+ },
279
+ "properties": [
280
+ {
281
+ "id": "color",
282
+ "value": {
283
+ "fixedColor": "#ffffff",
284
+ "mode": "fixed"
285
+ }
286
+ },
287
+ {
288
+ "id": "custom.cellOptions",
289
+ "value": {
290
+ "type": "color-text"
291
+ }
292
+ }
293
+ ]
294
+ },
295
+ {
296
+ "matcher": {
297
+ "id": "byName",
298
+ "options": "Month"
299
+ },
300
+ "properties": [
301
+ {
302
+ "id": "color",
303
+ "value": {
304
+ "fixedColor": "#ffffff",
305
+ "mode": "fixed"
306
+ }
307
+ },
308
+ {
309
+ "id": "custom.cellOptions",
310
+ "value": {
311
+ "type": "color-text"
312
+ }
313
+ },
314
+ {
315
+ "id": "links"
316
+ }
317
+ ]
318
+ }
319
+ ]
51
320
  },
52
321
  "gridPos": {
53
- "h": 9,
322
+ "h": 20,
54
323
  "w": 24,
55
324
  "x": 0,
56
325
  "y": 0
@@ -58,14 +327,6 @@
58
327
  "id": 1,
59
328
  "options": {
60
329
  "cellHeight": "sm",
61
- "footer": {
62
- "countRows": false,
63
- "fields": "",
64
- "reducer": [
65
- "sum"
66
- ],
67
- "show": false
68
- },
69
330
  "showHeader": true,
70
331
  "sortBy": [
71
332
  {
@@ -74,14 +335,14 @@
74
335
  }
75
336
  ]
76
337
  },
77
- "pluginVersion": "12.1.1",
338
+ "pluginVersion": "12.2.1",
78
339
  "targets": [
79
340
  {
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"
341
+ "datasource": "PostgreSQL",
342
+ "format": "table",
343
+ "rawSql": "SELECT * FROM monthly_pnl WHERE month_end >= $__from AND month_start <= $__to;",
344
+ "refId": "A",
345
+ "timeColumns": ["time", "ts"]
85
346
  }
86
347
  ],
87
348
  "title": "Monthly Profit & Loss",
@@ -90,7 +351,7 @@
90
351
  ],
91
352
  "preload": false,
92
353
  "refresh": "",
93
- "schemaVersion": 41,
354
+ "schemaVersion": 42,
94
355
  "tags": [],
95
356
  "templating": {
96
357
  "list": []
@@ -102,7 +363,6 @@
102
363
  "timepicker": {},
103
364
  "timezone": "",
104
365
  "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
366
  "uid": "a63fa9a7-d4f3-4092-9bde-194add8bcbeb",
107
- "version": 2
367
+ "version": 10
108
368
  }
@@ -19,7 +19,7 @@
19
19
  "links": [],
20
20
  "panels": [
21
21
  {
22
- "datasource": "SQLite",
22
+ "datasource": "PostgreSQL",
23
23
  "fieldConfig": {
24
24
  "defaults": {
25
25
  "custom": {
@@ -190,9 +190,7 @@
190
190
  "footer": {
191
191
  "countRows": false,
192
192
  "fields": "",
193
- "reducer": [
194
- "sum"
195
- ],
193
+ "reducer": ["sum"],
196
194
  "show": false
197
195
  },
198
196
  "showHeader": true,
@@ -206,25 +204,22 @@
206
204
  "pluginVersion": "12.1.1",
207
205
  "targets": [
208
206
  {
209
- "datasource": "SQLite",
210
- "queryText": "select timestamp as \"Timestamp\", block as \"Block\", hash as \"Hash\", token as \"Token\", \"from\" as \"From\", from_nickname as \"From Nickname\", \"to\" as \"To\", to_nickname as \"To Nickname\", amount as \"Amount\", price as \"Price\", value_usd as \"Value USD\", txgroup as \"TxGroup\", a.parent_txgroup as \"Parent TxGroup\", log_index as \"Log Index\" from ( SELECT datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, c.symbol AS token, d.address AS \"from\", d.nickname as from_nickname, e.address AS \"to\", e.nickname as to_nickname, a.amount, a.price, a.value_usd, f.name AS txgroup, g.name AS parent_txgroup, f.txgroup_id, a.log_index FROM treasury_txs a LEFT JOIN chains b ON a.chain = b.chain_dbid LEFT JOIN tokens c ON a.token_id = c.token_id LEFT JOIN addresses d ON a.\"from\" = d.address_id LEFT JOIN addresses e ON a.\"to\" = e.address_id LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000 and ('$Chain' like '{%' or b.chain_name = '$Chain') and ('$Token' like '{%' or c.symbol = '$Token') and ('$From' like '{%' or d.address = '$From') and ('$To' like '{%' or e.address = '$To') and ('$FromNickname' like '{%' or d.nickname = '$FromNickname') and ('$ToNickname' like '{%' or e.nickname = '$ToNickname') ) a left join txgroup_hierarchy b on a.txgroup_id = b.txgroup_id WHERE ('$Top' LIKE '{%' OR b.top_category = '$Top') ORDER BY timestamp",
211
- "queryType": "table",
212
- "rawQueryText": "select timestamp as \"Timestamp\", block as \"Block\", hash as \"Hash\", token as \"Token\", \"from\" as \"From\", from_nickname as \"From Nickname\", \"to\" as \"To\", to_nickname as \"To Nickname\", amount as \"Amount\", price as \"Price\", value_usd as \"Value USD\", txgroup as \"TxGroup\", a.parent_txgroup as \"Parent TxGroup\", log_index as \"Log Index\" from ( SELECT datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, c.symbol AS token, d.address AS \"from\", d.nickname as from_nickname, e.address AS \"to\", e.nickname as to_nickname, a.amount, a.price, a.value_usd, f.name AS txgroup, g.name AS parent_txgroup, f.txgroup_id, a.log_index FROM treasury_txs a LEFT JOIN chains b ON a.chain = b.chain_dbid LEFT JOIN tokens c ON a.token_id = c.token_id LEFT JOIN addresses d ON a.\"from\" = d.address_id LEFT JOIN addresses e ON a.\"to\" = e.address_id LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000 and ('$Chain' like '{%' or b.chain_name = '$Chain') and ('$Token' like '{%' or c.symbol = '$Token') and ('$From' like '{%' or d.address = '$From') and ('$To' like '{%' or e.address = '$To') and ('$FromNickname' like '{%' or d.nickname = '$FromNickname') and ('$ToNickname' like '{%' or e.nickname = '$ToNickname') ) a left join txgroup_hierarchy b on a.txgroup_id = b.txgroup_id WHERE ('$Top' LIKE '{%' OR b.top_category = '$Top') ORDER BY timestamp",
207
+ "datasource": "PostgreSQL",
208
+ "format": "table",
209
+ "rawSql": "select timestamp as \"Timestamp\", block as \"Block\", hash as \"Hash\", token as \"Token\", \"from\" as \"From\", from_nickname as \"From Nickname\", \"to\" as \"To\", to_nickname as \"To Nickname\", amount as \"Amount\", price as \"Price\", value_usd as \"Value USD\", txgroup as \"TxGroup\", a.parent_txgroup as \"Parent TxGroup\", log_index as \"Log Index\" from ( SELECT to_timestamp(a.timestamp) AS timestamp, a.block, a.hash, c.symbol AS token, d.address AS \"from\", d.nickname as from_nickname, e.address AS \"to\", e.nickname AS to_nickname, a.amount, a.price, a.value_usd, f.name AS txgroup, g.name AS parent_txgroup, f.txgroup_id, a.log_index FROM treasury_txs a LEFT JOIN chains b ON a.chain = b.chain_dbid LEFT JOIN tokens c ON a.token_id = c.token_id LEFT JOIN addresses d ON a.\"from\" = d.address_id LEFT JOIN addresses e ON a.\"to\" = e.address_id LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000 and b.chain_name IN (${Chain:sqlstring}) and c.symbol IN (${Token:sqlstring}) and d.address IN (${From:sqlstring}) and e.address IN (${To:sqlstring}) and d.nickname IN (${FromNickname:sqlstring}) and e.nickname IN (${ToNickname:sqlstring}) ) a left join txgroup_hierarchy b on a.txgroup_id = b.txgroup_id WHERE b.top_category IN (${Top:sqlstring}) ORDER BY timestamp",
213
210
  "refId": "A",
214
- "timeColumns": [
215
- "time",
216
- "ts"
217
- ]
211
+ "timeColumns": ["time", "ts"]
218
212
  }
219
213
  ],
220
214
  "title": "Transactions",
221
- "type": "table"
215
+ "type": "table",
216
+ "description": "Displays all of the DAO's treasury transactions with full details, including timestamp, block, hash, token, sender/recipient address and nickname, amount, price, value in USD, and transaction group.\n\nIncludes direct links to Etherscan for transaction, block, and address fields."
222
217
  }
223
218
  ],
224
219
  "preload": false,
225
220
  "refresh": "",
226
221
  "schemaVersion": 41,
227
- "tags": [],
222
+ "tags": ["transactions", "detailed"],
228
223
  "templating": {
229
224
  "list": [
230
225
  {
@@ -232,30 +227,34 @@
232
227
  "text": "All",
233
228
  "value": "$__all"
234
229
  },
235
- "datasource": "SQLite",
236
- "definition": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id;",
230
+ "datasource": "PostgreSQL",
231
+ "definition": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000;",
237
232
  "includeAll": true,
238
233
  "label": "Top Level",
234
+ "multi": true,
239
235
  "name": "Top",
240
236
  "options": [],
241
- "query": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id;",
237
+ "query": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000;",
242
238
  "refresh": 2,
243
239
  "regex": "",
244
240
  "sort": 5,
245
- "type": "query"
241
+ "type": "query",
242
+ "description": "Filter transactions by top-level category (e.g., Revenue, Cost of Revenue, Expenses, Other Income, Other Expenses, Unsorted Income, Unsorted Expense).\n\nSelecting 'All' includes all categories."
246
243
  },
247
244
  {
248
245
  "current": {
249
246
  "text": "All",
250
247
  "value": "$__all"
251
248
  },
252
- "datasource": "SQLite",
253
- "definition": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid",
254
- "description": "",
249
+ "datasource": "PostgreSQL",
250
+ "definition": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
251
+ "description": "Filter transactions by blockchain network.\n\nSelecting 'All' includes all supported chains.",
255
252
  "includeAll": true,
253
+ "label": "Chain",
254
+ "multi": true,
256
255
  "name": "Chain",
257
256
  "options": [],
258
- "query": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid",
257
+ "query": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
259
258
  "refresh": 2,
260
259
  "regex": "",
261
260
  "sort": 5,
@@ -266,12 +265,15 @@
266
265
  "text": "All",
267
266
  "value": "$__all"
268
267
  },
269
- "datasource": "SQLite",
270
- "definition": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id",
268
+ "datasource": "PostgreSQL",
269
+ "definition": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
270
+ "description": "Filter transactions by token symbol.\n\nSelecting 'All' includes all tokens.",
271
271
  "includeAll": true,
272
+ "label": "Token",
273
+ "multi": true,
272
274
  "name": "Token",
273
275
  "options": [],
274
- "query": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id",
276
+ "query": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
275
277
  "refresh": 2,
276
278
  "regex": "",
277
279
  "sort": 5,
@@ -282,13 +284,15 @@
282
284
  "text": "All",
283
285
  "value": "$__all"
284
286
  },
285
- "datasource": "SQLite",
286
- "definition": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id",
287
+ "datasource": "PostgreSQL",
288
+ "definition": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
289
+ "description": "Filter transactions by sender address.\n\nSelecting 'All' includes all sender addresses.",
287
290
  "includeAll": true,
288
291
  "label": "From Address",
292
+ "multi": true,
289
293
  "name": "From",
290
294
  "options": [],
291
- "query": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id",
295
+ "query": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
292
296
  "refresh": 2,
293
297
  "regex": "",
294
298
  "sort": 5,
@@ -299,13 +303,15 @@
299
303
  "text": "All",
300
304
  "value": "$__all"
301
305
  },
302
- "datasource": "SQLite",
303
- "definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id",
306
+ "datasource": "PostgreSQL",
307
+ "definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
308
+ "description": "Filter transactions by sender nickname.\n\nSelecting 'All' includes all senders.",
304
309
  "includeAll": true,
305
310
  "label": "From Nickname",
311
+ "multi": true,
306
312
  "name": "FromNickname",
307
313
  "options": [],
308
- "query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id",
314
+ "query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
309
315
  "refresh": 2,
310
316
  "regex": "",
311
317
  "sort": 5,
@@ -316,13 +322,15 @@
316
322
  "text": "All",
317
323
  "value": "$__all"
318
324
  },
319
- "datasource": "SQLite",
320
- "definition": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id",
325
+ "datasource": "PostgreSQL",
326
+ "definition": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
327
+ "description": "Filter transactions by recipient address.\n\nSelecting 'All' includes all recipient addresses.",
321
328
  "includeAll": true,
322
329
  "label": "To Address",
330
+ "multi": true,
323
331
  "name": "To",
324
332
  "options": [],
325
- "query": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id",
333
+ "query": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
326
334
  "refresh": 2,
327
335
  "regex": "",
328
336
  "sort": 5,
@@ -333,13 +341,15 @@
333
341
  "text": "All",
334
342
  "value": "$__all"
335
343
  },
336
- "datasource": "SQLite",
337
- "definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id",
344
+ "datasource": "PostgreSQL",
345
+ "definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
346
+ "description": "Filter transactions by recipient nickname.\n\nSelecting 'All' includes all recipients.",
338
347
  "includeAll": true,
339
348
  "label": "To Nickname",
349
+ "multi": true,
340
350
  "name": "ToNickname",
341
351
  "options": [],
342
- "query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id",
352
+ "query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
343
353
  "refresh": 2,
344
354
  "regex": "",
345
355
  "sort": 5,
@@ -356,5 +366,5 @@
356
366
  "title": "Treasury Transactions",
357
367
  "description": "Provides a real-time, filterable table of all transactions in the DAO treasury database, including timestamp, block, hash, token, addresses, nicknames, amount, price, and value in USD. Enables detailed analysis and monitoring of all value transfers.",
358
368
  "uid": "b21f1092-66a4-4fb0-90ef-ed77d2becaa4",
359
- "version": 1
360
- }
369
+ "version": 9
370
+ }