dao-treasury 0.0.57__cp311-cp311-macosx_11_0_arm64.whl → 0.0.59__cp311-cp311-macosx_11_0_arm64.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 (25) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +31 -12
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +32 -13
  3. dao_treasury/_docker.cpython-311-darwin.so +0 -0
  4. dao_treasury/_nicknames.cpython-311-darwin.so +0 -0
  5. dao_treasury/_wallet.cpython-311-darwin.so +0 -0
  6. dao_treasury/constants.cpython-311-darwin.so +0 -0
  7. dao_treasury/main.py +2 -2
  8. dao_treasury/sorting/__init__.cpython-311-darwin.so +0 -0
  9. dao_treasury/sorting/_matchers.cpython-311-darwin.so +0 -0
  10. dao_treasury/sorting/_rules.cpython-311-darwin.so +0 -0
  11. dao_treasury/sorting/factory.cpython-311-darwin.so +0 -0
  12. dao_treasury/sorting/rule.cpython-311-darwin.so +0 -0
  13. dao_treasury/sorting/rules/__init__.cpython-311-darwin.so +0 -0
  14. dao_treasury/sorting/rules/ignore/__init__.cpython-311-darwin.so +0 -0
  15. dao_treasury/sorting/rules/ignore/llamapay.cpython-311-darwin.so +0 -0
  16. dao_treasury/streams/__init__.cpython-311-darwin.so +0 -0
  17. dao_treasury/streams/llamapay.cpython-311-darwin.so +0 -0
  18. dao_treasury/types.cpython-311-darwin.so +0 -0
  19. {dao_treasury-0.0.57.dist-info → dao_treasury-0.0.59.dist-info}/METADATA +4 -2
  20. {dao_treasury-0.0.57.dist-info → dao_treasury-0.0.59.dist-info}/RECORD +23 -23
  21. dao_treasury-0.0.59.dist-info/top_level.txt +2 -0
  22. dao_treasury__mypyc.cpython-311-darwin.so +0 -0
  23. bf2b4fe1f86ad2ea158b__mypyc.cpython-311-darwin.so +0 -0
  24. dao_treasury-0.0.57.dist-info/top_level.txt +0 -2
  25. {dao_treasury-0.0.57.dist-info → dao_treasury-0.0.59.dist-info}/WHEEL +0 -0
@@ -74,9 +74,9 @@
74
74
  "targets": [
75
75
  {
76
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 in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
77
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
78
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 in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
79
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
80
80
  "refId": "A",
81
81
  "timeColumns": [
82
82
  "time",
@@ -139,9 +139,9 @@
139
139
  "targets": [
140
140
  {
141
141
  "datasource": "SQLite",
142
- "queryText": "SELECT SUM(t.value_usd) / (((1760217520685 - 1744406320685) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= 1744406320685/1000 AND t.timestamp <= 1760217520685/1000",
142
+ "queryText": "SELECT SUM(t.value_usd) / (((1760217520685 - 1744406320685) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= 1744406320685/1000 AND t.timestamp <= 1760217520685/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
143
143
  "queryType": "table",
144
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
144
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
145
145
  "refId": "A",
146
146
  "timeColumns": [
147
147
  "time",
@@ -204,9 +204,9 @@
204
204
  "targets": [
205
205
  {
206
206
  "datasource": "SQLite",
207
- "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
207
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
208
208
  "queryType": "table",
209
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
209
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
210
210
  "refId": "A",
211
211
  "timeColumns": [
212
212
  "time",
@@ -269,9 +269,9 @@
269
269
  "targets": [
270
270
  {
271
271
  "datasource": "SQLite",
272
- "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
272
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
273
273
  "queryType": "table",
274
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
274
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup')",
275
275
  "refId": "A",
276
276
  "timeColumns": [
277
277
  "time",
@@ -389,9 +389,9 @@
389
389
  "targets": [
390
390
  {
391
391
  "datasource": "SQLite",
392
- "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Total Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
392
+ "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Total Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id INNER JOIN txgroups g USING (txgroup_id) WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup') GROUP BY timestamp ORDER BY timestamp;",
393
393
  "queryType": "table",
394
- "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Total Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
394
+ "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Total Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id INNER JOIN txgroups g USING (txgroup_id) WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup') GROUP BY timestamp ORDER BY timestamp;",
395
395
  "refId": "A",
396
396
  "timeColumns": [
397
397
  "timestamp"
@@ -494,7 +494,25 @@
494
494
  "schemaVersion": 42,
495
495
  "tags": [],
496
496
  "templating": {
497
- "list": []
497
+ "list": [
498
+ {
499
+ "allowCustomValue": true,
500
+ "current": {
501
+ "text": "All",
502
+ "value": "$__all"
503
+ },
504
+ "definition": "SELECT DISTINCT t.name FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id LEFT JOIN txgroups t ON gh.txgroup_id = t.txgroup_id where gh.top_category = 'Revenue' or gh.top_category = 'Other Income';",
505
+ "description": "",
506
+ "includeAll": true,
507
+ "name": "Txgroup",
508
+ "options": [],
509
+ "query": "SELECT DISTINCT t.name FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id LEFT JOIN txgroups t ON gh.txgroup_id = t.txgroup_id where gh.top_category = 'Revenue' or gh.top_category = 'Other Income';",
510
+ "refresh": 2,
511
+ "regex": "",
512
+ "sort": 5,
513
+ "type": "query"
514
+ }
515
+ ]
498
516
  },
499
517
  "time": {
500
518
  "from": "now-6M",
@@ -503,5 +521,6 @@
503
521
  "timepicker": {},
504
522
  "timezone": "",
505
523
  "title": "Expenses Over Time",
506
- "version": 1
524
+ "uid": "62bccd38-918c-4395-9180-8f7f911e9ddf",
525
+ "version": 2
507
526
  }
@@ -19,7 +19,7 @@
19
19
  "editable": true,
20
20
  "fiscalYearStartMonth": 0,
21
21
  "graphTooltip": 1,
22
- "id": 5,
22
+ "id": 15,
23
23
  "links": [],
24
24
  "panels": [
25
25
  {
@@ -74,9 +74,9 @@
74
74
  "targets": [
75
75
  {
76
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",
77
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
78
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",
79
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
80
80
  "refId": "A",
81
81
  "timeColumns": [
82
82
  "time",
@@ -139,9 +139,9 @@
139
139
  "targets": [
140
140
  {
141
141
  "datasource": "SQLite",
142
- "queryText": "SELECT SUM(t.value_usd) / (((1760217520685 - 1744406320685) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= 1744406320685/1000 AND t.timestamp <= 1760217520685/1000",
142
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) INNER JOIN txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
143
143
  "queryType": "table",
144
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) 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",
144
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) INNER JOIN txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
145
145
  "refId": "A",
146
146
  "timeColumns": [
147
147
  "time",
@@ -204,9 +204,9 @@
204
204
  "targets": [
205
205
  {
206
206
  "datasource": "SQLite",
207
- "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) 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",
207
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) INNER JOIN txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
208
208
  "queryType": "table",
209
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) 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",
209
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) INNER JOIN txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
210
210
  "refId": "A",
211
211
  "timeColumns": [
212
212
  "time",
@@ -269,9 +269,9 @@
269
269
  "targets": [
270
270
  {
271
271
  "datasource": "SQLite",
272
- "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) 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",
272
+ "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) INNER JOIN txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
273
273
  "queryType": "table",
274
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) 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",
274
+ "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) INNER JOIN txgroups t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
275
275
  "refId": "A",
276
276
  "timeColumns": [
277
277
  "time",
@@ -389,9 +389,9 @@
389
389
  "targets": [
390
390
  {
391
391
  "datasource": "SQLite",
392
- "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
392
+ "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id INNER JOIN txgroups g USING (txgroup_id) WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup') GROUP BY timestamp ORDER BY timestamp;",
393
393
  "queryType": "table",
394
- "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
394
+ "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id INNER JOIN txgroups g USING (txgroup_id) WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or g.name = '$Txgroup') GROUP BY timestamp ORDER BY timestamp;",
395
395
  "refId": "A",
396
396
  "timeColumns": [
397
397
  "timestamp"
@@ -494,7 +494,25 @@
494
494
  "schemaVersion": 42,
495
495
  "tags": [],
496
496
  "templating": {
497
- "list": []
497
+ "list": [
498
+ {
499
+ "allowCustomValue": true,
500
+ "current": {
501
+ "text": "All",
502
+ "value": "$__all"
503
+ },
504
+ "definition": "SELECT DISTINCT t.name FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id LEFT JOIN txgroups t ON gh.txgroup_id = t.txgroup_id where gh.top_category = 'Revenue' or gh.top_category = 'Other Income';",
505
+ "description": "",
506
+ "includeAll": true,
507
+ "name": "Txgroup",
508
+ "options": [],
509
+ "query": "SELECT DISTINCT t.name FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id LEFT JOIN txgroups t ON gh.txgroup_id = t.txgroup_id where gh.top_category = 'Revenue' or gh.top_category = 'Other Income';",
510
+ "refresh": 2,
511
+ "regex": "",
512
+ "sort": 5,
513
+ "type": "query"
514
+ }
515
+ ]
498
516
  },
499
517
  "time": {
500
518
  "from": "now-6M",
@@ -503,5 +521,6 @@
503
521
  "timepicker": {},
504
522
  "timezone": "",
505
523
  "title": "Revenue Over Time",
506
- "version": 4
524
+ "uid": "5284bb56-b9fb-4f36-b971-eb125bfdac7d",
525
+ "version": 2
507
526
  }
Binary file
Binary file
dao_treasury/main.py CHANGED
@@ -100,8 +100,8 @@ parser.add_argument(
100
100
  parser.add_argument(
101
101
  "--concurrency",
102
102
  type=int,
103
- help="The max number of historical blocks to export concurrently. default: 50",
104
- default=50,
103
+ help="The max number of historical blocks to export concurrently. default: 30",
104
+ default=30,
105
105
  )
106
106
  parser.add_argument(
107
107
  "--daemon",
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dao_treasury
3
- Version: 0.0.57
3
+ Version: 0.0.59
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,8 @@ 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<0.3,>=0.2.8.dev0
17
+ Requires-Dist: eth-portfolio-temp<0.3,>=0.2.11
18
+ Requires-Dist: ypricemagic>=4.10.0
18
19
  Dynamic: classifier
19
20
  Dynamic: description
20
21
  Dynamic: description-content-type
@@ -66,6 +67,7 @@ poetry run dao-treasury run --wallet 0x123 --network mainnet --interval 12h
66
67
  **CLI Options:**
67
68
  - `--network`: The id of the brownie network the exporter will connect to (default: mainnet)
68
69
  - `--interval`: The time interval between each data snapshot (default: 12h)
70
+ - `--concurrency`: The max number of historical blocks to export concurrently. (default: 30)
69
71
  - `--daemon`: Run the export process in the background (default: False) (NOTE: currently unsupported)
70
72
  - `--grafana-port`: Set the port for the Grafana dashboard where you can view data (default: 3004)
71
73
  - `--renderer-port`: Set the port for the report rendering service (default: 8091)
@@ -1,29 +1,25 @@
1
- bf2b4fe1f86ad2ea158b__mypyc.cpython-311-darwin.so,sha256=J_nkqyCiIQFhGJMPmQrDlRrPtinXiEzHgiGR0DYT_c0,1230848
2
- dao_treasury-0.0.57.dist-info/RECORD,,
3
- dao_treasury-0.0.57.dist-info/WHEEL,sha256=sunMa2yiYbrNLGeMVDqEA0ayyJbHlex7SCn1TZrEq60,136
4
- dao_treasury-0.0.57.dist-info/top_level.txt,sha256=Gw-ri_26lZA_3hwhnOX48mffUbmBGr8NhtoQ0XoMeF8,41
5
- dao_treasury-0.0.57.dist-info/METADATA,sha256=SXN7tNRZs47YRwroBMwZjGyO8EYVyGq2vs-dZWXz35c,7029
6
- dao_treasury/_nicknames.cpython-311-darwin.so,sha256=j6pOpy-OYzYfVRQyI6TSUKLTV5qiyyEBt2PdK9uylok,50656
1
+ dao_treasury__mypyc.cpython-311-darwin.so,sha256=VTZwb9h7N8O9M4Rm4rFlkJ7DuwcqGUM2u79lc-gDRj8,1230536
2
+ dao_treasury/_nicknames.cpython-311-darwin.so,sha256=wWUYLpwwGIVGSVOD4fYhr6GS05aLeVs3LYqdTkPpo0M,50656
7
3
  dao_treasury/_wallet.py,sha256=epV8LVuwHlOzc9UkA66js7HfEiZBOSAGJMtWbDTzmjU,10462
8
4
  dao_treasury/db.py,sha256=wJi8-Zh2EO0F4A2ZabSt1ftcUTY6eCfF3FaChpjsTmg,48824
9
5
  dao_treasury/docker-compose.yaml,sha256=0epL6OjrW8cIwtqWerzB5c1Y_txLwvGMuHWUTIGtlsA,1309
10
6
  dao_treasury/ENVIRONMENT_VARIABLES.py,sha256=LEczR1MSWTY00sLHnFs3j_Jm8WZNJCxjwEzrvjbwl2E,636
11
- dao_treasury/_wallet.cpython-311-darwin.so,sha256=sIM1YCa5l2HMsBaeSh2ZmAcGQVyLn7k4ibcKOUxvUY4,50640
7
+ dao_treasury/_wallet.cpython-311-darwin.so,sha256=HbVhzZmjYhZMycW4-7b488m560JOtKWORWashvnEeq4,50640
12
8
  dao_treasury/constants.py,sha256=BGWVeN4KqpxWDGLG-DjPmdXmyVEb2C9KpMig9RaGJws,1444
13
- dao_treasury/types.cpython-311-darwin.so,sha256=DGb9QgOgVNvZ8-UTHWV0dV4OcM3lt7PwKVaNJU0SswI,50616
9
+ dao_treasury/types.cpython-311-darwin.so,sha256=3xJvMenFwMkdS7f0uL68UKAbnhLiVRly-QlphVaQ6Zo,50616
14
10
  dao_treasury/__init__.py,sha256=W4syl9-cNhHOdD25ye9U7aBJTLE_R-uP49FXC_6CUOE,1477
15
11
  dao_treasury/_nicknames.py,sha256=bvz0b8C31tFQ0pGtpSJW86OwjUF_qMBal4VXVT5UyLo,1017
16
12
  dao_treasury/types.py,sha256=dJDx0hYfDDL3slcUzRnCgrzFFsgCzoqg8uaTtLaT4kk,3685
17
- dao_treasury/_docker.cpython-311-darwin.so,sha256=FU6Vn5K81JYYcgeiP0m60bLdw5u2Mww6PD3JglvyCEo,50640
13
+ dao_treasury/_docker.cpython-311-darwin.so,sha256=3CwlwKh3N2rr7pDRLJfaEiwxYHieoE505O__dgw1mOg,50640
18
14
  dao_treasury/_docker.py,sha256=b3exLlhtaC9S3osrLQsL8SIOLKUtSoop2uue0cSP9WM,5908
19
- dao_treasury/constants.cpython-311-darwin.so,sha256=pDDQDB4cPAuM_mzNci6HUS6WLneuPfEVZqTYbwh02iI,50656
15
+ dao_treasury/constants.cpython-311-darwin.so,sha256=bOsAbx4f643nonRDUx7a2pbrbM_KrSPJYZs_cvgITJ0,50656
20
16
  dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
17
  dao_treasury/treasury.py,sha256=taTvwTH_Zdu2M61TrUCENcIUjxdQO3vryrZ2iVb6suM,7223
22
- dao_treasury/main.py,sha256=j1O2dUk6PTBCI3H50YBV6sQesKdhttLFi9-DzENBKkY,8205
18
+ dao_treasury/main.py,sha256=uMY5XP_GpxO6Qd9VA1YMLzMOd-O4VnxbGJ2Pdqh0Zo0,8205
23
19
  dao_treasury/.grafana/provisioning/datasources/datasources.yaml,sha256=mjQs8or651NgD_bZnKBm8vSghzjw_g3enL01YPt0dik,327
24
20
  dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=mop3_BaSxm68HvYRNrAUXJa_LevFD8j4uZBhyc6v44g,1830
25
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json,sha256=UdJPmqz6AP0KmePWVHuHB6ibjaW3pRzw539Qr5iwnaA,14187
26
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json,sha256=aKDEnqq_lX1vQ-cgl7tLIjqfcDHD-B-O5R9bZHzPGIQ,14556
21
+ dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json,sha256=8Lly44gGloXR1_x49KnSk0CZFK6w0SnOlPfSJ4GvW3s,15957
22
+ dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json,sha256=xOC1QTr-yCvWNXrDJmK95n1yO7pimazN8OOWex0trr0,16353
27
23
  dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json,sha256=R1mUD-am1JzTkkZdQqc84q76uIB8FNSiEBOG1wBPVBU,7195
28
24
  dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json,sha256=wTVhrkKfBqegq0pOHcqlLAvwoIv9rsr5nnxulLawXzA,12774
29
25
  dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json,sha256=7oQvyGTZIRGQuiUPKmrslMgjWxcFxevNz5TVGU2tfyE,27269
@@ -34,21 +30,25 @@ dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json,sha256=ED5P
34
30
  dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json,sha256=3ILVMAN0M2QKDKIypdFk895tSIdFomvgtawYAJPO4Bk,6752
35
31
  dao_treasury/streams/llamapay.py,sha256=yn37gwVfqGFF9fOhHuj9_t7KlHGyrdekF2TUmVDyg64,13147
36
32
  dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- dao_treasury/streams/__init__.cpython-311-darwin.so,sha256=3rNLeAFF9spn9nkwBuD4iFqf6q1GWyEMMUnM72q_99k,50640
38
- dao_treasury/streams/llamapay.cpython-311-darwin.so,sha256=wEnYPiROoSxch3YEJSSnPG2YM1abd4jOFbcqdz1ABOo,50656
33
+ dao_treasury/streams/__init__.cpython-311-darwin.so,sha256=X1iMbQM37GbDirAYLzo5OwFxlTf1CUHWlFNBFt_lE58,50640
34
+ dao_treasury/streams/llamapay.cpython-311-darwin.so,sha256=g7S4Px0Wn4lVYrealJKmdwJlPo-nj-BvBZFmMcekQAg,50656
39
35
  dao_treasury/sorting/_rules.py,sha256=vWkqJVA8yCHKRv9sw872Jq6G0zpM-v_J1jCz-Mgleec,8994
40
- dao_treasury/sorting/factory.cpython-311-darwin.so,sha256=pAJMPZ60eacyu4XQxPpwKuijMO8mGgvyCNYambRr-cw,50656
36
+ dao_treasury/sorting/factory.cpython-311-darwin.so,sha256=Q3mOh-AaPjK4eBJf8mkCOGWwng5TSEFzY85CXveoISY,50656
41
37
  dao_treasury/sorting/__init__.py,sha256=vKj3NPB7EWbX7_fSUWKXk-NsyPasOkFhJvJVGclBOAE,10371
42
- dao_treasury/sorting/rule.cpython-311-darwin.so,sha256=4y9saAvtC2LXN19Fd-MY-eDqcdX2Bhd22mK-38dMNXs,50632
43
- dao_treasury/sorting/_matchers.cpython-311-darwin.so,sha256=nKV_F3KTH19qt0LuweFh1-aOazNavAeQtdpGZOvZQ78,50656
38
+ dao_treasury/sorting/rule.cpython-311-darwin.so,sha256=ydXg8d7edTMXqE38cUUYM2dBv26vAU1Lu0iDXCIaO78,50632
39
+ dao_treasury/sorting/_matchers.cpython-311-darwin.so,sha256=LCf9jb_YVpPutkBbGaYtiKnLm3KpyHepwxpGLsmUIbA,50656
44
40
  dao_treasury/sorting/factory.py,sha256=pFD6luc0bKxOTT1hlAp3ZwJw6R0wN8pjIZrqMZwhsko,10185
45
41
  dao_treasury/sorting/rule.py,sha256=WtGGN5mOd6S2Bhk7v5lsBWSSzVGKON7V10ImrUN79Y4,11628
46
- dao_treasury/sorting/__init__.cpython-311-darwin.so,sha256=1sroVkcHOIBOYTzJb-_-yHtrChTdVqFSNENBpljN0rQ,50640
47
- dao_treasury/sorting/_rules.cpython-311-darwin.so,sha256=VYHeL3wZ53qBHfNMlEz-duyt_AolvEImoZ5_piXEsl4,50640
42
+ dao_treasury/sorting/__init__.cpython-311-darwin.so,sha256=OqhVIT3M_A8U6uIfraPp2i_yXHWOSehRR67j1XUHsp8,50640
43
+ dao_treasury/sorting/_rules.cpython-311-darwin.so,sha256=zNZzCSjLNlxvAinuNYBZ25zXHZnOIGE-eHMq0EtCk_g,50640
48
44
  dao_treasury/sorting/_matchers.py,sha256=u0GfPYiODr_NtzbfyLxEKDuXmWRiaeuZulDj9FPDOH8,14005
49
45
  dao_treasury/sorting/rules/__init__.py,sha256=ofzIsW0P74kuKr6DlScZIF8p7hBh6guRpe1uOq6oLLA,48
50
- dao_treasury/sorting/rules/__init__.cpython-311-darwin.so,sha256=L-My8ZPp6XBxC8r2ehoKxdsRPxX7B7tjAcpOn_TV-gA,50640
46
+ dao_treasury/sorting/rules/__init__.cpython-311-darwin.so,sha256=VfTs7oEMnGAfxt7Nb2iNKSE_F7QKaW3aPwPX_wHaIIs,50640
51
47
  dao_treasury/sorting/rules/ignore/llamapay.py,sha256=NgiVt9MRtI-f4mw9U5_gqttdPqDa3vt_z5XWJP_UYWs,763
52
48
  dao_treasury/sorting/rules/ignore/__init__.py,sha256=dJ4oKSLe7fal1Ct7XtMCfVJAtvZXcyIomf8HF3gWUhQ,57
53
- dao_treasury/sorting/rules/ignore/__init__.cpython-311-darwin.so,sha256=1cMZ1zYF2EQXxJ_1mNT4sSdpDHP6HsVfGM1GGR1ma5k,50656
54
- dao_treasury/sorting/rules/ignore/llamapay.cpython-311-darwin.so,sha256=HRyR4VBIxoEYG6ndRAQLjVTbBOJJVajWVkEzTP9H-I0,50672
49
+ dao_treasury/sorting/rules/ignore/__init__.cpython-311-darwin.so,sha256=BTbLpP7DgZU0fM6y9wztUPF4U__hqX3Rg-vrGfQRZyQ,50656
50
+ dao_treasury/sorting/rules/ignore/llamapay.cpython-311-darwin.so,sha256=jlLUDoibnY-XTJLky-UeLBZn3DBNqtcxURND1xdokWY,50672
51
+ dao_treasury-0.0.59.dist-info/RECORD,,
52
+ dao_treasury-0.0.59.dist-info/WHEEL,sha256=sunMa2yiYbrNLGeMVDqEA0ayyJbHlex7SCn1TZrEq60,136
53
+ dao_treasury-0.0.59.dist-info/top_level.txt,sha256=CV8aYytuSYplDhLVY4n0GphckdysXCd1lHmbqfsPxNk,33
54
+ dao_treasury-0.0.59.dist-info/METADATA,sha256=zU2r7EKPQ1XHkJGRvkHYYN6OOHXIH0UmkNI_IYJk114,7153
@@ -0,0 +1,2 @@
1
+ dao_treasury
2
+ dao_treasury__mypyc
@@ -1,2 +0,0 @@
1
- bf2b4fe1f86ad2ea158b__mypyc
2
- dao_treasury