dao-treasury 0.0.68__cp311-cp311-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dao-treasury might be problematic. Click here for more details.
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +452 -0
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +452 -0
- dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +84 -0
- dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +220 -0
- dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +106 -0
- dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +357 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +803 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +597 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +981 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2961 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +475 -0
- dao_treasury/.grafana/provisioning/datasources/datasources.yaml +17 -0
- dao_treasury/ENVIRONMENT_VARIABLES.py +20 -0
- dao_treasury/__init__.py +62 -0
- dao_treasury/_docker.cp311-win32.pyd +0 -0
- dao_treasury/_docker.py +194 -0
- dao_treasury/_nicknames.cp311-win32.pyd +0 -0
- dao_treasury/_nicknames.py +32 -0
- dao_treasury/_wallet.cp311-win32.pyd +0 -0
- dao_treasury/_wallet.py +250 -0
- dao_treasury/constants.cp311-win32.pyd +0 -0
- dao_treasury/constants.py +39 -0
- dao_treasury/db.py +1454 -0
- dao_treasury/docker-compose.yaml +41 -0
- dao_treasury/main.py +253 -0
- dao_treasury/py.typed +0 -0
- dao_treasury/sorting/__init__.cp311-win32.pyd +0 -0
- dao_treasury/sorting/__init__.py +295 -0
- dao_treasury/sorting/_matchers.cp311-win32.pyd +0 -0
- dao_treasury/sorting/_matchers.py +387 -0
- dao_treasury/sorting/_rules.cp311-win32.pyd +0 -0
- dao_treasury/sorting/_rules.py +235 -0
- dao_treasury/sorting/factory.cp311-win32.pyd +0 -0
- dao_treasury/sorting/factory.py +299 -0
- dao_treasury/sorting/rule.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rule.py +344 -0
- dao_treasury/sorting/rules/__init__.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rules/__init__.py +1 -0
- dao_treasury/sorting/rules/ignore/__init__.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.py +1 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.py +20 -0
- dao_treasury/streams/__init__.cp311-win32.pyd +0 -0
- dao_treasury/streams/__init__.py +0 -0
- dao_treasury/streams/llamapay.cp311-win32.pyd +0 -0
- dao_treasury/streams/llamapay.py +388 -0
- dao_treasury/treasury.py +191 -0
- dao_treasury/types.cp311-win32.pyd +0 -0
- dao_treasury/types.py +133 -0
- dao_treasury-0.0.68.dist-info/METADATA +120 -0
- dao_treasury-0.0.68.dist-info/RECORD +54 -0
- dao_treasury-0.0.68.dist-info/WHEEL +5 -0
- dao_treasury-0.0.68.dist-info/top_level.txt +2 -0
- dao_treasury__mypyc.cp311-win32.pyd +0 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
{
|
|
2
|
+
"annotations": {
|
|
3
|
+
"list": [
|
|
4
|
+
{
|
|
5
|
+
"builtIn": 1,
|
|
6
|
+
"datasource": "-- Grafana --",
|
|
7
|
+
"enable": true,
|
|
8
|
+
"hide": true,
|
|
9
|
+
"iconColor": "rgba(0, 211, 255, 1)",
|
|
10
|
+
"name": "Annotations & Alerts",
|
|
11
|
+
"type": "dashboard"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"editable": true,
|
|
16
|
+
"fiscalYearStartMonth": 0,
|
|
17
|
+
"graphTooltip": 0,
|
|
18
|
+
"id": 9,
|
|
19
|
+
"links": [],
|
|
20
|
+
"panels": [
|
|
21
|
+
{
|
|
22
|
+
"datasource": "SQLite",
|
|
23
|
+
"fieldConfig": {
|
|
24
|
+
"defaults": {
|
|
25
|
+
"custom": {
|
|
26
|
+
"align": "auto",
|
|
27
|
+
"cellOptions": {
|
|
28
|
+
"type": "auto"
|
|
29
|
+
},
|
|
30
|
+
"inspect": false
|
|
31
|
+
},
|
|
32
|
+
"decimals": 8,
|
|
33
|
+
"mappings": [],
|
|
34
|
+
"thresholds": {
|
|
35
|
+
"mode": "absolute",
|
|
36
|
+
"steps": [
|
|
37
|
+
{
|
|
38
|
+
"color": "green",
|
|
39
|
+
"value": 0
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"color": "red",
|
|
43
|
+
"value": 80
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"overrides": [
|
|
49
|
+
{
|
|
50
|
+
"matcher": {
|
|
51
|
+
"id": "byName",
|
|
52
|
+
"options": "Hash"
|
|
53
|
+
},
|
|
54
|
+
"properties": [
|
|
55
|
+
{
|
|
56
|
+
"id": "links",
|
|
57
|
+
"value": [
|
|
58
|
+
{
|
|
59
|
+
"targetBlank": true,
|
|
60
|
+
"title": "View on Etherscan",
|
|
61
|
+
"url": "https://etherscan.io/tx/${__value.raw}"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"matcher": {
|
|
69
|
+
"id": "byName",
|
|
70
|
+
"options": "Block"
|
|
71
|
+
},
|
|
72
|
+
"properties": [
|
|
73
|
+
{
|
|
74
|
+
"id": "links",
|
|
75
|
+
"value": [
|
|
76
|
+
{
|
|
77
|
+
"targetBlank": true,
|
|
78
|
+
"title": "View on Etherscan",
|
|
79
|
+
"url": "https://etherscan.io/block/${__value.raw}"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"matcher": {
|
|
87
|
+
"id": "byName",
|
|
88
|
+
"options": "To"
|
|
89
|
+
},
|
|
90
|
+
"properties": [
|
|
91
|
+
{
|
|
92
|
+
"id": "links",
|
|
93
|
+
"value": [
|
|
94
|
+
{
|
|
95
|
+
"targetBlank": true,
|
|
96
|
+
"title": "View on Etherscan",
|
|
97
|
+
"url": "https://etherscan.io/address/${__value.raw}"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"matcher": {
|
|
105
|
+
"id": "byName",
|
|
106
|
+
"options": "From"
|
|
107
|
+
},
|
|
108
|
+
"properties": [
|
|
109
|
+
{
|
|
110
|
+
"id": "links",
|
|
111
|
+
"value": [
|
|
112
|
+
{
|
|
113
|
+
"targetBlank": true,
|
|
114
|
+
"title": "View on Etherscan",
|
|
115
|
+
"url": "https://etherscan.io/address/${__value.raw}"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"matcher": {
|
|
123
|
+
"id": "byName",
|
|
124
|
+
"options": "From Nickname"
|
|
125
|
+
},
|
|
126
|
+
"properties": [
|
|
127
|
+
{
|
|
128
|
+
"id": "links",
|
|
129
|
+
"value": [
|
|
130
|
+
{
|
|
131
|
+
"targetBlank": true,
|
|
132
|
+
"title": "View on Etherscan",
|
|
133
|
+
"url": "https://etherscan.io/address/${__data.fields.From}"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"matcher": {
|
|
141
|
+
"id": "byName",
|
|
142
|
+
"options": "To Nickname"
|
|
143
|
+
},
|
|
144
|
+
"properties": [
|
|
145
|
+
{
|
|
146
|
+
"id": "links",
|
|
147
|
+
"value": [
|
|
148
|
+
{
|
|
149
|
+
"targetBlank": true,
|
|
150
|
+
"title": "View on Etherscan",
|
|
151
|
+
"url": "https://etherscan.io/address/${__data.fields.To}"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
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
|
+
]
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"gridPos": {
|
|
182
|
+
"h": 18,
|
|
183
|
+
"w": 24,
|
|
184
|
+
"x": 0,
|
|
185
|
+
"y": 0
|
|
186
|
+
},
|
|
187
|
+
"id": 1,
|
|
188
|
+
"options": {
|
|
189
|
+
"cellHeight": "sm",
|
|
190
|
+
"footer": {
|
|
191
|
+
"countRows": false,
|
|
192
|
+
"fields": "",
|
|
193
|
+
"reducer": ["sum"],
|
|
194
|
+
"show": false
|
|
195
|
+
},
|
|
196
|
+
"showHeader": true,
|
|
197
|
+
"sortBy": [
|
|
198
|
+
{
|
|
199
|
+
"desc": true,
|
|
200
|
+
"displayName": "Timestamp"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"pluginVersion": "12.1.1",
|
|
205
|
+
"targets": [
|
|
206
|
+
{
|
|
207
|
+
"datasource": "SQLite",
|
|
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",
|
|
209
|
+
"queryType": "table",
|
|
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",
|
|
211
|
+
"refId": "A",
|
|
212
|
+
"timeColumns": ["time", "ts"]
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"title": "Transactions",
|
|
216
|
+
"type": "table"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"preload": false,
|
|
220
|
+
"refresh": "",
|
|
221
|
+
"schemaVersion": 41,
|
|
222
|
+
"tags": [],
|
|
223
|
+
"templating": {
|
|
224
|
+
"list": [
|
|
225
|
+
{
|
|
226
|
+
"current": {
|
|
227
|
+
"text": "All",
|
|
228
|
+
"value": "$__all"
|
|
229
|
+
},
|
|
230
|
+
"datasource": "SQLite",
|
|
231
|
+
"definition": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000;",
|
|
232
|
+
"includeAll": true,
|
|
233
|
+
"label": "Top Level",
|
|
234
|
+
"name": "Top",
|
|
235
|
+
"options": [],
|
|
236
|
+
"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;",
|
|
237
|
+
"refresh": 2,
|
|
238
|
+
"regex": "",
|
|
239
|
+
"sort": 5,
|
|
240
|
+
"type": "query"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"current": {
|
|
244
|
+
"text": "All",
|
|
245
|
+
"value": "$__all"
|
|
246
|
+
},
|
|
247
|
+
"datasource": "SQLite",
|
|
248
|
+
"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",
|
|
249
|
+
"description": "",
|
|
250
|
+
"includeAll": true,
|
|
251
|
+
"label": "Chain",
|
|
252
|
+
"name": "Chain",
|
|
253
|
+
"options": [],
|
|
254
|
+
"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",
|
|
255
|
+
"refresh": 2,
|
|
256
|
+
"regex": "",
|
|
257
|
+
"sort": 5,
|
|
258
|
+
"type": "query"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"current": {
|
|
262
|
+
"text": "All",
|
|
263
|
+
"value": "$__all"
|
|
264
|
+
},
|
|
265
|
+
"datasource": "SQLite",
|
|
266
|
+
"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",
|
|
267
|
+
"includeAll": true,
|
|
268
|
+
"label": "Token",
|
|
269
|
+
"name": "Token",
|
|
270
|
+
"options": [],
|
|
271
|
+
"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",
|
|
272
|
+
"refresh": 2,
|
|
273
|
+
"regex": "",
|
|
274
|
+
"sort": 5,
|
|
275
|
+
"type": "query"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"current": {
|
|
279
|
+
"text": "All",
|
|
280
|
+
"value": "$__all"
|
|
281
|
+
},
|
|
282
|
+
"datasource": "SQLite",
|
|
283
|
+
"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",
|
|
284
|
+
"includeAll": true,
|
|
285
|
+
"label": "From Address",
|
|
286
|
+
"name": "From",
|
|
287
|
+
"options": [],
|
|
288
|
+
"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",
|
|
289
|
+
"refresh": 2,
|
|
290
|
+
"regex": "",
|
|
291
|
+
"sort": 5,
|
|
292
|
+
"type": "query"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"current": {
|
|
296
|
+
"text": "All",
|
|
297
|
+
"value": "$__all"
|
|
298
|
+
},
|
|
299
|
+
"datasource": "SQLite",
|
|
300
|
+
"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",
|
|
301
|
+
"includeAll": true,
|
|
302
|
+
"label": "From Nickname",
|
|
303
|
+
"name": "FromNickname",
|
|
304
|
+
"options": [],
|
|
305
|
+
"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",
|
|
306
|
+
"refresh": 2,
|
|
307
|
+
"regex": "",
|
|
308
|
+
"sort": 5,
|
|
309
|
+
"type": "query"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"current": {
|
|
313
|
+
"text": "All",
|
|
314
|
+
"value": "$__all"
|
|
315
|
+
},
|
|
316
|
+
"datasource": "SQLite",
|
|
317
|
+
"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",
|
|
318
|
+
"includeAll": true,
|
|
319
|
+
"label": "To Address",
|
|
320
|
+
"name": "To",
|
|
321
|
+
"options": [],
|
|
322
|
+
"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",
|
|
323
|
+
"refresh": 2,
|
|
324
|
+
"regex": "",
|
|
325
|
+
"sort": 5,
|
|
326
|
+
"type": "query"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"current": {
|
|
330
|
+
"text": "All",
|
|
331
|
+
"value": "$__all"
|
|
332
|
+
},
|
|
333
|
+
"datasource": "SQLite",
|
|
334
|
+
"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",
|
|
335
|
+
"includeAll": true,
|
|
336
|
+
"label": "To Nickname",
|
|
337
|
+
"name": "ToNickname",
|
|
338
|
+
"options": [],
|
|
339
|
+
"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",
|
|
340
|
+
"refresh": 2,
|
|
341
|
+
"regex": "",
|
|
342
|
+
"sort": 5,
|
|
343
|
+
"type": "query"
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"time": {
|
|
348
|
+
"from": "now-7d",
|
|
349
|
+
"to": "now"
|
|
350
|
+
},
|
|
351
|
+
"timepicker": {},
|
|
352
|
+
"timezone": "",
|
|
353
|
+
"title": "Treasury Transactions",
|
|
354
|
+
"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.",
|
|
355
|
+
"uid": "b21f1092-66a4-4fb0-90ef-ed77d2becaa4",
|
|
356
|
+
"version": 4
|
|
357
|
+
}
|