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,876 @@
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": 1,
21
+ "id": 4,
22
+ "links": [],
23
+ "panels": [
24
+ {
25
+ "datasource": "SQLite",
26
+ "fieldConfig": {
27
+ "unit": "currencyUSD",
28
+ "defaults": {
29
+ "color": {
30
+ "mode": "thresholds"
31
+ },
32
+ "mappings": [],
33
+ "thresholds": {
34
+ "mode": "absolute",
35
+ "steps": [
36
+ {
37
+ "color": "green",
38
+ "value": 0
39
+ },
40
+ {
41
+ "color": "red",
42
+ "value": 80
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "overrides": []
48
+ },
49
+ "gridPos": {
50
+ "h": 4,
51
+ "w": 4,
52
+ "x": 0,
53
+ "y": 0
54
+ },
55
+ "id": 1,
56
+ "options": {
57
+ "colorMode": "value",
58
+ "graphMode": "area",
59
+ "justifyMode": "auto",
60
+ "orientation": "auto",
61
+ "percentChangeColorMode": "standard",
62
+ "reduceOptions": {
63
+ "calcs": [
64
+ "lastNotNull"
65
+ ],
66
+ "fields": "",
67
+ "values": false
68
+ },
69
+ "showPercentChange": false,
70
+ "textMode": "auto",
71
+ "wideLayout": true
72
+ },
73
+ "pluginVersion": "12.1.1",
74
+ "targets": [
75
+ {
76
+ "datasource": "SQLite",
77
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
78
+ "queryType": "table",
79
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
80
+ "refId": "A",
81
+ "timeColumns": [
82
+ "time",
83
+ "ts"
84
+ ]
85
+ }
86
+ ],
87
+ "title": "Revenue",
88
+ "type": "stat"
89
+ },
90
+ {
91
+ "datasource": "SQLite",
92
+ "fieldConfig": {
93
+ "unit": "currencyUSD",
94
+ "defaults": {
95
+ "color": {
96
+ "mode": "thresholds"
97
+ },
98
+ "mappings": [],
99
+ "thresholds": {
100
+ "mode": "absolute",
101
+ "steps": [
102
+ {
103
+ "color": "green",
104
+ "value": 0
105
+ },
106
+ {
107
+ "color": "red",
108
+ "value": 80
109
+ }
110
+ ]
111
+ }
112
+ },
113
+ "overrides": []
114
+ },
115
+ "gridPos": {
116
+ "h": 4,
117
+ "w": 4,
118
+ "x": 4,
119
+ "y": 0
120
+ },
121
+ "id": 2,
122
+ "options": {
123
+ "colorMode": "value",
124
+ "graphMode": "area",
125
+ "justifyMode": "auto",
126
+ "orientation": "auto",
127
+ "percentChangeColorMode": "standard",
128
+ "reduceOptions": {
129
+ "calcs": [
130
+ "lastNotNull"
131
+ ],
132
+ "fields": "",
133
+ "values": false
134
+ },
135
+ "showPercentChange": false,
136
+ "textMode": "auto",
137
+ "wideLayout": true
138
+ },
139
+ "pluginVersion": "12.1.1",
140
+ "targets": [
141
+ {
142
+ "datasource": "SQLite",
143
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
144
+ "queryType": "table",
145
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
146
+ "refId": "A",
147
+ "timeColumns": [
148
+ "time",
149
+ "ts"
150
+ ]
151
+ }
152
+ ],
153
+ "title": "Expenses",
154
+ "type": "stat"
155
+ },
156
+ {
157
+ "datasource": "SQLite",
158
+ "fieldConfig": {
159
+ "unit": "currencyUSD",
160
+ "defaults": {
161
+ "color": {
162
+ "mode": "thresholds"
163
+ },
164
+ "mappings": [],
165
+ "thresholds": {
166
+ "mode": "absolute",
167
+ "steps": [
168
+ {
169
+ "color": "green",
170
+ "value": 0
171
+ },
172
+ {
173
+ "color": "red",
174
+ "value": 80
175
+ }
176
+ ]
177
+ }
178
+ },
179
+ "overrides": []
180
+ },
181
+ "gridPos": {
182
+ "h": 4,
183
+ "w": 4,
184
+ "x": 8,
185
+ "y": 0
186
+ },
187
+ "id": 3,
188
+ "options": {
189
+ "colorMode": "value",
190
+ "graphMode": "area",
191
+ "justifyMode": "auto",
192
+ "orientation": "auto",
193
+ "percentChangeColorMode": "standard",
194
+ "reduceOptions": {
195
+ "calcs": [
196
+ "lastNotNull"
197
+ ],
198
+ "fields": "",
199
+ "values": false
200
+ },
201
+ "showPercentChange": false,
202
+ "textMode": "auto",
203
+ "wideLayout": true
204
+ },
205
+ "pluginVersion": "12.1.1",
206
+ "targets": [
207
+ {
208
+ "datasource": "SQLite",
209
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
210
+ "queryType": "table",
211
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
212
+ "refId": "A",
213
+ "timeColumns": [
214
+ "time",
215
+ "ts"
216
+ ]
217
+ }
218
+ ],
219
+ "title": "Cost of Revenue",
220
+ "type": "stat"
221
+ },
222
+ {
223
+ "datasource": "SQLite",
224
+ "fieldConfig": {
225
+ "unit": "currencyUSD",
226
+ "defaults": {
227
+ "color": {
228
+ "mode": "thresholds"
229
+ },
230
+ "mappings": [],
231
+ "thresholds": {
232
+ "mode": "absolute",
233
+ "steps": [
234
+ {
235
+ "color": "green",
236
+ "value": 0
237
+ },
238
+ {
239
+ "color": "red",
240
+ "value": 80
241
+ }
242
+ ]
243
+ }
244
+ },
245
+ "overrides": []
246
+ },
247
+ "gridPos": {
248
+ "h": 4,
249
+ "w": 4,
250
+ "x": 12,
251
+ "y": 0
252
+ },
253
+ "id": 4,
254
+ "options": {
255
+ "colorMode": "value",
256
+ "graphMode": "area",
257
+ "justifyMode": "auto",
258
+ "orientation": "auto",
259
+ "percentChangeColorMode": "standard",
260
+ "reduceOptions": {
261
+ "calcs": [
262
+ "lastNotNull"
263
+ ],
264
+ "fields": "",
265
+ "values": false
266
+ },
267
+ "showPercentChange": false,
268
+ "textMode": "auto",
269
+ "wideLayout": true
270
+ },
271
+ "pluginVersion": "12.1.1",
272
+ "targets": [
273
+ {
274
+ "datasource": "SQLite",
275
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
276
+ "queryType": "table",
277
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
278
+ "refId": "A",
279
+ "timeColumns": [
280
+ "time",
281
+ "ts"
282
+ ]
283
+ }
284
+ ],
285
+ "title": "Other Income",
286
+ "type": "stat"
287
+ },
288
+ {
289
+ "datasource": "SQLite",
290
+ "fieldConfig": {
291
+ "unit": "currencyUSD",
292
+ "defaults": {
293
+ "color": {
294
+ "mode": "thresholds"
295
+ },
296
+ "mappings": [],
297
+ "thresholds": {
298
+ "mode": "absolute",
299
+ "steps": [
300
+ {
301
+ "color": "green",
302
+ "value": 0
303
+ },
304
+ {
305
+ "color": "red",
306
+ "value": 80
307
+ }
308
+ ]
309
+ }
310
+ },
311
+ "overrides": []
312
+ },
313
+ "gridPos": {
314
+ "h": 4,
315
+ "w": 4,
316
+ "x": 16,
317
+ "y": 0
318
+ },
319
+ "id": 5,
320
+ "options": {
321
+ "colorMode": "value",
322
+ "graphMode": "area",
323
+ "justifyMode": "auto",
324
+ "orientation": "auto",
325
+ "percentChangeColorMode": "standard",
326
+ "reduceOptions": {
327
+ "calcs": [
328
+ "lastNotNull"
329
+ ],
330
+ "fields": "",
331
+ "values": false
332
+ },
333
+ "showPercentChange": false,
334
+ "textMode": "auto",
335
+ "wideLayout": true
336
+ },
337
+ "pluginVersion": "12.1.1",
338
+ "targets": [
339
+ {
340
+ "datasource": "SQLite",
341
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
342
+ "queryType": "table",
343
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
344
+ "refId": "A",
345
+ "timeColumns": [
346
+ "time",
347
+ "ts"
348
+ ]
349
+ }
350
+ ],
351
+ "title": "Other Expenses",
352
+ "type": "stat"
353
+ },
354
+ {
355
+ "datasource": "SQLite",
356
+ "description": "",
357
+ "fieldConfig": {
358
+ "unit": "currencyUSD",
359
+ "defaults": {
360
+ "color": {
361
+ "mode": "thresholds"
362
+ },
363
+ "mappings": [],
364
+ "thresholds": {
365
+ "mode": "absolute",
366
+ "steps": [
367
+ {
368
+ "color": "green",
369
+ "value": 0
370
+ },
371
+ {
372
+ "color": "red",
373
+ "value": 80
374
+ }
375
+ ]
376
+ }
377
+ },
378
+ "overrides": []
379
+ },
380
+ "gridPos": {
381
+ "h": 4,
382
+ "w": 4,
383
+ "x": 20,
384
+ "y": 0
385
+ },
386
+ "id": 10,
387
+ "options": {
388
+ "colorMode": "value",
389
+ "graphMode": "area",
390
+ "justifyMode": "auto",
391
+ "orientation": "auto",
392
+ "percentChangeColorMode": "standard",
393
+ "reduceOptions": {
394
+ "calcs": [
395
+ "lastNotNull"
396
+ ],
397
+ "fields": "",
398
+ "values": false
399
+ },
400
+ "showPercentChange": false,
401
+ "textMode": "auto",
402
+ "wideLayout": true
403
+ },
404
+ "pluginVersion": "12.1.1",
405
+ "targets": [
406
+ {
407
+ "datasource": "SQLite",
408
+ "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
409
+ "queryType": "table",
410
+ "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
411
+ "refId": "A",
412
+ "timeColumns": [
413
+ "time",
414
+ "ts"
415
+ ]
416
+ }
417
+ ],
418
+ "title": "Sorted Total",
419
+ "type": "stat"
420
+ },
421
+ {
422
+ "datasource": "SQLite",
423
+ "description": "",
424
+ "fieldConfig": {
425
+ "unit": "currencyUSD",
426
+ "defaults": {
427
+ "color": {
428
+ "mode": "palette-classic"
429
+ },
430
+ "custom": {
431
+ "axisBorderShow": false,
432
+ "axisCenteredZero": false,
433
+ "axisColorMode": "text",
434
+ "axisLabel": "",
435
+ "axisPlacement": "auto",
436
+ "barAlignment": 0,
437
+ "barWidthFactor": 0.6,
438
+ "drawStyle": "bars",
439
+ "fillOpacity": 70,
440
+ "gradientMode": "none",
441
+ "hideFrom": {
442
+ "legend": false,
443
+ "tooltip": false,
444
+ "viz": false
445
+ },
446
+ "insertNulls": false,
447
+ "lineInterpolation": "linear",
448
+ "lineWidth": 1,
449
+ "pointSize": 5,
450
+ "scaleDistribution": {
451
+ "type": "linear"
452
+ },
453
+ "showPoints": "auto",
454
+ "spanNulls": false,
455
+ "stacking": {
456
+ "group": "A",
457
+ "mode": "normal"
458
+ },
459
+ "thresholdsStyle": {
460
+ "mode": "off"
461
+ }
462
+ },
463
+ "mappings": [],
464
+ "thresholds": {
465
+ "mode": "absolute",
466
+ "steps": [
467
+ {
468
+ "color": "green",
469
+ "value": 0
470
+ },
471
+ {
472
+ "color": "red",
473
+ "value": 80
474
+ }
475
+ ]
476
+ }
477
+ },
478
+ "overrides": [
479
+ {
480
+ "matcher": {
481
+ "id": "byName",
482
+ "options": "Net (sum)"
483
+ },
484
+ "properties": [
485
+ {
486
+ "id": "custom.drawStyle",
487
+ "value": "line"
488
+ },
489
+ {
490
+ "id": "custom.stacking",
491
+ "value": {
492
+ "group": "A",
493
+ "mode": "none"
494
+ }
495
+ },
496
+ {
497
+ "id": "custom.fillOpacity",
498
+ "value": 19
499
+ }
500
+ ]
501
+ }
502
+ ]
503
+ },
504
+ "gridPos": {
505
+ "h": 12,
506
+ "w": 20,
507
+ "x": 0,
508
+ "y": 4
509
+ },
510
+ "id": 11,
511
+ "options": {
512
+ "legend": {
513
+ "calcs": [],
514
+ "displayMode": "list",
515
+ "placement": "bottom",
516
+ "showLegend": true
517
+ },
518
+ "tooltip": {
519
+ "hideZeros": false,
520
+ "mode": "single",
521
+ "sort": "none"
522
+ }
523
+ },
524
+ "pluginVersion": "12.1.1",
525
+ "targets": [
526
+ {
527
+ "datasource": "SQLite",
528
+ "queryText": "SELECT t.timestamp,\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) AS \"Total Received\",\r\n SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Sent\",\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) AS \"Net\"\r\nFROM general_ledger AS t\r\nJOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id\r\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000\r\nGROUP BY timestamp\r\nORDER BY timestamp;",
529
+ "queryType": "table",
530
+ "rawQueryText": "SELECT t.timestamp,\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) AS \"Total Received\",\r\n SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Sent\",\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) AS \"Net\"\r\nFROM general_ledger AS t\r\nJOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id\r\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000\r\nGROUP BY timestamp\r\nORDER BY timestamp;",
531
+ "refId": "A",
532
+ "timeColumns": [
533
+ "timestamp"
534
+ ]
535
+ }
536
+ ],
537
+ "title": "Weekly Cashflow",
538
+ "transformations": [
539
+ {
540
+ "id": "formatTime",
541
+ "options": {
542
+ "outputFormat": "YYYY-WW",
543
+ "timeField": "timestamp",
544
+ "timezone": "browser",
545
+ "useTimezone": true
546
+ }
547
+ },
548
+ {
549
+ "id": "convertFieldType",
550
+ "options": {
551
+ "conversions": [
552
+ {
553
+ "dateFormat": "YYYY-WW",
554
+ "destinationType": "time",
555
+ "targetField": "timestamp"
556
+ }
557
+ ],
558
+ "fields": {}
559
+ }
560
+ },
561
+ {
562
+ "id": "groupBy",
563
+ "options": {
564
+ "fields": {
565
+ "Cost of Revenue": {
566
+ "aggregations": [
567
+ "sum"
568
+ ],
569
+ "operation": "aggregate"
570
+ },
571
+ "Expenses": {
572
+ "aggregations": [
573
+ "sum"
574
+ ],
575
+ "operation": "aggregate"
576
+ },
577
+ "Net": {
578
+ "aggregations": [
579
+ "sum"
580
+ ],
581
+ "operation": "aggregate"
582
+ },
583
+ "Net (Including Unsorted)": {
584
+ "aggregations": [
585
+ "sum"
586
+ ],
587
+ "operation": "aggregate"
588
+ },
589
+ "Other Expenses": {
590
+ "aggregations": [
591
+ "sum"
592
+ ],
593
+ "operation": "aggregate"
594
+ },
595
+ "Other Income": {
596
+ "aggregations": [
597
+ "sum"
598
+ ],
599
+ "operation": "aggregate"
600
+ },
601
+ "Revenue": {
602
+ "aggregations": [
603
+ "sum"
604
+ ],
605
+ "operation": "aggregate"
606
+ },
607
+ "Timestamp": {
608
+ "aggregations": [],
609
+ "operation": "groupby"
610
+ },
611
+ "Total Expenses": {
612
+ "aggregations": [
613
+ "sum"
614
+ ],
615
+ "operation": "aggregate"
616
+ },
617
+ "Total Expenses (Including Unsorted)": {
618
+ "aggregations": [
619
+ "sum"
620
+ ],
621
+ "operation": "aggregate"
622
+ },
623
+ "Total Received": {
624
+ "aggregations": [
625
+ "sum"
626
+ ],
627
+ "operation": "aggregate"
628
+ },
629
+ "Total Revenue": {
630
+ "aggregations": [
631
+ "sum"
632
+ ],
633
+ "operation": "aggregate"
634
+ },
635
+ "Total Revenue (Including Unsorted)": {
636
+ "aggregations": [
637
+ "sum"
638
+ ],
639
+ "operation": "aggregate"
640
+ },
641
+ "Total Sent": {
642
+ "aggregations": [
643
+ "sum"
644
+ ],
645
+ "operation": "aggregate"
646
+ },
647
+ "timestamp": {
648
+ "aggregations": [],
649
+ "operation": "groupby"
650
+ }
651
+ }
652
+ }
653
+ }
654
+ ],
655
+ "type": "timeseries"
656
+ },
657
+ {
658
+ "datasource": "SQLite",
659
+ "description": "",
660
+ "fieldConfig": {
661
+ "unit": "currencyUSD",
662
+ "defaults": {
663
+ "color": {
664
+ "mode": "thresholds"
665
+ },
666
+ "mappings": [],
667
+ "thresholds": {
668
+ "mode": "absolute",
669
+ "steps": [
670
+ {
671
+ "color": "green",
672
+ "value": 0
673
+ },
674
+ {
675
+ "color": "red",
676
+ "value": 80
677
+ }
678
+ ]
679
+ }
680
+ },
681
+ "overrides": []
682
+ },
683
+ "gridPos": {
684
+ "h": 4,
685
+ "w": 4,
686
+ "x": 20,
687
+ "y": 4
688
+ },
689
+ "id": 8,
690
+ "options": {
691
+ "colorMode": "value",
692
+ "graphMode": "area",
693
+ "justifyMode": "auto",
694
+ "orientation": "auto",
695
+ "percentChangeColorMode": "standard",
696
+ "reduceOptions": {
697
+ "calcs": [
698
+ "lastNotNull"
699
+ ],
700
+ "fields": "",
701
+ "values": false
702
+ },
703
+ "showPercentChange": false,
704
+ "textMode": "auto",
705
+ "wideLayout": true
706
+ },
707
+ "pluginVersion": "12.1.1",
708
+ "targets": [
709
+ {
710
+ "datasource": "SQLite",
711
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Inbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
712
+ "queryType": "table",
713
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Inbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
714
+ "refId": "A",
715
+ "timeColumns": [
716
+ "time",
717
+ "ts"
718
+ ]
719
+ }
720
+ ],
721
+ "title": "Unsorted (Inbound)",
722
+ "type": "stat"
723
+ },
724
+ {
725
+ "datasource": "SQLite",
726
+ "description": "",
727
+ "fieldConfig": {
728
+ "unit": "currencyUSD",
729
+ "defaults": {
730
+ "color": {
731
+ "mode": "thresholds"
732
+ },
733
+ "mappings": [],
734
+ "thresholds": {
735
+ "mode": "absolute",
736
+ "steps": [
737
+ {
738
+ "color": "green",
739
+ "value": 0
740
+ },
741
+ {
742
+ "color": "red",
743
+ "value": 80
744
+ }
745
+ ]
746
+ }
747
+ },
748
+ "overrides": []
749
+ },
750
+ "gridPos": {
751
+ "h": 4,
752
+ "w": 4,
753
+ "x": 20,
754
+ "y": 8
755
+ },
756
+ "id": 9,
757
+ "options": {
758
+ "colorMode": "value",
759
+ "graphMode": "area",
760
+ "justifyMode": "auto",
761
+ "orientation": "auto",
762
+ "percentChangeColorMode": "standard",
763
+ "reduceOptions": {
764
+ "calcs": [
765
+ "lastNotNull"
766
+ ],
767
+ "fields": "",
768
+ "values": false
769
+ },
770
+ "showPercentChange": false,
771
+ "textMode": "auto",
772
+ "wideLayout": true
773
+ },
774
+ "pluginVersion": "12.1.1",
775
+ "targets": [
776
+ {
777
+ "datasource": "SQLite",
778
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Outbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
779
+ "queryType": "table",
780
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Outbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
781
+ "refId": "A",
782
+ "timeColumns": [
783
+ "time",
784
+ "ts"
785
+ ]
786
+ }
787
+ ],
788
+ "title": "Unsorted (Outbound)",
789
+ "type": "stat"
790
+ },
791
+ {
792
+ "datasource": "SQLite",
793
+ "description": "",
794
+ "fieldConfig": {
795
+ "unit": "currencyUSD",
796
+ "defaults": {
797
+ "color": {
798
+ "mode": "thresholds"
799
+ },
800
+ "mappings": [],
801
+ "thresholds": {
802
+ "mode": "absolute",
803
+ "steps": [
804
+ {
805
+ "color": "green",
806
+ "value": 0
807
+ },
808
+ {
809
+ "color": "red",
810
+ "value": 80
811
+ }
812
+ ]
813
+ }
814
+ },
815
+ "overrides": []
816
+ },
817
+ "gridPos": {
818
+ "h": 4,
819
+ "w": 4,
820
+ "x": 20,
821
+ "y": 12
822
+ },
823
+ "id": 6,
824
+ "options": {
825
+ "colorMode": "value",
826
+ "graphMode": "area",
827
+ "justifyMode": "auto",
828
+ "orientation": "auto",
829
+ "percentChangeColorMode": "standard",
830
+ "reduceOptions": {
831
+ "calcs": [
832
+ "lastNotNull"
833
+ ],
834
+ "fields": "",
835
+ "values": false
836
+ },
837
+ "showPercentChange": false,
838
+ "textMode": "auto",
839
+ "wideLayout": true
840
+ },
841
+ "pluginVersion": "12.1.1",
842
+ "targets": [
843
+ {
844
+ "datasource": "SQLite",
845
+ "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
846
+ "queryType": "table",
847
+ "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
848
+ "refId": "A",
849
+ "timeColumns": [
850
+ "time",
851
+ "ts"
852
+ ]
853
+ }
854
+ ],
855
+ "title": "Total",
856
+ "type": "stat"
857
+ }
858
+ ],
859
+ "preload": false,
860
+ "refresh": "",
861
+ "schemaVersion": 41,
862
+ "tags": [],
863
+ "templating": {
864
+ "list": []
865
+ },
866
+ "time": {
867
+ "from": "now-6M",
868
+ "to": "now"
869
+ },
870
+ "timepicker": {},
871
+ "timezone": "",
872
+ "title": "Total Cashflow Summary (Including Unsorted)",
873
+ "description": "Offers a complete picture of all DAO cashflows, including both sorted and unsorted transactions. This dashboard is ideal for tracking transactions still pending categorization and understanding their impact on overall cashflow.",
874
+ "uid": "2b6e7c1d-8f4a-4e3b-9b2a-1c7d8e9f0a2b",
875
+ "version": 5
876
+ }