dao-treasury 0.0.37__cp310-cp310-win32.whl → 0.0.39__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.
- 8a0ad9a1a4146730a0f6__mypyc.cp310-win32.pyd +0 -0
- dao_treasury/_docker.cp310-win32.pyd +0 -0
- dao_treasury/_nicknames.cp310-win32.pyd +0 -0
- dao_treasury/_wallet.cp310-win32.pyd +0 -0
- dao_treasury/constants.cp310-win32.pyd +0 -0
- dao_treasury/db.py +2 -1
- dao_treasury/sorting/__init__.cp310-win32.pyd +0 -0
- dao_treasury/sorting/_matchers.cp310-win32.pyd +0 -0
- dao_treasury/sorting/_rules.cp310-win32.pyd +0 -0
- dao_treasury/sorting/factory.cp310-win32.pyd +0 -0
- dao_treasury/sorting/rule.cp310-win32.pyd +0 -0
- dao_treasury/sorting/rules/__init__.cp310-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.cp310-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.py +1 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp310-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/shitcoins.cp310-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/shitcoins.py +24 -0
- dao_treasury/streams/__init__.cp310-win32.pyd +0 -0
- dao_treasury/streams/llamapay.cp310-win32.pyd +0 -0
- dao_treasury/streams/llamapay.py +14 -2
- dao_treasury/types.cp310-win32.pyd +0 -0
- {dao_treasury-0.0.37.dist-info → dao_treasury-0.0.39.dist-info}/METADATA +1 -1
- {dao_treasury-0.0.37.dist-info → dao_treasury-0.0.39.dist-info}/RECORD +25 -23
- dao_treasury-0.0.39.dist-info/top_level.txt +2 -0
- bf2b4fe1f86ad2ea158b__mypyc.cp310-win32.pyd +0 -0
- dao_treasury-0.0.37.dist-info/top_level.txt +0 -2
- {dao_treasury-0.0.37.dist-info → dao_treasury-0.0.39.dist-info}/WHEEL +0 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
dao_treasury/db.py
CHANGED
@@ -53,6 +53,7 @@ from pony.orm import (
|
|
53
53
|
select,
|
54
54
|
)
|
55
55
|
from y import EEE_ADDRESS, Contract, Network, convert, get_block_timestamp_async
|
56
|
+
from y._db.decorators import retry_locked
|
56
57
|
from y.contracts import _get_code
|
57
58
|
from y.exceptions import ContractNotVerified
|
58
59
|
|
@@ -294,7 +295,6 @@ class Address(DbEntity):
|
|
294
295
|
)
|
295
296
|
|
296
297
|
commit()
|
297
|
-
|
298
298
|
return entity # type: ignore [no-any-return]
|
299
299
|
|
300
300
|
@staticmethod
|
@@ -923,6 +923,7 @@ class TreasuryTx(DbEntity):
|
|
923
923
|
return dbid # type: ignore [no-any-return]
|
924
924
|
|
925
925
|
@staticmethod
|
926
|
+
@retry_locked
|
926
927
|
def __set_txgroup(treasury_tx_dbid: int, txgroup_dbid: TxGroupDbid) -> None:
|
927
928
|
with db_session:
|
928
929
|
TreasuryTx[treasury_tx_dbid].txgroup = txgroup_dbid
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"""This module is used to ignore any transactions that involve shitcoins in the :obj:`~eth_portfolio.SHITCOINS` mapping."""
|
2
|
+
|
3
|
+
from typing import Final
|
4
|
+
|
5
|
+
import eth_portfolio
|
6
|
+
|
7
|
+
from dao_treasury import TreasuryTx
|
8
|
+
from dao_treasury.constants import CHAINID
|
9
|
+
from dao_treasury.sorting.factory import ignore
|
10
|
+
|
11
|
+
|
12
|
+
SHITCOINS: Final = eth_portfolio.SHITCOINS[CHAINID]
|
13
|
+
|
14
|
+
|
15
|
+
@ignore("Shitcoin")
|
16
|
+
def is_shitcoin(tx: TreasuryTx) -> bool:
|
17
|
+
"""
|
18
|
+
This category is for any token transfers involving any shitcoin which was added
|
19
|
+
to your database before the shitcoin was added to :obj:`eth_portfolio.SHITCOINS`.
|
20
|
+
|
21
|
+
Since the tx would now be excluded from the db entirely if you did a clean pull,
|
22
|
+
we can safely ignore it.
|
23
|
+
"""
|
24
|
+
return tx.token.address.address in SHITCOINS
|
Binary file
|
Binary file
|
dao_treasury/streams/llamapay.py
CHANGED
@@ -22,7 +22,7 @@ from eth_typing import BlockNumber, ChecksumAddress, HexAddress, HexStr
|
|
22
22
|
from tqdm.asyncio import tqdm_asyncio
|
23
23
|
|
24
24
|
import y
|
25
|
-
from y.time import UnixTimestamp
|
25
|
+
from y.time import NoBlockFound, UnixTimestamp
|
26
26
|
from y.utils.events import decode_logs, get_logs_asap
|
27
27
|
|
28
28
|
from dao_treasury import constants
|
@@ -338,7 +338,19 @@ class LlamaPayProcessor:
|
|
338
338
|
check_at = date_obj + timedelta(days=1) - timedelta(seconds=1)
|
339
339
|
if check_at > now(tz=_UTC):
|
340
340
|
await sleep((check_at - now(tz=_UTC)).total_seconds())
|
341
|
-
|
341
|
+
|
342
|
+
while True:
|
343
|
+
try:
|
344
|
+
block = await get_block_at_timestamp(check_at, sync=False)
|
345
|
+
except NoBlockFound:
|
346
|
+
sleep_time = (check_at - now(tz=_UTC)).total_seconds()
|
347
|
+
logger.debug(
|
348
|
+
"no block found for %s, sleeping %ss", check_at, sleep_time
|
349
|
+
)
|
350
|
+
await sleep(sleep_time)
|
351
|
+
else:
|
352
|
+
break
|
353
|
+
|
342
354
|
price_fut = create_task(get_price(stream_token, block, sync=False))
|
343
355
|
start_timestamp = await _get_start_timestamp(stream_id, block)
|
344
356
|
if start_timestamp == 0:
|
Binary file
|
@@ -1,20 +1,20 @@
|
|
1
|
-
|
1
|
+
8a0ad9a1a4146730a0f6__mypyc.cp310-win32.pyd,sha256=8IPlmGgqjJ-DWYoqcIGIC8dRdJxe1U10hjlu_NCte_w,414720
|
2
2
|
dao_treasury/ENVIRONMENT_VARIABLES.py,sha256=ci7djcsXc9uRi6_vBQv-avGQrrIacyftXmcwKuitWWU,203
|
3
3
|
dao_treasury/__init__.py,sha256=U8BsakN_w15wVE_7MjVbHD9LBal48LfJ6a1Icf5oHdY,1052
|
4
|
-
dao_treasury/_docker.cp310-win32.pyd,sha256=
|
4
|
+
dao_treasury/_docker.cp310-win32.pyd,sha256=Po0_sKJqqpB_Bn75WrzGD3-HRLYkTaZRhorQAPa00Ek,9216
|
5
5
|
dao_treasury/_docker.py,sha256=wY26wCrQ8p-L0KfMJftyzI_YAszHjnBWLw94eh0LxxY,5607
|
6
|
-
dao_treasury/_nicknames.cp310-win32.pyd,sha256=
|
6
|
+
dao_treasury/_nicknames.cp310-win32.pyd,sha256=vINkv2UFNvdpl63BF58Kr-6CeOb66MLuOlYPNclcwfE,9216
|
7
7
|
dao_treasury/_nicknames.py,sha256=NpbQ4NtmZF_A_vqTGSal2KzKzkH5t7_wbI8EtMBqEr4,497
|
8
|
-
dao_treasury/_wallet.cp310-win32.pyd,sha256=
|
8
|
+
dao_treasury/_wallet.cp310-win32.pyd,sha256=feYt4hkgjBz7IwyLG4npYWmRysa2qEdrN1rTpGzjwVc,9216
|
9
9
|
dao_treasury/_wallet.py,sha256=nHBAKFJstdKuYbvpskGVx2KU80YrZHGHsEh5V3TwIHs,10712
|
10
|
-
dao_treasury/constants.cp310-win32.pyd,sha256=
|
10
|
+
dao_treasury/constants.cp310-win32.pyd,sha256=Hnouaw6DGICrdazcHbQgBK9rOs-fk8FrtoPwIYtn9Is,9216
|
11
11
|
dao_treasury/constants.py,sha256=VNzlrwC8HB8LdKNmoIfncUACKHfXZxp2GtBBrH_lZKE,522
|
12
|
-
dao_treasury/db.py,sha256=
|
12
|
+
dao_treasury/db.py,sha256=aZhY33XFHv5vwTQecolpaYXB_0SBPWvYGvZWlme_yH4,48703
|
13
13
|
dao_treasury/docker-compose.yaml,sha256=s0Nq-u--kIyknC-rlmJW2ycdKPjwJ_HetG7jBBJD95A,1350
|
14
14
|
dao_treasury/main.py,sha256=yVQGwDgO4XKcxV6tQQPxEcLcZPSEEK1yJS8Djfq3Esc,8294
|
15
15
|
dao_treasury/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
dao_treasury/treasury.py,sha256=64_z0lsjOngGFASCVQNUM-QfbC5YqhKMgOdtLh758co,6678
|
17
|
-
dao_treasury/types.cp310-win32.pyd,sha256=
|
17
|
+
dao_treasury/types.cp310-win32.pyd,sha256=rtTf_GVzYPBD_KflQwQyg_ZjV0KnEOnxNDu6d0UbOCY,9216
|
18
18
|
dao_treasury/types.py,sha256=KFz4WKPp4t_RBwIT6YGwOcgbzw8tdHIOcXTFsUA0pJA,3818
|
19
19
|
dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml,sha256=PwGrxPA5snT37bmpCuP9WE9T7weACm39N9lEsudr7f0,1337
|
20
20
|
dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json,sha256=Q0QTL1UIYQCsqj8GQuZMt81Ick-FMhYphbBo8XV1TQs,7248
|
@@ -25,27 +25,29 @@ dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json,sha256=TDDh
|
|
25
25
|
dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json,sha256=_W5Zt-J0YTVGAKPbM5kbMnv0EC3K_eZgJbqLgzkanS4,14844
|
26
26
|
dao_treasury/.grafana/provisioning/dashboards/treasury/Treasury.json,sha256=6y7Fp-2g1iRanRBtWKKN13sXjaKxBvqld7416ZJu4YI,72196
|
27
27
|
dao_treasury/.grafana/provisioning/datasources/datasources.yaml,sha256=gLmJsOkEXNzWRDibShfHFySWeuExW-dSB_U0OSfH868,344
|
28
|
-
dao_treasury/sorting/__init__.cp310-win32.pyd,sha256=
|
28
|
+
dao_treasury/sorting/__init__.cp310-win32.pyd,sha256=C7Oo9AuY7okaRFtX-fBTfgOqia16zKC8VR6XmbUCu0I,9216
|
29
29
|
dao_treasury/sorting/__init__.py,sha256=_uxM_FE1paM8oDAhDdHSyhDwnrlxCYX_lGn2DOqCaHU,10666
|
30
|
-
dao_treasury/sorting/_matchers.cp310-win32.pyd,sha256=
|
30
|
+
dao_treasury/sorting/_matchers.cp310-win32.pyd,sha256=pd45Ay9xbJFpX_jUhHcazfGxlWnfuqNph3P4g01mKkI,9216
|
31
31
|
dao_treasury/sorting/_matchers.py,sha256=ACi6aXZCKW5OTiztsID7CXCGJounj5c6ivhOCg2436M,14392
|
32
|
-
dao_treasury/sorting/_rules.cp310-win32.pyd,sha256=
|
32
|
+
dao_treasury/sorting/_rules.cp310-win32.pyd,sha256=4ioO7KD4ISzSOX3pWGXiXf9Cy_VxzBT2CCI8nLFh4HU,9216
|
33
33
|
dao_treasury/sorting/_rules.py,sha256=DxhdUgpS0q0LWeLl9W1Bjn5LZz9z4OLA03vQllPMH9k,9229
|
34
|
-
dao_treasury/sorting/factory.cp310-win32.pyd,sha256=
|
34
|
+
dao_treasury/sorting/factory.cp310-win32.pyd,sha256=XqkHItBcFOZPMd-V2u8_NAx9pPI1VePlzBQXsUaolC4,9216
|
35
35
|
dao_treasury/sorting/factory.py,sha256=zlJ18xlMTxv8ACV6_MimCVIDsw3K5AZcyvKaNYY7R14,10484
|
36
|
-
dao_treasury/sorting/rule.cp310-win32.pyd,sha256=
|
36
|
+
dao_treasury/sorting/rule.cp310-win32.pyd,sha256=B0-zIceGWEBDCweee_PtgeZAFUwVT_PmdqjkBc8kZsc,9216
|
37
37
|
dao_treasury/sorting/rule.py,sha256=TsSlaU4UlYr4QWJBdUY7EOAfC_SK6_VA3wEFOFNUUrU,11837
|
38
|
-
dao_treasury/sorting/rules/__init__.cp310-win32.pyd,sha256=
|
38
|
+
dao_treasury/sorting/rules/__init__.cp310-win32.pyd,sha256=1rNAQtdeV7VN7CWDJOBJA4ar_BcSBq7ffIThtK5EL9g,9216
|
39
39
|
dao_treasury/sorting/rules/__init__.py,sha256=hcLfejOEwD8RaM2RE-38Ej6_WkvL9BVGvIIGY848E6E,49
|
40
|
-
dao_treasury/sorting/rules/ignore/__init__.cp310-win32.pyd,sha256=
|
41
|
-
dao_treasury/sorting/rules/ignore/__init__.py,sha256=
|
42
|
-
dao_treasury/sorting/rules/ignore/llamapay.cp310-win32.pyd,sha256=
|
40
|
+
dao_treasury/sorting/rules/ignore/__init__.cp310-win32.pyd,sha256=ilYo8VZqmOJIPb-3EcR9qm55pcRze_nr5GgxN0H2JBU,9216
|
41
|
+
dao_treasury/sorting/rules/ignore/__init__.py,sha256=5zsmr_PMgVUXhQDz5grBtYhfSjqKMI_amFjvD2G6lZs,117
|
42
|
+
dao_treasury/sorting/rules/ignore/llamapay.cp310-win32.pyd,sha256=TU9r5TFcHGfhESn2VFlAmRLrZ7gc-tN1hY98mgDisf0,9216
|
43
43
|
dao_treasury/sorting/rules/ignore/llamapay.py,sha256=aYyAJRlmv419IeaqkcV5o3ffx0UVfteU0lTl80j0BGo,783
|
44
|
-
dao_treasury/
|
44
|
+
dao_treasury/sorting/rules/ignore/shitcoins.cp310-win32.pyd,sha256=18RiZtaYsJSAVfxxoO6Epn27-Nmnm1RRh0G9CmBYxiE,9216
|
45
|
+
dao_treasury/sorting/rules/ignore/shitcoins.py,sha256=8zdwOSi46yJeASEu8M6Ji_zG36IM8Nbu0SSYtcl32u4,791
|
46
|
+
dao_treasury/streams/__init__.cp310-win32.pyd,sha256=RrH4JVZea6NHVf7FVVAygKs-YK_ViTk-QPZyKTRqpIs,9216
|
45
47
|
dao_treasury/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
-
dao_treasury/streams/llamapay.cp310-win32.pyd,sha256=
|
47
|
-
dao_treasury/streams/llamapay.py,sha256=
|
48
|
-
dao_treasury-0.0.
|
49
|
-
dao_treasury-0.0.
|
50
|
-
dao_treasury-0.0.
|
51
|
-
dao_treasury-0.0.
|
48
|
+
dao_treasury/streams/llamapay.cp310-win32.pyd,sha256=Lw72bxxcdKwI1p9MnjJjTtWY1WgAyadTpjZB11EYuOc,9216
|
49
|
+
dao_treasury/streams/llamapay.py,sha256=rO1Mh2ndTziR6pnRkKHnQ22a_Yx9PM_-BG7I4dspEZ8,13535
|
50
|
+
dao_treasury-0.0.39.dist-info/METADATA,sha256=-wDgbX3YfkykBjBD0ztk8uYjAl2GfGDOcOvHilFMlrY,7149
|
51
|
+
dao_treasury-0.0.39.dist-info/WHEEL,sha256=GWZF0cboiU4MhsG0baPl8rrtCaXFSLW25384gp3vddM,97
|
52
|
+
dao_treasury-0.0.39.dist-info/top_level.txt,sha256=OJ9btLujcmz6HPYrhPuxnkTZ5Fl9uw584qBW96ZpkV4,41
|
53
|
+
dao_treasury-0.0.39.dist-info/RECORD,,
|
Binary file
|
File without changes
|