dao-treasury 0.0.10__cp310-cp310-win32.whl → 0.0.70__cp310-cp310-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.
Files changed (58) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +551 -0
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +551 -0
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -7
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +220 -0
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +153 -29
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +181 -29
  7. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +808 -0
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +602 -0
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +981 -0
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2989 -0
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +478 -0
  12. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +17 -0
  13. dao_treasury/ENVIRONMENT_VARIABLES.py +20 -0
  14. dao_treasury/__init__.py +36 -10
  15. dao_treasury/_docker.cp310-win32.pyd +0 -0
  16. dao_treasury/_docker.py +169 -37
  17. dao_treasury/_nicknames.cp310-win32.pyd +0 -0
  18. dao_treasury/_nicknames.py +32 -0
  19. dao_treasury/_wallet.cp310-win32.pyd +0 -0
  20. dao_treasury/_wallet.py +164 -12
  21. dao_treasury/constants.cp310-win32.pyd +0 -0
  22. dao_treasury/constants.py +39 -0
  23. dao_treasury/db.py +925 -150
  24. dao_treasury/docker-compose.yaml +6 -5
  25. dao_treasury/main.py +238 -28
  26. dao_treasury/sorting/__init__.cp310-win32.pyd +0 -0
  27. dao_treasury/sorting/__init__.py +219 -115
  28. dao_treasury/sorting/_matchers.cp310-win32.pyd +0 -0
  29. dao_treasury/sorting/_matchers.py +261 -17
  30. dao_treasury/sorting/_rules.cp310-win32.pyd +0 -0
  31. dao_treasury/sorting/_rules.py +166 -21
  32. dao_treasury/sorting/factory.cp310-win32.pyd +0 -0
  33. dao_treasury/sorting/factory.py +245 -37
  34. dao_treasury/sorting/rule.cp310-win32.pyd +0 -0
  35. dao_treasury/sorting/rule.py +228 -46
  36. dao_treasury/sorting/rules/__init__.cp310-win32.pyd +0 -0
  37. dao_treasury/sorting/rules/__init__.py +1 -0
  38. dao_treasury/sorting/rules/ignore/__init__.cp310-win32.pyd +0 -0
  39. dao_treasury/sorting/rules/ignore/__init__.py +1 -0
  40. dao_treasury/sorting/rules/ignore/llamapay.cp310-win32.pyd +0 -0
  41. dao_treasury/sorting/rules/ignore/llamapay.py +20 -0
  42. dao_treasury/streams/__init__.cp310-win32.pyd +0 -0
  43. dao_treasury/streams/__init__.py +0 -0
  44. dao_treasury/streams/llamapay.cp310-win32.pyd +0 -0
  45. dao_treasury/streams/llamapay.py +388 -0
  46. dao_treasury/treasury.py +118 -25
  47. dao_treasury/types.cp310-win32.pyd +0 -0
  48. dao_treasury/types.py +104 -7
  49. dao_treasury-0.0.70.dist-info/METADATA +134 -0
  50. dao_treasury-0.0.70.dist-info/RECORD +54 -0
  51. dao_treasury-0.0.70.dist-info/top_level.txt +2 -0
  52. dao_treasury__mypyc.cp310-win32.pyd +0 -0
  53. a743a720bbc4482d330e__mypyc.cp310-win32.pyd +0 -0
  54. dao_treasury/.grafana/provisioning/datasources/sqlite.yaml +0 -10
  55. dao_treasury-0.0.10.dist-info/METADATA +0 -36
  56. dao_treasury-0.0.10.dist-info/RECORD +0 -28
  57. dao_treasury-0.0.10.dist-info/top_level.txt +0 -2
  58. {dao_treasury-0.0.10.dist-info → dao_treasury-0.0.70.dist-info}/WHEEL +0 -0
@@ -15,9 +15,8 @@
15
15
  "editable": true,
16
16
  "fiscalYearStartMonth": 0,
17
17
  "graphTooltip": 0,
18
- "id": 1,
18
+ "id": 9,
19
19
  "links": [],
20
- "liveNow": false,
21
20
  "panels": [
22
21
  {
23
22
  "datasource": "SQLite",
@@ -30,13 +29,14 @@
30
29
  },
31
30
  "inspect": false
32
31
  },
32
+ "decimals": 8,
33
33
  "mappings": [],
34
34
  "thresholds": {
35
35
  "mode": "absolute",
36
36
  "steps": [
37
37
  {
38
38
  "color": "green",
39
- "value": null
39
+ "value": 0
40
40
  },
41
41
  {
42
42
  "color": "red",
@@ -49,7 +49,7 @@
49
49
  {
50
50
  "matcher": {
51
51
  "id": "byName",
52
- "options": "hash"
52
+ "options": "Hash"
53
53
  },
54
54
  "properties": [
55
55
  {
@@ -67,7 +67,7 @@
67
67
  {
68
68
  "matcher": {
69
69
  "id": "byName",
70
- "options": "block"
70
+ "options": "Block"
71
71
  },
72
72
  "properties": [
73
73
  {
@@ -85,7 +85,7 @@
85
85
  {
86
86
  "matcher": {
87
87
  "id": "byName",
88
- "options": "to"
88
+ "options": "To"
89
89
  },
90
90
  "properties": [
91
91
  {
@@ -103,7 +103,7 @@
103
103
  {
104
104
  "matcher": {
105
105
  "id": "byName",
106
- "options": "from"
106
+ "options": "From"
107
107
  },
108
108
  "properties": [
109
109
  {
@@ -121,7 +121,7 @@
121
121
  {
122
122
  "matcher": {
123
123
  "id": "byName",
124
- "options": "from nickname"
124
+ "options": "From Nickname"
125
125
  },
126
126
  "properties": [
127
127
  {
@@ -130,7 +130,7 @@
130
130
  {
131
131
  "targetBlank": true,
132
132
  "title": "View on Etherscan",
133
- "url": "https://etherscan.io/address/${__data.fields.from}"
133
+ "url": "https://etherscan.io/address/${__data.fields.From}"
134
134
  }
135
135
  ]
136
136
  }
@@ -139,7 +139,7 @@
139
139
  {
140
140
  "matcher": {
141
141
  "id": "byName",
142
- "options": "to nickname"
142
+ "options": "To Nickname"
143
143
  },
144
144
  "properties": [
145
145
  {
@@ -148,11 +148,33 @@
148
148
  {
149
149
  "targetBlank": true,
150
150
  "title": "View on Etherscan",
151
- "url": "https://etherscan.io/address/${__data.fields.to}"
151
+ "url": "https://etherscan.io/address/${__data.fields.To}"
152
152
  }
153
153
  ]
154
154
  }
155
155
  ]
156
+ },
157
+ {
158
+ "matcher": {
159
+ "id": "byName",
160
+ "options": "Block"
161
+ },
162
+ "properties": [
163
+ {
164
+ "id": "decimals"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "matcher": {
170
+ "id": "byName",
171
+ "options": "Log Index"
172
+ },
173
+ "properties": [
174
+ {
175
+ "id": "decimals"
176
+ }
177
+ ]
156
178
  }
157
179
  ]
158
180
  },
@@ -168,36 +190,166 @@
168
190
  "footer": {
169
191
  "countRows": false,
170
192
  "fields": "",
171
- "reducer": [
172
- "sum"
173
- ],
193
+ "reducer": ["sum"],
174
194
  "show": false
175
195
  },
176
- "showHeader": true
196
+ "showHeader": true,
197
+ "sortBy": [
198
+ {
199
+ "desc": true,
200
+ "displayName": "Timestamp"
201
+ }
202
+ ]
177
203
  },
178
- "pluginVersion": "10.2.0",
204
+ "pluginVersion": "12.1.1",
179
205
  "targets": [
180
206
  {
181
207
  "datasource": "SQLite",
182
- "queryText": "select chain_name as chain, timestamp, block, hash, token, \"from\", from_nickname as \"from nickname\", \"to\", to_nickname as \"to nickname\", amount, price, value_usd as \"value usd\", txgroup, parent_txgroup\nfrom (\n SELECT treasury_tx_id, b.chain_name, datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, a.log_index, 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\n FROM treasury_txs a\n LEFT JOIN chains b ON a.chain = b.chain_dbid\n LEFT JOIN tokens c ON a.token_id = c.token_id\n LEFT JOIN addresses d ON a.\"from\" = d.address_id\n LEFT JOIN addresses e ON a.\"to\" = e.address_id\n LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id\n LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id\n WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000\n --UNION\n --SELECT -1, chain_name, TIMESTAMP, cast(block AS integer) block, hash, CAST(log_index AS integer) as log_index, token, \"from\", from_nickname, \"to\", to_nickname, amount, price, value_usd, txgroup, parent_txgroup, txgroup_id\n --FROM stream_ledger\n --UNION\n --SELECT -1, *\n --FROM vesting_ledger \n) a\nORDER BY timestamp",
208
+ "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 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",
183
209
  "queryType": "table",
184
- "rawQueryText": "select chain_name as chain, timestamp, block, hash, token, \"from\", from_nickname as \"from nickname\", \"to\", to_nickname as \"to nickname\", amount, price, value_usd as \"value usd\", txgroup, parent_txgroup\nfrom (\n SELECT treasury_tx_id, b.chain_name, datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, a.log_index, 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\n FROM treasury_txs a\n LEFT JOIN chains b ON a.chain = b.chain_dbid\n LEFT JOIN tokens c ON a.token_id = c.token_id\n LEFT JOIN addresses d ON a.\"from\" = d.address_id\n LEFT JOIN addresses e ON a.\"to\" = e.address_id\n LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id\n LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id\n WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000\n --UNION\n --SELECT -1, chain_name, TIMESTAMP, cast(block AS integer) block, hash, CAST(log_index AS integer) as log_index, token, \"from\", from_nickname, \"to\", to_nickname, amount, price, value_usd, txgroup, parent_txgroup, txgroup_id\n --FROM stream_ledger\n --UNION\n --SELECT -1, *\n --FROM vesting_ledger \n) a\nORDER BY timestamp",
210
+ "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 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",
185
211
  "refId": "A",
186
- "timeColumns": [
187
- "time",
188
- "ts"
189
- ]
212
+ "timeColumns": ["time", "ts"]
190
213
  }
191
214
  ],
192
215
  "title": "Transactions",
193
- "type": "table"
216
+ "type": "table",
217
+ "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."
194
218
  }
195
219
  ],
220
+ "preload": false,
196
221
  "refresh": "",
197
- "schemaVersion": 38,
198
- "tags": [],
222
+ "schemaVersion": 41,
223
+ "tags": ["transactions", "detailed"],
199
224
  "templating": {
200
- "list": []
225
+ "list": [
226
+ {
227
+ "current": {
228
+ "text": "All",
229
+ "value": "$__all"
230
+ },
231
+ "datasource": "SQLite",
232
+ "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;",
233
+ "includeAll": true,
234
+ "label": "Top Level",
235
+ "name": "Top",
236
+ "options": [],
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;",
238
+ "refresh": 2,
239
+ "regex": "",
240
+ "sort": 5,
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."
243
+ },
244
+ {
245
+ "current": {
246
+ "text": "All",
247
+ "value": "$__all"
248
+ },
249
+ "datasource": "SQLite",
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.",
252
+ "includeAll": true,
253
+ "label": "Chain",
254
+ "name": "Chain",
255
+ "options": [],
256
+ "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",
257
+ "refresh": 2,
258
+ "regex": "",
259
+ "sort": 5,
260
+ "type": "query"
261
+ },
262
+ {
263
+ "current": {
264
+ "text": "All",
265
+ "value": "$__all"
266
+ },
267
+ "datasource": "SQLite",
268
+ "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",
269
+ "description": "Filter transactions by token symbol.\n\nSelecting 'All' includes all tokens.",
270
+ "includeAll": true,
271
+ "label": "Token",
272
+ "name": "Token",
273
+ "options": [],
274
+ "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
+ "refresh": 2,
276
+ "regex": "",
277
+ "sort": 5,
278
+ "type": "query"
279
+ },
280
+ {
281
+ "current": {
282
+ "text": "All",
283
+ "value": "$__all"
284
+ },
285
+ "datasource": "SQLite",
286
+ "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",
287
+ "description": "Filter transactions by sender address.\n\nSelecting 'All' includes all sender addresses.",
288
+ "includeAll": true,
289
+ "label": "From Address",
290
+ "name": "From",
291
+ "options": [],
292
+ "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",
293
+ "refresh": 2,
294
+ "regex": "",
295
+ "sort": 5,
296
+ "type": "query"
297
+ },
298
+ {
299
+ "current": {
300
+ "text": "All",
301
+ "value": "$__all"
302
+ },
303
+ "datasource": "SQLite",
304
+ "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",
305
+ "description": "Filter transactions by sender nickname.\n\nSelecting 'All' includes all senders.",
306
+ "includeAll": true,
307
+ "label": "From Nickname",
308
+ "name": "FromNickname",
309
+ "options": [],
310
+ "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",
311
+ "refresh": 2,
312
+ "regex": "",
313
+ "sort": 5,
314
+ "type": "query"
315
+ },
316
+ {
317
+ "current": {
318
+ "text": "All",
319
+ "value": "$__all"
320
+ },
321
+ "datasource": "SQLite",
322
+ "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",
323
+ "description": "Filter transactions by recipient address.\n\nSelecting 'All' includes all recipient addresses.",
324
+ "includeAll": true,
325
+ "label": "To Address",
326
+ "name": "To",
327
+ "options": [],
328
+ "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",
329
+ "refresh": 2,
330
+ "regex": "",
331
+ "sort": 5,
332
+ "type": "query"
333
+ },
334
+ {
335
+ "current": {
336
+ "text": "All",
337
+ "value": "$__all"
338
+ },
339
+ "datasource": "SQLite",
340
+ "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",
341
+ "description": "Filter transactions by recipient nickname.\n\nSelecting 'All' includes all recipients.",
342
+ "includeAll": true,
343
+ "label": "To Nickname",
344
+ "name": "ToNickname",
345
+ "options": [],
346
+ "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",
347
+ "refresh": 2,
348
+ "regex": "",
349
+ "sort": 5,
350
+ "type": "query"
351
+ }
352
+ ]
201
353
  },
202
354
  "time": {
203
355
  "from": "now-7d",
@@ -206,7 +358,7 @@
206
358
  "timepicker": {},
207
359
  "timezone": "",
208
360
  "title": "Treasury Transactions",
361
+ "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.",
209
362
  "uid": "b21f1092-66a4-4fb0-90ef-ed77d2becaa4",
210
- "version": 5,
211
- "weekStart": ""
212
- }
363
+ "version": 6
364
+ }