dao-treasury 0.0.43__cp312-cp312-musllinux_1_2_x86_64.whl → 0.0.45__cp312-cp312-musllinux_1_2_x86_64.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.
- bf2b4fe1f86ad2ea158b__mypyc.cpython-312-x86_64-linux-musl.so +0 -0
- dao_treasury/db.py +25 -3
- dao_treasury/docker-compose.yaml +1 -1
- {dao_treasury-0.0.43.dist-info → dao_treasury-0.0.45.dist-info}/METADATA +2 -2
- {dao_treasury-0.0.43.dist-info → dao_treasury-0.0.45.dist-info}/RECORD +7 -7
- {dao_treasury-0.0.43.dist-info → dao_treasury-0.0.45.dist-info}/WHEEL +0 -0
- {dao_treasury-0.0.43.dist-info → dao_treasury-0.0.45.dist-info}/top_level.txt +0 -0
Binary file
|
dao_treasury/db.py
CHANGED
@@ -23,7 +23,18 @@ from functools import lru_cache
|
|
23
23
|
from logging import getLogger
|
24
24
|
from os import path
|
25
25
|
from pathlib import Path
|
26
|
-
from typing import
|
26
|
+
from typing import (
|
27
|
+
TYPE_CHECKING,
|
28
|
+
Any,
|
29
|
+
Coroutine,
|
30
|
+
Dict,
|
31
|
+
Final,
|
32
|
+
Literal,
|
33
|
+
Tuple,
|
34
|
+
Union,
|
35
|
+
final,
|
36
|
+
overload,
|
37
|
+
)
|
27
38
|
from datetime import date, datetime, time, timezone
|
28
39
|
|
29
40
|
import eth_portfolio
|
@@ -33,13 +44,14 @@ from brownie.convert.datatypes import HexString
|
|
33
44
|
from brownie.exceptions import EventLookupError
|
34
45
|
from brownie.network.event import EventDict, _EventItem
|
35
46
|
from brownie.network.transaction import TransactionReceipt
|
36
|
-
from eth_typing import ChecksumAddress, HexAddress, HexStr
|
37
47
|
from eth_portfolio.structs import (
|
38
48
|
InternalTransfer,
|
39
49
|
LedgerEntry,
|
40
50
|
TokenTransfer,
|
41
51
|
Transaction,
|
42
52
|
)
|
53
|
+
from eth_retry import auto_retry
|
54
|
+
from eth_typing import ChecksumAddress, HexAddress, HexStr
|
43
55
|
from pony.orm import (
|
44
56
|
Database,
|
45
57
|
InterfaceError,
|
@@ -71,6 +83,7 @@ SQLITE_DIR.mkdir(parents=True, exist_ok=True)
|
|
71
83
|
|
72
84
|
_INSERT_THREAD = AsyncThreadPoolExecutor(1)
|
73
85
|
_SORT_THREAD = AsyncThreadPoolExecutor(1)
|
86
|
+
_EVENTS_THREADS = AsyncThreadPoolExecutor(16)
|
74
87
|
_SORT_SEMAPHORE = Semaphore(50)
|
75
88
|
|
76
89
|
_UTC = timezone.utc
|
@@ -731,7 +744,15 @@ class TreasuryTx(DbEntity):
|
|
731
744
|
"""Decoded event logs for this transaction."""
|
732
745
|
return self._transaction.events
|
733
746
|
|
734
|
-
|
747
|
+
@overload
|
748
|
+
def get_events(
|
749
|
+
self, event_name: str, sync: Literal[False]
|
750
|
+
) -> Coroutine[Any, Any, _EventItem]: ...
|
751
|
+
@overload
|
752
|
+
def get_events(self, event_name: str, sync: bool = True) -> _EventItem: ...
|
753
|
+
def get_events(self, event_name: str, sync: bool = True) -> _EventItem:
|
754
|
+
if not sync:
|
755
|
+
return _EVENTS_THREADS.run(self.get_events, event_name)
|
735
756
|
try:
|
736
757
|
return self.events[event_name]
|
737
758
|
except EventLookupError:
|
@@ -748,6 +769,7 @@ class TreasuryTx(DbEntity):
|
|
748
769
|
return get_transaction(self.hash)
|
749
770
|
|
750
771
|
@staticmethod
|
772
|
+
@auto_retry
|
751
773
|
async def insert(entry: LedgerEntry) -> None:
|
752
774
|
"""Asynchronously insert and sort a ledger entry.
|
753
775
|
|
dao_treasury/docker-compose.yaml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: dao_treasury
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.45
|
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<0.2,>=0.1.
|
17
|
+
Requires-Dist: eth-portfolio-temp<0.2,>=0.1.7.dev0
|
18
18
|
Dynamic: classifier
|
19
19
|
Dynamic: description
|
20
20
|
Dynamic: description-content-type
|
@@ -1,4 +1,4 @@
|
|
1
|
-
bf2b4fe1f86ad2ea158b__mypyc.cpython-312-x86_64-linux-musl.so,sha256=
|
1
|
+
bf2b4fe1f86ad2ea158b__mypyc.cpython-312-x86_64-linux-musl.so,sha256=t7edVM44J31vjEaQbbFLjVuGqsosBPzHmHuevPo7epQ,1449824
|
2
2
|
dao_treasury/ENVIRONMENT_VARIABLES.py,sha256=LEczR1MSWTY00sLHnFs3j_Jm8WZNJCxjwEzrvjbwl2E,636
|
3
3
|
dao_treasury/__init__.py,sha256=W4syl9-cNhHOdD25ye9U7aBJTLE_R-uP49FXC_6CUOE,1477
|
4
4
|
dao_treasury/_docker.cpython-312-x86_64-linux-musl.so,sha256=mYyhF79--IqY25gNVcsnlj29fVHOByCKwTSLPuAm7m8,17752
|
@@ -9,8 +9,8 @@ dao_treasury/_wallet.cpython-312-x86_64-linux-musl.so,sha256=kqwRvoaGPO3HNbAzOeU
|
|
9
9
|
dao_treasury/_wallet.py,sha256=epV8LVuwHlOzc9UkA66js7HfEiZBOSAGJMtWbDTzmjU,10462
|
10
10
|
dao_treasury/constants.cpython-312-x86_64-linux-musl.so,sha256=wsN5MKS92Pe3Zo909vGHKs3DcdR1gPDRoUYkUqF57rM,17760
|
11
11
|
dao_treasury/constants.py,sha256=MM4X4TK2RD1JaTNMg7zdo6QjKZTTvep6g7TgckE7M-8,1220
|
12
|
-
dao_treasury/db.py,sha256=
|
13
|
-
dao_treasury/docker-compose.yaml,sha256=
|
12
|
+
dao_treasury/db.py,sha256=2P_Nz5uyQxlZu7q0Getuhw1ovXWNe2_vAArbqYDK3Eo,48522
|
13
|
+
dao_treasury/docker-compose.yaml,sha256=cAZ98xpMI46dJMaZQ0XjO5oj8Qb7t6l2MrHyn0g-BKg,1309
|
14
14
|
dao_treasury/main.py,sha256=31EA10Fpaj9y-cRJPnNnvCBI38UM0848xlzn7A0BzC4,8047
|
15
15
|
dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
dao_treasury/treasury.py,sha256=taTvwTH_Zdu2M61TrUCENcIUjxdQO3vryrZ2iVb6suM,7223
|
@@ -45,7 +45,7 @@ dao_treasury/streams/__init__.cpython-312-x86_64-linux-musl.so,sha256=hdcFojfA4M
|
|
45
45
|
dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
46
|
dao_treasury/streams/llamapay.cpython-312-x86_64-linux-musl.so,sha256=vfWsqB5_KbA4AsgEkSW55gvKqXZaXIkaGDwhf_6CblQ,17776
|
47
47
|
dao_treasury/streams/llamapay.py,sha256=yn37gwVfqGFF9fOhHuj9_t7KlHGyrdekF2TUmVDyg64,13147
|
48
|
-
dao_treasury-0.0.
|
49
|
-
dao_treasury-0.0.
|
50
|
-
dao_treasury-0.0.
|
51
|
-
dao_treasury-0.0.
|
48
|
+
dao_treasury-0.0.45.dist-info/METADATA,sha256=4lr30fLdmcQGH-MC0pQNxQxdyHbaQG-ASxwRvwlQBig,7029
|
49
|
+
dao_treasury-0.0.45.dist-info/WHEEL,sha256=AwHYJA1Do1jwgPIoLQR4DiHSeYY_vU6Ht9Vljq5Yt_M,112
|
50
|
+
dao_treasury-0.0.45.dist-info/top_level.txt,sha256=Gw-ri_26lZA_3hwhnOX48mffUbmBGr8NhtoQ0XoMeF8,41
|
51
|
+
dao_treasury-0.0.45.dist-info/RECORD,,
|
File without changes
|
File without changes
|