dao-treasury 0.1.1__cp311-cp311-win_amd64.whl → 0.1.2__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dao-treasury might be problematic. Click here for more details.
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +11 -11
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +8 -8
- dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +6 -6
- dao_treasury/_docker.cp311-win_amd64.pyd +0 -0
- dao_treasury/_nicknames.cp311-win_amd64.pyd +0 -0
- dao_treasury/_wallet.cp311-win_amd64.pyd +0 -0
- dao_treasury/constants.cp311-win_amd64.pyd +0 -0
- dao_treasury/db.py +26 -13
- dao_treasury/sorting/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/_matchers.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/_rules.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/factory.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rule.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd +0 -0
- dao_treasury/types.cp311-win_amd64.pyd +0 -0
- {dao_treasury-0.1.1.dist-info → dao_treasury-0.1.2.dist-info}/METADATA +1 -1
- {dao_treasury-0.1.1.dist-info → dao_treasury-0.1.2.dist-info}/RECORD +22 -22
- dao_treasury__mypyc.cp311-win_amd64.pyd +0 -0
- {dao_treasury-0.1.1.dist-info → dao_treasury-0.1.2.dist-info}/WHEEL +0 -0
- {dao_treasury-0.1.1.dist-info → dao_treasury-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
{
|
|
74
74
|
"datasource": "PostgreSQL",
|
|
75
75
|
"format": "table",
|
|
76
|
-
"rawSql": "SELECT SUM(
|
|
76
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
77
77
|
"refId": "A",
|
|
78
78
|
"timeColumns": ["time", "ts"]
|
|
79
79
|
}
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
{
|
|
135
135
|
"datasource": "PostgreSQL",
|
|
136
136
|
"format": "table",
|
|
137
|
-
"rawSql": "SELECT SUM(
|
|
137
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Expenses' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
138
138
|
"refId": "A",
|
|
139
139
|
"timeColumns": ["time", "ts"]
|
|
140
140
|
}
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
{
|
|
196
196
|
"datasource": "PostgreSQL",
|
|
197
197
|
"format": "table",
|
|
198
|
-
"rawSql": "SELECT SUM(
|
|
198
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Cost of Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
199
199
|
"refId": "A",
|
|
200
200
|
"timeColumns": ["time", "ts"]
|
|
201
201
|
}
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
{
|
|
257
257
|
"datasource": "PostgreSQL",
|
|
258
258
|
"format": "table",
|
|
259
|
-
"rawSql": "SELECT SUM(
|
|
259
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Other Income' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
260
260
|
"refId": "A",
|
|
261
261
|
"timeColumns": ["time", "ts"]
|
|
262
262
|
}
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
{
|
|
318
318
|
"datasource": "PostgreSQL",
|
|
319
319
|
"format": "table",
|
|
320
|
-
"rawSql": "SELECT SUM(
|
|
320
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Other Expenses' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
321
321
|
"refId": "A",
|
|
322
322
|
"timeColumns": ["time", "ts"]
|
|
323
323
|
}
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
{
|
|
380
380
|
"datasource": "PostgreSQL",
|
|
381
381
|
"format": "table",
|
|
382
|
-
"rawSql": "SELECT (\n SUM(CASE WHEN
|
|
382
|
+
"rawSql": "SELECT (\n SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
383
383
|
"refId": "A",
|
|
384
384
|
"timeColumns": ["time", "ts"]
|
|
385
385
|
}
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
{
|
|
496
496
|
"datasource": "PostgreSQL",
|
|
497
497
|
"format": "table",
|
|
498
|
-
"rawSql": "SELECT to_timestamp(
|
|
498
|
+
"rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\",\n SUM(CASE WHEN top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN value_usd ELSE 0 END) AS \"Total Received\",\n SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN value_usd ELSE 0 END) * -1 AS \"Total Sent\",\n SUM(CASE WHEN top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN value_usd ELSE 0 END) - SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN value_usd ELSE 0 END) AS \"Net\"\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000\nGROUP BY timestamp\nORDER BY timestamp;",
|
|
499
499
|
"refId": "A",
|
|
500
500
|
"timeColumns": ["timestamp"]
|
|
501
501
|
}
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
{
|
|
648
648
|
"datasource": "PostgreSQL",
|
|
649
649
|
"format": "table",
|
|
650
|
-
"rawSql": "SELECT SUM(
|
|
650
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Sort Me (Inbound)' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
651
651
|
"refId": "A",
|
|
652
652
|
"timeColumns": ["time", "ts"]
|
|
653
653
|
}
|
|
@@ -708,7 +708,7 @@
|
|
|
708
708
|
{
|
|
709
709
|
"datasource": "PostgreSQL",
|
|
710
710
|
"format": "table",
|
|
711
|
-
"rawSql": "SELECT SUM(
|
|
711
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Sort Me (Outbound)' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
712
712
|
"refId": "A",
|
|
713
713
|
"timeColumns": ["time", "ts"]
|
|
714
714
|
}
|
|
@@ -769,7 +769,7 @@
|
|
|
769
769
|
{
|
|
770
770
|
"datasource": "PostgreSQL",
|
|
771
771
|
"format": "table",
|
|
772
|
-
"rawSql": "SELECT (\n SUM(CASE WHEN
|
|
772
|
+
"rawSql": "SELECT (\n SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
773
773
|
"refId": "A",
|
|
774
774
|
"timeColumns": ["time", "ts"]
|
|
775
775
|
}
|
|
@@ -794,5 +794,5 @@
|
|
|
794
794
|
"title": "Total Cashflow Summary (Including Unsorted)",
|
|
795
795
|
"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.",
|
|
796
796
|
"uid": "2b6e7c1d-8f4a-4e3b-9b2a-1c7d8e9f0a2b",
|
|
797
|
-
"version":
|
|
797
|
+
"version": 106
|
|
798
798
|
}
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
{
|
|
74
74
|
"datasource": "PostgreSQL",
|
|
75
75
|
"format": "table",
|
|
76
|
-
"rawSql": "SELECT SUM(
|
|
76
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
77
77
|
"refId": "A",
|
|
78
78
|
"timeColumns": ["time", "ts"]
|
|
79
79
|
}
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
{
|
|
135
135
|
"datasource": "PostgreSQL",
|
|
136
136
|
"format": "table",
|
|
137
|
-
"rawSql": "SELECT SUM(
|
|
137
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Expenses' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
138
138
|
"refId": "A",
|
|
139
139
|
"timeColumns": ["time", "ts"]
|
|
140
140
|
}
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
{
|
|
196
196
|
"datasource": "PostgreSQL",
|
|
197
197
|
"format": "table",
|
|
198
|
-
"rawSql": "SELECT SUM(
|
|
198
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Cost of Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
199
199
|
"refId": "A",
|
|
200
200
|
"timeColumns": ["time", "ts"]
|
|
201
201
|
}
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
{
|
|
257
257
|
"datasource": "PostgreSQL",
|
|
258
258
|
"format": "table",
|
|
259
|
-
"rawSql": "SELECT SUM(
|
|
259
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Other Income' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
260
260
|
"refId": "A",
|
|
261
261
|
"timeColumns": ["time", "ts"]
|
|
262
262
|
}
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
{
|
|
318
318
|
"datasource": "PostgreSQL",
|
|
319
319
|
"format": "table",
|
|
320
|
-
"rawSql": "SELECT SUM(
|
|
320
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Other Expenses' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
321
321
|
"refId": "A",
|
|
322
322
|
"timeColumns": ["time", "ts"]
|
|
323
323
|
}
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
{
|
|
380
380
|
"datasource": "PostgreSQL",
|
|
381
381
|
"format": "table",
|
|
382
|
-
"rawSql": "SELECT (\n SUM(CASE WHEN
|
|
382
|
+
"rawSql": "SELECT (\n SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
383
383
|
"refId": "A",
|
|
384
384
|
"timeColumns": ["time", "ts"]
|
|
385
385
|
}
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
{
|
|
496
496
|
"datasource": "PostgreSQL",
|
|
497
497
|
"format": "table",
|
|
498
|
-
"rawSql": "SELECT to_timestamp(
|
|
498
|
+
"rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\", SUM(CASE WHEN top_category in ('Revenue', 'Other Income') THEN value_usd ELSE 0 END) AS \"Total Revenue\", SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN value_usd ELSE 0 END) * -1 AS \"Total Expenses\", SUM(CASE WHEN top_category in ('Revenue', 'Other Income') THEN value_usd ELSE 0 END) - SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN value_usd ELSE 0 END) AS \"Net\" FROM usdvalue_presum WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
|
|
499
499
|
"refId": "A",
|
|
500
500
|
"timeColumns": ["timestamp"]
|
|
501
501
|
}
|
|
@@ -591,5 +591,5 @@
|
|
|
591
591
|
"title": "Total Cashflow Summary",
|
|
592
592
|
"description": "Shows all sorted cashflows, including Revenue, Cost of Revenue, Expenses, Other Income, and Other Expense, but omits transactions pending categorization. Useful for analyzing the DAO's complete sorted financial flows.",
|
|
593
593
|
"uid": "7e2b1c8a-4e2d-4b7a-9c1a-2f8e6b7d9c3f",
|
|
594
|
-
"version":
|
|
594
|
+
"version": 107
|
|
595
595
|
}
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
{
|
|
74
74
|
"datasource": "PostgreSQL",
|
|
75
75
|
"format": "table",
|
|
76
|
-
"rawSql": "SELECT SUM(
|
|
76
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
77
77
|
"refId": "A",
|
|
78
78
|
"timeColumns": ["time", "ts"]
|
|
79
79
|
}
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
{
|
|
135
135
|
"datasource": "PostgreSQL",
|
|
136
136
|
"format": "table",
|
|
137
|
-
"rawSql": "SELECT SUM(
|
|
137
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Cost of Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
138
138
|
"refId": "A",
|
|
139
139
|
"timeColumns": ["time", "ts"]
|
|
140
140
|
}
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
{
|
|
196
196
|
"datasource": "PostgreSQL",
|
|
197
197
|
"format": "table",
|
|
198
|
-
"rawSql": "SELECT SUM(
|
|
198
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Expenses' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
199
199
|
"refId": "A",
|
|
200
200
|
"timeColumns": ["time", "ts"]
|
|
201
201
|
}
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
{
|
|
258
258
|
"datasource": "PostgreSQL",
|
|
259
259
|
"format": "table",
|
|
260
|
-
"rawSql": "SELECT (\n SUM(CASE WHEN
|
|
260
|
+
"rawSql": "SELECT (\n SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Expenses' THEN value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000",
|
|
261
261
|
"refId": "A",
|
|
262
262
|
"timeColumns": ["time", "ts"]
|
|
263
263
|
}
|
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
{
|
|
374
374
|
"datasource": "PostgreSQL",
|
|
375
375
|
"format": "table",
|
|
376
|
-
"rawSql": "SELECT to_timestamp(
|
|
376
|
+
"rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\", SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END) AS \"Total Revenue\", SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses') THEN value_usd ELSE 0 END) * -1 AS \"Total Expenses\", SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END) - SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses') THEN value_usd ELSE 0 END) AS \"Net\" FROM usdvalue_presum WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
|
|
377
377
|
"refId": "A",
|
|
378
378
|
"timeColumns": ["timestamp"]
|
|
379
379
|
}
|
|
@@ -469,5 +469,5 @@
|
|
|
469
469
|
"title": "Operating Cashflow Summary",
|
|
470
470
|
"description": "Provides a focused view of core operational cashflows, including only sorted transactions in Revenue, Cost of Revenue, and Expenses categories. Excludes unsorted transactions and non-operational activity, helping monitor specifically the DAO's operational financial flows.",
|
|
471
471
|
"uid": "fdf9969c-357a-4203-ae7b-12816e87bc7e",
|
|
472
|
-
"version":
|
|
472
|
+
"version": 106
|
|
473
473
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
dao_treasury/db.py
CHANGED
|
@@ -1481,11 +1481,13 @@ def create_usdval_presum_matview() -> None:
|
|
|
1481
1481
|
DROP MATERIALIZED VIEW IF EXISTS usdvalue_presum;
|
|
1482
1482
|
CREATE MATERIALIZED VIEW usdvalue_presum AS
|
|
1483
1483
|
SELECT
|
|
1484
|
-
txgroup_id,
|
|
1485
|
-
|
|
1484
|
+
gl.txgroup_id,
|
|
1485
|
+
gh.top_category,
|
|
1486
|
+
gl.timestamp,
|
|
1486
1487
|
SUM(value_usd) AS value_usd
|
|
1487
|
-
FROM general_ledger
|
|
1488
|
-
|
|
1488
|
+
FROM general_ledger gl
|
|
1489
|
+
JOIN txgroup_hierarchy gh USING (txgroup_id)
|
|
1490
|
+
GROUP BY gl.txgroup_id, gh.top_category, gl.timestamp;
|
|
1489
1491
|
|
|
1490
1492
|
-- Indexes
|
|
1491
1493
|
CREATE UNIQUE INDEX idx_usdvalue_presum_txgroup_id_timestamp
|
|
@@ -1493,6 +1495,18 @@ def create_usdval_presum_matview() -> None:
|
|
|
1493
1495
|
|
|
1494
1496
|
CREATE UNIQUE INDEX idx_usdvalue_presum_timestamp_txgroup_id
|
|
1495
1497
|
ON usdvalue_presum (timestamp, txgroup_id);
|
|
1498
|
+
|
|
1499
|
+
CREATE INDEX idx_usdvalue_presum_top_category_timestamp
|
|
1500
|
+
ON usdvalue_presum (top_category, timestamp);
|
|
1501
|
+
|
|
1502
|
+
CREATE INDEX idx_usdvalue_presum_timestamp_top_category
|
|
1503
|
+
ON usdvalue_presum (timestamp, top_category);
|
|
1504
|
+
|
|
1505
|
+
CREATE UNIQUE INDEX idx_usdvalue_presum_top_category_txgroup_id_timestamp
|
|
1506
|
+
ON usdvalue_presum (top_category, txgroup_id, timestamp);
|
|
1507
|
+
|
|
1508
|
+
CREATE UNIQUE INDEX idx_usdvalue_presum_timestamp_top_category_txgroup_id
|
|
1509
|
+
ON usdvalue_presum (timestamp, top_category, txgroup_id);
|
|
1496
1510
|
"""
|
|
1497
1511
|
)
|
|
1498
1512
|
|
|
@@ -1507,14 +1521,13 @@ def create_usdval_presum_revenue_matview() -> None:
|
|
|
1507
1521
|
SELECT
|
|
1508
1522
|
p.txgroup_id,
|
|
1509
1523
|
t.name AS txgroup_name,
|
|
1510
|
-
|
|
1524
|
+
p.top_category,
|
|
1511
1525
|
p.timestamp,
|
|
1512
1526
|
SUM(p.value_usd) AS value_usd
|
|
1513
|
-
FROM
|
|
1514
|
-
JOIN txgroup_hierarchy gh ON p.txgroup_id = gh.txgroup_id
|
|
1527
|
+
FROM usdvalue_presum p
|
|
1515
1528
|
JOIN txgroups t ON p.txgroup_id = t.txgroup_id
|
|
1516
|
-
WHERE
|
|
1517
|
-
GROUP BY p.txgroup_id, t.name,
|
|
1529
|
+
WHERE p.top_category IN ('Revenue', 'Other Income')
|
|
1530
|
+
GROUP BY p.txgroup_id, t.name, p.top_category, p.timestamp;
|
|
1518
1531
|
|
|
1519
1532
|
-- Indexes
|
|
1520
1533
|
CREATE UNIQUE INDEX idx_usdvalue_presum_revenue_txgroup_id_timestamp
|
|
@@ -1548,14 +1561,14 @@ def create_usdval_presum_expenses_matview() -> None:
|
|
|
1548
1561
|
SELECT
|
|
1549
1562
|
p.txgroup_id,
|
|
1550
1563
|
g.name AS txgroup_name,
|
|
1551
|
-
|
|
1564
|
+
p.top_category,
|
|
1552
1565
|
p.timestamp,
|
|
1553
1566
|
SUM(p.value_usd) AS value_usd
|
|
1554
|
-
FROM
|
|
1567
|
+
FROM usdvalue_presum p
|
|
1555
1568
|
JOIN txgroup_hierarchy gh ON p.txgroup_id = gh.txgroup_id
|
|
1556
1569
|
JOIN txgroups g ON p.txgroup_id = g.txgroup_id
|
|
1557
|
-
WHERE
|
|
1558
|
-
GROUP BY p.txgroup_id, g.name,
|
|
1570
|
+
WHERE p.top_category IN ('Expenses', 'Cost of Revenue', 'Other Expense')
|
|
1571
|
+
GROUP BY p.txgroup_id, g.name, p.top_category, p.timestamp;
|
|
1559
1572
|
|
|
1560
1573
|
-- Indexes
|
|
1561
1574
|
CREATE UNIQUE INDEX idx_usdvalue_presum_expenses_txgroup_id_timestamp
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
dao_treasury__mypyc.cp311-win_amd64.pyd,sha256=
|
|
1
|
+
dao_treasury__mypyc.cp311-win_amd64.pyd,sha256=NZVGtxvVdKjkxDUPZ0YvATxbLeI5gYT68ufr9IKuTeQ,279552
|
|
2
2
|
dao_treasury/ENVIRONMENT_VARIABLES.py,sha256=LS_D4ALB3BO-vYKyh1tzRHi10QBE6f654Zy8pmJ_xPY,656
|
|
3
3
|
dao_treasury/__init__.py,sha256=fEHZYMeNqVUI9YAVXCHozxDB7cvJJnaF4HBRyeAlOiw,1435
|
|
4
|
-
dao_treasury/_docker.cp311-win_amd64.pyd,sha256=
|
|
4
|
+
dao_treasury/_docker.cp311-win_amd64.pyd,sha256=lbvN_icLAcGkqRrv_Gfk69wabttAcM-F_76iFsZdcss,10752
|
|
5
5
|
dao_treasury/_docker.py,sha256=yAMcwXl48hGPN2sH5b56O_XP3wrd1gap959Xrk8KpKM,6337
|
|
6
|
-
dao_treasury/_nicknames.cp311-win_amd64.pyd,sha256=
|
|
6
|
+
dao_treasury/_nicknames.cp311-win_amd64.pyd,sha256=5FYQBA4CP92NsDSjwqZJtZO_hLIlP6hNWXNnQENS_kE,10752
|
|
7
7
|
dao_treasury/_nicknames.py,sha256=4Smlv4y5248PM-yDEyybbR1Of1-tIHgf0PCBAXTE3Aw,1071
|
|
8
|
-
dao_treasury/_wallet.cp311-win_amd64.pyd,sha256=
|
|
8
|
+
dao_treasury/_wallet.cp311-win_amd64.pyd,sha256=OUH3Wt1Nhhsya3wLupaN_nQlElnWIZjC1gVC9d0LkzE,10752
|
|
9
9
|
dao_treasury/_wallet.py,sha256=nHBAKFJstdKuYbvpskGVx2KU80YrZHGHsEh5V3TwIHs,10712
|
|
10
|
-
dao_treasury/constants.cp311-win_amd64.pyd,sha256=
|
|
10
|
+
dao_treasury/constants.cp311-win_amd64.pyd,sha256=RX8GGxe1Map-PGMoq6JrL8AAV8KRnohxTY-bOX-Fkfk,10752
|
|
11
11
|
dao_treasury/constants.py,sha256=-T0oPw7lC5YeaiplHAtYL-2ss7knvKrJKQ1LCc8kX8g,1483
|
|
12
|
-
dao_treasury/db.py,sha256=
|
|
12
|
+
dao_treasury/db.py,sha256=Oqas3o8Fdy3_ktAzMaSMWH0WxfyJP7X0tJdBeh4n8yE,60436
|
|
13
13
|
dao_treasury/docker-compose.yaml,sha256=Javd6LIxF2nOpKWRsDYe-VVWBjMGprsXyUK4DGaLLO8,1670
|
|
14
14
|
dao_treasury/main.py,sha256=THzDHwJQPbLXUpHqbiCncQeqpvKQUz6ae63frX5LlzU,9733
|
|
15
15
|
dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
dao_treasury/treasury.py,sha256=K4XOg-5BHoP5HoRlHNu4afNpYs2-8sjCOOGwdt3M21w,7541
|
|
17
|
-
dao_treasury/types.cp311-win_amd64.pyd,sha256=
|
|
17
|
+
dao_treasury/types.cp311-win_amd64.pyd,sha256=PR8RtzCgiZuBrlxnZSIeGbpFMzlrRobVzCdid_FOeqc,10752
|
|
18
18
|
dao_treasury/types.py,sha256=KFz4WKPp4t_RBwIT6YGwOcgbzw8tdHIOcXTFsUA0pJA,3818
|
|
19
19
|
dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=to_cVfl8X6-5zVskkDxNtTE191TH52XO2peGfHPI5F0,201
|
|
20
20
|
dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json,sha256=aBwKDj5HBkSXlSt5L7Cg_Ce5yK0VaRKAWVe19j-HCgQ,17809
|
|
@@ -23,31 +23,31 @@ dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json,sha256=ukfBK
|
|
|
23
23
|
dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json,sha256=KMGAaagwRWBHw3IN4NljCUIIOwu-3Gp0VSnkMzDrcO4,12708
|
|
24
24
|
dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json,sha256=lRPynOn4Zy6WpZLz8-Px2kjflZLRcT8TA6VIz-_VGNM,13815
|
|
25
25
|
dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json,sha256=cBY3EqFpf9F7B8TaM9yESQatBpe4yFFmyLAiZEul_IE,19107
|
|
26
|
-
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json,sha256=
|
|
27
|
-
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json,sha256=
|
|
26
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json,sha256=mfKHcSzP2p1_34wOa5LNyv_j2M2hqOlYB4u5mlIpYfc,23886
|
|
27
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json,sha256=4DowQdq-4w8VZrdVXzyl56Ngd-EbvSxsRkXstIa0SAg,17383
|
|
28
28
|
dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json,sha256=4tsEWzkBM9eQVNnDECM9lGOO26mvcFJofltY-QDfU2M,25112
|
|
29
29
|
dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json,sha256=53fCotzJSElELRS1ABNkXX0_CG1_gBLHpjOthhYTDnw,136157
|
|
30
|
-
dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json,sha256=
|
|
30
|
+
dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json,sha256=16Ue5dPjrDWP--YWnPZlBUqeXoys510gqxM3ALE_R8k,13831
|
|
31
31
|
dao_treasury/.grafana/provisioning/datasources/datasources.yaml,sha256=TGuZ9h4aHsDkDW39aSjoy9HZYwvht7zX_0oosAGdE98,427
|
|
32
|
-
dao_treasury/sorting/__init__.cp311-win_amd64.pyd,sha256=
|
|
32
|
+
dao_treasury/sorting/__init__.cp311-win_amd64.pyd,sha256=4fis-uzZ4Xv3cd4cyFdPBdJ1OWj9TispPuzbihcF0EU,10752
|
|
33
33
|
dao_treasury/sorting/__init__.py,sha256=z3Bd2HUZjilZfV1cWSHUHagAPEPGyI0S8h6DtBf6w78,11448
|
|
34
|
-
dao_treasury/sorting/_matchers.cp311-win_amd64.pyd,sha256=
|
|
34
|
+
dao_treasury/sorting/_matchers.cp311-win_amd64.pyd,sha256=NA4Zmh-C1CkyOwUje95E-SFk1ZblBzoH1NhZKKP-Ks8,10752
|
|
35
35
|
dao_treasury/sorting/_matchers.py,sha256=ACi6aXZCKW5OTiztsID7CXCGJounj5c6ivhOCg2436M,14392
|
|
36
|
-
dao_treasury/sorting/_rules.cp311-win_amd64.pyd,sha256=
|
|
36
|
+
dao_treasury/sorting/_rules.cp311-win_amd64.pyd,sha256=UtSyoGdokLJK56PlSE8EGfrAhZx9sTNYSMdiYsIeLAs,10752
|
|
37
37
|
dao_treasury/sorting/_rules.py,sha256=DxhdUgpS0q0LWeLl9W1Bjn5LZz9z4OLA03vQllPMH9k,9229
|
|
38
|
-
dao_treasury/sorting/factory.cp311-win_amd64.pyd,sha256=
|
|
38
|
+
dao_treasury/sorting/factory.cp311-win_amd64.pyd,sha256=nC6ao5KtDtW5NdMvzPYglfG_WoKAq1X-tqt47to6ytw,10752
|
|
39
39
|
dao_treasury/sorting/factory.py,sha256=zlJ18xlMTxv8ACV6_MimCVIDsw3K5AZcyvKaNYY7R14,10484
|
|
40
|
-
dao_treasury/sorting/rule.cp311-win_amd64.pyd,sha256=
|
|
40
|
+
dao_treasury/sorting/rule.cp311-win_amd64.pyd,sha256=Ve8r-gvk652OO26esn28KyUv8J2b3pqEBCoDmf65s0Q,10752
|
|
41
41
|
dao_treasury/sorting/rule.py,sha256=wbL8s0-6dxcCKghUtEDSkLDBnyvggsJ3gt_RawQ6kB4,11972
|
|
42
|
-
dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd,sha256=
|
|
42
|
+
dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd,sha256=zIx_eLwBELQZORZ9AR8f8TlTWfH4gYJc9fkDr1nqN4U,10752
|
|
43
43
|
dao_treasury/sorting/rules/__init__.py,sha256=hcLfejOEwD8RaM2RE-38Ej6_WkvL9BVGvIIGY848E6E,49
|
|
44
|
-
dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd,sha256=
|
|
44
|
+
dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd,sha256=Bni0v74J7_akiyUB3MjrGJs3Atqa2t_nf42Pe8R2dRw,10752
|
|
45
45
|
dao_treasury/sorting/rules/ignore/__init__.py,sha256=16THKoGdj6qfkkytuCFVG_R1M6KSErMI4AVE1p0ukS4,58
|
|
46
|
-
dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd,sha256=
|
|
46
|
+
dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd,sha256=3_Kq_PiY4xR_pm8e_oYdz6r96r1YuCouoRbDzB0yQOQ,10752
|
|
47
47
|
dao_treasury/sorting/rules/ignore/llamapay.py,sha256=aYyAJRlmv419IeaqkcV5o3ffx0UVfteU0lTl80j0BGo,783
|
|
48
48
|
dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
49
|
dao_treasury/streams/llamapay.py,sha256=rO1Mh2ndTziR6pnRkKHnQ22a_Yx9PM_-BG7I4dspEZ8,13535
|
|
50
|
-
dao_treasury-0.1.
|
|
51
|
-
dao_treasury-0.1.
|
|
52
|
-
dao_treasury-0.1.
|
|
53
|
-
dao_treasury-0.1.
|
|
50
|
+
dao_treasury-0.1.2.dist-info/METADATA,sha256=dYiCD8dHyNXNyZU2kr-q-o-4Hcb432ORsKfwyB4dcTA,8306
|
|
51
|
+
dao_treasury-0.1.2.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
|
|
52
|
+
dao_treasury-0.1.2.dist-info/top_level.txt,sha256=CV8aYytuSYplDhLVY4n0GphckdysXCd1lHmbqfsPxNk,33
|
|
53
|
+
dao_treasury-0.1.2.dist-info/RECORD,,
|
|
Binary file
|
|
File without changes
|
|
File without changes
|