dao-treasury 0.0.58__cp311-cp311-win32.whl → 0.0.63__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.
- dao_treasury/_docker.cp311-win32.pyd +0 -0
- dao_treasury/_docker.py +23 -20
- dao_treasury/_nicknames.cp311-win32.pyd +0 -0
- dao_treasury/_wallet.cp311-win32.pyd +0 -0
- dao_treasury/constants.cp311-win32.pyd +0 -0
- dao_treasury/db.py +15 -3
- dao_treasury/docker-compose.yaml +1 -1
- dao_treasury/sorting/__init__.cp311-win32.pyd +0 -0
- dao_treasury/sorting/_matchers.cp311-win32.pyd +0 -0
- dao_treasury/sorting/_rules.cp311-win32.pyd +0 -0
- dao_treasury/sorting/factory.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rule.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rules/__init__.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.cp311-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp311-win32.pyd +0 -0
- dao_treasury/streams/__init__.cp311-win32.pyd +0 -0
- dao_treasury/streams/llamapay.cp311-win32.pyd +0 -0
- dao_treasury/types.cp311-win32.pyd +0 -0
- {dao_treasury-0.0.58.dist-info → dao_treasury-0.0.63.dist-info}/METADATA +3 -3
- {dao_treasury-0.0.58.dist-info → dao_treasury-0.0.63.dist-info}/RECORD +23 -23
- dao_treasury__mypyc.cp311-win32.pyd +0 -0
- {dao_treasury-0.0.58.dist-info → dao_treasury-0.0.63.dist-info}/WHEEL +0 -0
- {dao_treasury-0.0.58.dist-info → dao_treasury-0.0.63.dist-info}/top_level.txt +0 -0
|
Binary file
|
dao_treasury/_docker.py
CHANGED
|
@@ -14,17 +14,16 @@ This is the main entry for all Docker-based orchestration.
|
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
|
-
from importlib import resources
|
|
18
|
-
import subprocess
|
|
19
17
|
from functools import wraps
|
|
20
|
-
from
|
|
18
|
+
from importlib import resources
|
|
19
|
+
from typing import Any, Callable, Coroutine, Final, Literal, Tuple, TypeVar, List
|
|
21
20
|
|
|
22
21
|
import eth_portfolio_scripts.docker
|
|
23
22
|
from typing_extensions import ParamSpec
|
|
24
23
|
|
|
25
24
|
logger: Final = logging.getLogger(__name__)
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
COMPOSE_FILE: Final = str(
|
|
28
27
|
resources.files("dao_treasury").joinpath("docker-compose.yaml")
|
|
29
28
|
)
|
|
30
29
|
"""The path of dao-treasury's docker-compose.yaml file on your machine"""
|
|
@@ -55,7 +54,7 @@ def up(*services: str) -> None:
|
|
|
55
54
|
# eth-portfolio containers must be started first so dao-treasury can attach to the eth-portfolio docker network
|
|
56
55
|
eth_portfolio_scripts.docker.up("victoria-metrics")
|
|
57
56
|
build(*services)
|
|
58
|
-
|
|
57
|
+
_print_notice("starting", services)
|
|
59
58
|
_exec_command(["up", "-d", *services])
|
|
60
59
|
|
|
61
60
|
|
|
@@ -72,6 +71,7 @@ def down() -> None:
|
|
|
72
71
|
See Also:
|
|
73
72
|
:func:`up`
|
|
74
73
|
"""
|
|
74
|
+
print("stopping all dao-treasury containers")
|
|
75
75
|
_exec_command(["down"])
|
|
76
76
|
|
|
77
77
|
|
|
@@ -90,10 +90,24 @@ def build(*services: str) -> None:
|
|
|
90
90
|
:func:`up`
|
|
91
91
|
:func:`_exec_command`
|
|
92
92
|
"""
|
|
93
|
-
|
|
93
|
+
_print_notice("building", services)
|
|
94
94
|
_exec_command(["build", *services])
|
|
95
95
|
|
|
96
96
|
|
|
97
|
+
def _print_notice(
|
|
98
|
+
doing: Literal["building", "starting"], services: Tuple[str, ...]
|
|
99
|
+
) -> None:
|
|
100
|
+
if len(services) == 1:
|
|
101
|
+
container = services[0]
|
|
102
|
+
print(f"{doing} the {container} container")
|
|
103
|
+
elif len(services) == 2:
|
|
104
|
+
first, second = services
|
|
105
|
+
print(f"{doing} the {first} and {second} containers")
|
|
106
|
+
else:
|
|
107
|
+
*all_but_last, last = services
|
|
108
|
+
print(f"{doing} the {', '.join(all_but_last)}, and {last} containers")
|
|
109
|
+
|
|
110
|
+
|
|
97
111
|
_P = ParamSpec("_P")
|
|
98
112
|
_T = TypeVar("_T")
|
|
99
113
|
|
|
@@ -174,17 +188,6 @@ def _exec_command(command: List[str], *, compose_options: Tuple[str, ...] = ())
|
|
|
174
188
|
See Also:
|
|
175
189
|
:func:`check_system`
|
|
176
190
|
"""
|
|
177
|
-
eth_portfolio_scripts.docker.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
["docker", "compose", *compose_options, "-f", compose_file, *command]
|
|
181
|
-
)
|
|
182
|
-
except (subprocess.CalledProcessError, FileNotFoundError) as e:
|
|
183
|
-
try:
|
|
184
|
-
subprocess.check_output(
|
|
185
|
-
["docker-compose", *compose_options, "-f", compose_file, *command]
|
|
186
|
-
)
|
|
187
|
-
except (subprocess.CalledProcessError, FileNotFoundError) as _e:
|
|
188
|
-
raise RuntimeError(
|
|
189
|
-
f"Error occurred while running {' '.join(command)}: {_e}"
|
|
190
|
-
) from _e
|
|
191
|
+
eth_portfolio_scripts.docker._exec_command(
|
|
192
|
+
command, compose_file=COMPOSE_FILE, compose_options=compose_options
|
|
193
|
+
)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
dao_treasury/db.py
CHANGED
|
@@ -18,6 +18,7 @@ and creating SQL views for reporting.
|
|
|
18
18
|
|
|
19
19
|
import typing
|
|
20
20
|
from asyncio import Semaphore
|
|
21
|
+
from collections import OrderedDict
|
|
21
22
|
from decimal import Decimal, InvalidOperation
|
|
22
23
|
from functools import lru_cache
|
|
23
24
|
from logging import getLogger
|
|
@@ -75,6 +76,9 @@ from dao_treasury.constants import CHAINID
|
|
|
75
76
|
from dao_treasury.types import TxGroupDbid, TxGroupName
|
|
76
77
|
|
|
77
78
|
|
|
79
|
+
EventItem = _EventItem[_EventItem[OrderedDict[str, Any]]]
|
|
80
|
+
|
|
81
|
+
|
|
78
82
|
SQLITE_DIR = Path(path.expanduser("~")) / ".dao-treasury"
|
|
79
83
|
"""Path to the directory in the user's home where the DAO treasury SQLite database is stored."""
|
|
80
84
|
|
|
@@ -250,6 +254,10 @@ class Address(DbEntity):
|
|
|
250
254
|
def contract(self) -> Contract:
|
|
251
255
|
return Contract(self.address)
|
|
252
256
|
|
|
257
|
+
@property
|
|
258
|
+
def contract_coro(self) -> Coroutine[Any, Any, Contract]:
|
|
259
|
+
return Contract.coroutine(self.address)
|
|
260
|
+
|
|
253
261
|
@staticmethod
|
|
254
262
|
@lru_cache(maxsize=None)
|
|
255
263
|
def get_dbid(address: HexAddress) -> int:
|
|
@@ -420,6 +428,10 @@ class Token(DbEntity):
|
|
|
420
428
|
def contract(self) -> Contract:
|
|
421
429
|
return Contract(self.address.address)
|
|
422
430
|
|
|
431
|
+
@property
|
|
432
|
+
def contract_coro(self) -> Coroutine[Any, Any, Contract]:
|
|
433
|
+
return Contract.coroutine(self.address.address)
|
|
434
|
+
|
|
423
435
|
@property
|
|
424
436
|
def scale(self) -> int:
|
|
425
437
|
"""Base for division according to `decimals`, e.g., `10**decimals`.
|
|
@@ -755,10 +767,10 @@ class TreasuryTx(DbEntity):
|
|
|
755
767
|
@overload
|
|
756
768
|
def get_events(
|
|
757
769
|
self, event_name: str, sync: Literal[False]
|
|
758
|
-
) -> Coroutine[Any, Any,
|
|
770
|
+
) -> Coroutine[Any, Any, EventItem]: ...
|
|
759
771
|
@overload
|
|
760
|
-
def get_events(self, event_name: str, sync: bool = True) ->
|
|
761
|
-
def get_events(self, event_name: str, sync: bool = True) ->
|
|
772
|
+
def get_events(self, event_name: str, sync: bool = True) -> EventItem: ...
|
|
773
|
+
def get_events(self, event_name: str, sync: bool = True) -> EventItem:
|
|
762
774
|
if not sync:
|
|
763
775
|
return _EVENTS_THREADS.run(self.get_events, event_name)
|
|
764
776
|
try:
|
dao_treasury/docker-compose.yaml
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dao_treasury
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.63
|
|
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,7 @@ 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
|
|
17
|
+
Requires-Dist: eth-portfolio-temp==0.2.15
|
|
18
18
|
Dynamic: classifier
|
|
19
19
|
Dynamic: description
|
|
20
20
|
Dynamic: description-content-type
|
|
@@ -41,7 +41,7 @@ DAO Treasury is a comprehensive financial reporting and treasury management solu
|
|
|
41
41
|
- First, you will need to bring your own archive node. This can be one you run yourself, or one from one of the common providers (Tenderly, Alchemy, QuickNode, etc.). Your archive node must have tracing enabled (free-tier Alchemy nodes do not support this option).
|
|
42
42
|
- You must configure a [brownie network](https://eth-brownie.readthedocs.io/en/stable/network-management.html) to use your RPC.
|
|
43
43
|
- You will need an auth token for [Etherscan](https://etherscan.io/)'s API. Follow their [guide](https://docs.etherscan.io/etherscan-v2/getting-an-api-key) to get your key, and set env var `ETHERSCAN_TOKEN` with its value.
|
|
44
|
-
- You'll also need [Docker](https://www.docker.com/get-started/) installed on your system. If on MacOS, you will need to leave Docker Desktop open while
|
|
44
|
+
- You'll also need [Docker](https://www.docker.com/get-started/) installed on your system. If on MacOS, you will need to leave Docker Desktop open while DAO Treasury is running.
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
dao_treasury__mypyc.cp311-win32.pyd,sha256=
|
|
1
|
+
dao_treasury__mypyc.cp311-win32.pyd,sha256=jzBAOnQbmEPRrkfj_QwO_-xwxYOZnoXlEtgalzV8sn4,393728
|
|
2
2
|
dao_treasury/ENVIRONMENT_VARIABLES.py,sha256=LS_D4ALB3BO-vYKyh1tzRHi10QBE6f654Zy8pmJ_xPY,656
|
|
3
3
|
dao_treasury/__init__.py,sha256=ai8iALE_Zv43O9cH1jkNJ39bzhr60kBDX6L7C4Nj9FA,1539
|
|
4
|
-
dao_treasury/_docker.cp311-win32.pyd,sha256=
|
|
5
|
-
dao_treasury/_docker.py,sha256=
|
|
6
|
-
dao_treasury/_nicknames.cp311-win32.pyd,sha256=
|
|
4
|
+
dao_treasury/_docker.cp311-win32.pyd,sha256=7qGFFPgdx9HcZ6S7zcG03Aveqw9VOuXSMdWJpyFcqt4,9216
|
|
5
|
+
dao_treasury/_docker.py,sha256=_kYZn_cIdHbAbyHujUFBxZy_Eu_DwTtLCzQoYNyHQhk,6075
|
|
6
|
+
dao_treasury/_nicknames.cp311-win32.pyd,sha256=lXViqR4m-pBRoCDwWf0IW_XAL_WPge9yAKDJksrqmvE,9216
|
|
7
7
|
dao_treasury/_nicknames.py,sha256=n8c-JZhORYymCMv6jsC96IthAzAhpslyEn-KCk_YiSM,1049
|
|
8
|
-
dao_treasury/_wallet.cp311-win32.pyd,sha256=
|
|
8
|
+
dao_treasury/_wallet.cp311-win32.pyd,sha256=OqcjXFGCLOjBcK50IhUB02-jdicTU5i6Ge0AMYz2n_U,9216
|
|
9
9
|
dao_treasury/_wallet.py,sha256=nHBAKFJstdKuYbvpskGVx2KU80YrZHGHsEh5V3TwIHs,10712
|
|
10
|
-
dao_treasury/constants.cp311-win32.pyd,sha256=
|
|
10
|
+
dao_treasury/constants.cp311-win32.pyd,sha256=bYzWM7ZfHtP1NqfVfCpDVJWC5TrT3s1i_S6L1ouOQ9A,9216
|
|
11
11
|
dao_treasury/constants.py,sha256=-T0oPw7lC5YeaiplHAtYL-2ss7knvKrJKQ1LCc8kX8g,1483
|
|
12
|
-
dao_treasury/db.py,sha256=
|
|
13
|
-
dao_treasury/docker-compose.yaml,sha256=
|
|
12
|
+
dao_treasury/db.py,sha256=3_-nm8vD92ECaHxjMYf0eaXfsBRC2ojGcm-AFz2ZLAQ,50625
|
|
13
|
+
dao_treasury/docker-compose.yaml,sha256=wNNE9xmkchcV-nJxzrmUkbUA0CW1qgdGQKJ7uw2P8nU,1350
|
|
14
14
|
dao_treasury/main.py,sha256=w7VBmBwNBYjOkz2LpT4_9FZ1CI8AVcr4vyfr1wZVk5Q,8458
|
|
15
15
|
dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
dao_treasury/treasury.py,sha256=wh4wESLbYSHjcfpa-sW5TIqa5pSC9Y_7Id8tzLzJLaw,7414
|
|
17
|
-
dao_treasury/types.cp311-win32.pyd,sha256=
|
|
17
|
+
dao_treasury/types.cp311-win32.pyd,sha256=7oglWbBw5naRuL8gYsn4PkYgXkYvUfYd7Ks55oJVras,9216
|
|
18
18
|
dao_treasury/types.py,sha256=KFz4WKPp4t_RBwIT6YGwOcgbzw8tdHIOcXTFsUA0pJA,3818
|
|
19
19
|
dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=NfmmICGLVfIrI8ulzUTUYc7wFetk2v-x6eaoYHnCvQc,1914
|
|
20
20
|
dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json,sha256=gxfPI4eO3PDPe70Yx7_dN0Yx5isvgy-MKe-fizBClMw,16879
|
|
@@ -28,27 +28,27 @@ dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.j
|
|
|
28
28
|
dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json,sha256=7qVXn2PjeBIp2pFRbVfxA4PeWxhhVKQCr4qIPZoIj90,133963
|
|
29
29
|
dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json,sha256=fYkiZ37Eg2vu9dPJavCZXPPtX6-rTDbJwE_Ougpo2Mk,15828
|
|
30
30
|
dao_treasury/.grafana/provisioning/datasources/datasources.yaml,sha256=gLmJsOkEXNzWRDibShfHFySWeuExW-dSB_U0OSfH868,344
|
|
31
|
-
dao_treasury/sorting/__init__.cp311-win32.pyd,sha256=
|
|
31
|
+
dao_treasury/sorting/__init__.cp311-win32.pyd,sha256=6HmrOG7soaKwhfm_WuBMQe4cJHKWEx8Dvu5DZ9Q-DFM,9216
|
|
32
32
|
dao_treasury/sorting/__init__.py,sha256=_uxM_FE1paM8oDAhDdHSyhDwnrlxCYX_lGn2DOqCaHU,10666
|
|
33
|
-
dao_treasury/sorting/_matchers.cp311-win32.pyd,sha256=
|
|
33
|
+
dao_treasury/sorting/_matchers.cp311-win32.pyd,sha256=hS7ZNxAyKzr3r_a9NrJ7_O7vMZ6QnphQadS8Ph8_Bbo,9216
|
|
34
34
|
dao_treasury/sorting/_matchers.py,sha256=ACi6aXZCKW5OTiztsID7CXCGJounj5c6ivhOCg2436M,14392
|
|
35
|
-
dao_treasury/sorting/_rules.cp311-win32.pyd,sha256=
|
|
35
|
+
dao_treasury/sorting/_rules.cp311-win32.pyd,sha256=Rk1obO0pNWeax5vwGAzrvsh4bHd-DUAX4xMbZee7wo8,9216
|
|
36
36
|
dao_treasury/sorting/_rules.py,sha256=DxhdUgpS0q0LWeLl9W1Bjn5LZz9z4OLA03vQllPMH9k,9229
|
|
37
|
-
dao_treasury/sorting/factory.cp311-win32.pyd,sha256=
|
|
37
|
+
dao_treasury/sorting/factory.cp311-win32.pyd,sha256=1Lmg6aO0tF1RvQPAMMo8Uo71L8lb3Am-8GNIO_KycSY,9216
|
|
38
38
|
dao_treasury/sorting/factory.py,sha256=zlJ18xlMTxv8ACV6_MimCVIDsw3K5AZcyvKaNYY7R14,10484
|
|
39
|
-
dao_treasury/sorting/rule.cp311-win32.pyd,sha256=
|
|
39
|
+
dao_treasury/sorting/rule.cp311-win32.pyd,sha256=Zk9u8K-2q7Nza7Xm9Zu-_VLiBjzMmjBeig4G8aqmBlY,9216
|
|
40
40
|
dao_treasury/sorting/rule.py,sha256=wbL8s0-6dxcCKghUtEDSkLDBnyvggsJ3gt_RawQ6kB4,11972
|
|
41
|
-
dao_treasury/sorting/rules/__init__.cp311-win32.pyd,sha256=
|
|
41
|
+
dao_treasury/sorting/rules/__init__.cp311-win32.pyd,sha256=PxByqg4TgnCvdQ6LLX-GjsrVBe7tmC2kLlgArzUTBVc,9216
|
|
42
42
|
dao_treasury/sorting/rules/__init__.py,sha256=hcLfejOEwD8RaM2RE-38Ej6_WkvL9BVGvIIGY848E6E,49
|
|
43
|
-
dao_treasury/sorting/rules/ignore/__init__.cp311-win32.pyd,sha256=
|
|
43
|
+
dao_treasury/sorting/rules/ignore/__init__.cp311-win32.pyd,sha256=opzaEOaexBRGl54DfZUTCJ4o4fTaCYjDKcJrHRyBrzI,9216
|
|
44
44
|
dao_treasury/sorting/rules/ignore/__init__.py,sha256=16THKoGdj6qfkkytuCFVG_R1M6KSErMI4AVE1p0ukS4,58
|
|
45
|
-
dao_treasury/sorting/rules/ignore/llamapay.cp311-win32.pyd,sha256=
|
|
45
|
+
dao_treasury/sorting/rules/ignore/llamapay.cp311-win32.pyd,sha256=WhcwJ0uwV9pQuU1r0cF4ZF6WPGwHuNRn0VYn2GFJF5s,9216
|
|
46
46
|
dao_treasury/sorting/rules/ignore/llamapay.py,sha256=aYyAJRlmv419IeaqkcV5o3ffx0UVfteU0lTl80j0BGo,783
|
|
47
|
-
dao_treasury/streams/__init__.cp311-win32.pyd,sha256=
|
|
47
|
+
dao_treasury/streams/__init__.cp311-win32.pyd,sha256=Y9lCeIuidJQ2NEjMaKr89kwE8rD9WC264w1IGECI5ug,9216
|
|
48
48
|
dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
dao_treasury/streams/llamapay.cp311-win32.pyd,sha256=
|
|
49
|
+
dao_treasury/streams/llamapay.cp311-win32.pyd,sha256=CqCh5hyBig2jM9qwmGaW6aD8vOkFb2EPKwx3-g7ffds,9216
|
|
50
50
|
dao_treasury/streams/llamapay.py,sha256=rO1Mh2ndTziR6pnRkKHnQ22a_Yx9PM_-BG7I4dspEZ8,13535
|
|
51
|
-
dao_treasury-0.0.
|
|
52
|
-
dao_treasury-0.0.
|
|
53
|
-
dao_treasury-0.0.
|
|
54
|
-
dao_treasury-0.0.
|
|
51
|
+
dao_treasury-0.0.63.dist-info/METADATA,sha256=GhFbPwSJ9WZqXB_PhIGxv3MFPMtvWFSaMd-PX4xk6FI,7231
|
|
52
|
+
dao_treasury-0.0.63.dist-info/WHEEL,sha256=Ri8zddKrjGdgjlj1OpSsvpDnvHfnQhMQWi3E_v2pqng,97
|
|
53
|
+
dao_treasury-0.0.63.dist-info/top_level.txt,sha256=CV8aYytuSYplDhLVY4n0GphckdysXCd1lHmbqfsPxNk,33
|
|
54
|
+
dao_treasury-0.0.63.dist-info/RECORD,,
|
|
Binary file
|
|
File without changes
|
|
File without changes
|