eth-portfolio-temp 0.2.2.dev0__tar.gz → 0.2.4.dev0__tar.gz
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 eth-portfolio-temp might be problematic. Click here for more details.
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/compile.yaml +2 -2
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/PKG-INFO +3 -3
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_utils.py +5 -4
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/portfolio.py +1 -1
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_portfolio.py +17 -12
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_utils.py +20 -6
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/balances.py +2 -3
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/PKG-INFO +3 -3
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/requires.txt +1 -1
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/pyproject.toml +1 -1
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/requirements.txt +1 -1
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/setup.py +1 -1
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.env.sample +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/black.yaml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/deploy_docs.yaml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/mypy.yaml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/release.yaml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.gitignore +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/Makefile +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/README.md +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/brownie-config.yaml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/Makefile +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/alabaster.css +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/basic.css +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/custom.css +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/doctools.js +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/documentation_options.js +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/file.png +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/language_data.js +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/minus.png +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/plus.png +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/pygments.css +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/searchtools.js +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/caching.rst +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/conf.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/exporter.rst +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/index.rst +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/make.bat +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/new-protocols.rst +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_argspec.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_cache.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_config.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_db/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_db/decorators.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_db/entities.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_db/utils.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_decimal.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_decorators.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_exceptions.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ledgers/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ledgers/address.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ledgers/portfolio.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/_nonce.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/balances.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/token_transfer.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/transaction.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/utils.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_shitcoins.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_stableish.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_submodules.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ydb/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ydb/token_transfers.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/address.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/buckets.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/constants.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/_base.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/convex.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/dsr.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/lending/README.md +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/lending/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/lending/_base.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/lending/compound.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/lending/liquity.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/lending/maker.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/lending/unit.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/liquity.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/py.typed +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/structs/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/structs/modified.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/structs/structs.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/typing/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/typing/balance/single.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_args.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_logging.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/docker/.grafana/dashboards/Portfolio/Balances.json +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/docker/.grafana/dashboards/dashboards.yaml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/docker/.grafana/datasources/datasources.yml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/docker/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/docker/check.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/docker/docker-compose.yaml +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/docker/docker_compose.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/main.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/py.typed +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/victoria/__init__.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/victoria/types.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/SOURCES.txt +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/dependency_links.txt +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/entry_points.txt +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/not-zip-safe +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/top_level.txt +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/renovate.json +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/setup.cfg +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/_test_completeness.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/conftest.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/fixtures.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/protocols/test_external.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/scripts/test_utils.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/test_portfolio.py +0 -0
- {eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/test_typing.py +0 -0
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/compile.yaml
RENAMED
|
@@ -19,10 +19,10 @@ jobs:
|
|
|
19
19
|
# Check out the PR branch
|
|
20
20
|
ref: ${{ github.head_ref }}
|
|
21
21
|
|
|
22
|
-
- name: Set up Python 3.
|
|
22
|
+
- name: Set up Python 3.13
|
|
23
23
|
uses: actions/setup-python@v6
|
|
24
24
|
with:
|
|
25
|
-
python-version: "3.
|
|
25
|
+
python-version: "3.13"
|
|
26
26
|
|
|
27
27
|
- name: Install Requirements
|
|
28
28
|
run: pip install -r requirements.txt
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eth_portfolio_temp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4.dev0
|
|
4
4
|
Summary: eth-portfolio makes it easy to analyze your portfolio.
|
|
5
5
|
Home-page: https://github.com/BobTheBuidler/eth-portfolio
|
|
6
6
|
Author: BobTheBuidler
|
|
7
7
|
Author-email: bobthebuidlerdefi@gmail.com
|
|
8
|
-
Requires-Python: >=3.10,<3.
|
|
8
|
+
Requires-Python: >=3.10,<3.14
|
|
9
9
|
Requires-Dist: checksum_dict>=2.1.7
|
|
10
10
|
Requires-Dist: dank_mids>=4.20.154
|
|
11
11
|
Requires-Dist: eth-brownie<1.23,>=1.21.0
|
|
@@ -16,7 +16,7 @@ Requires-Dist: faster-eth-utils
|
|
|
16
16
|
Requires-Dist: numpy<3
|
|
17
17
|
Requires-Dist: pandas<3,>=1.4.3
|
|
18
18
|
Requires-Dist: typed-envs>=0.0.9
|
|
19
|
-
Requires-Dist: ypricemagic<5,>=4.6.
|
|
19
|
+
Requires-Dist: ypricemagic<5,>=4.6.29.dev0
|
|
20
20
|
Dynamic: author
|
|
21
21
|
Dynamic: author-email
|
|
22
22
|
Dynamic: home-page
|
|
@@ -136,10 +136,11 @@ async def _get_price(token: AddressOrContract, block: Optional[int] = None) -> _
|
|
|
136
136
|
elif isinstance(e.exception, NonStandardERC20):
|
|
137
137
|
# Can't get symbol for handling like other excs
|
|
138
138
|
logger.warning(f"NonStandardERC20 while fetching price for {token}")
|
|
139
|
-
elif isinstance(e.exception, PriceError)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
elif isinstance(e.exception, PriceError):
|
|
140
|
+
if token not in SUPPRESS_ERROR_LOGS:
|
|
141
|
+
logger.warning(
|
|
142
|
+
f"PriceError while fetching price for {await _describe_err(token, block)}"
|
|
143
|
+
)
|
|
143
144
|
else:
|
|
144
145
|
logger.warning(f"{e} while fetching price for {await _describe_err(token, block)}")
|
|
145
146
|
logger.warning(e, exc_info=True)
|
|
@@ -37,7 +37,7 @@ from eth_portfolio.typing import Addresses, PortfolioBalances
|
|
|
37
37
|
logger = logging.getLogger(__name__)
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
class PortfolioWallets(Iterable[PortfolioAddress], Dict[Address, PortfolioAddress]): # type: ignore [
|
|
40
|
+
class PortfolioWallets(Iterable[PortfolioAddress], Dict[Address, PortfolioAddress]): # type: ignore [metaclass]
|
|
41
41
|
"""
|
|
42
42
|
A container that holds all :class:`~eth_portfolio.address.PortfolioAddress` objects for a specific :class:`~eth_portfolio.Portfolio`.
|
|
43
43
|
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_portfolio.py
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
from datetime import datetime, timezone
|
|
2
3
|
from logging import getLogger
|
|
3
4
|
from math import floor
|
|
@@ -5,10 +6,11 @@ from typing import Awaitable, Callable, Final, Iterator, List, Optional, Tuple
|
|
|
5
6
|
|
|
6
7
|
import a_sync
|
|
7
8
|
import eth_retry
|
|
9
|
+
import y
|
|
8
10
|
from a_sync.functools import cached_property_unsafe as cached_property
|
|
9
11
|
from eth_typing import BlockNumber, ChecksumAddress
|
|
10
12
|
from msgspec import ValidationError, json
|
|
11
|
-
from y import ERC20, Network, NonStandardERC20
|
|
13
|
+
from y import ERC20, Network, NonStandardERC20
|
|
12
14
|
from y.constants import CHAINID
|
|
13
15
|
from y.time import NoBlockFound
|
|
14
16
|
|
|
@@ -34,6 +36,14 @@ log_debug: Final = logger.debug
|
|
|
34
36
|
log_error: Final = logger.error
|
|
35
37
|
|
|
36
38
|
|
|
39
|
+
async def get_block_at_timestamp(dt: datetime) -> BlockNumber:
|
|
40
|
+
while True:
|
|
41
|
+
try:
|
|
42
|
+
return y.get_block_at_timestamp(dt, sync=False)
|
|
43
|
+
except NoBlockFound:
|
|
44
|
+
await asyncio.sleep(10)
|
|
45
|
+
|
|
46
|
+
|
|
37
47
|
class ExportablePortfolio(Portfolio):
|
|
38
48
|
"""Adds methods to export full portoflio data."""
|
|
39
49
|
|
|
@@ -77,17 +87,12 @@ class ExportablePortfolio(Portfolio):
|
|
|
77
87
|
async def export_snapshot(self, dt: datetime) -> None:
|
|
78
88
|
log_debug("checking data at %s for %s", dt, self.label)
|
|
79
89
|
try:
|
|
80
|
-
if
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
else:
|
|
87
|
-
break
|
|
88
|
-
log_debug("block at %s: %s", dt, block)
|
|
89
|
-
data = await self.get_data_for_export(block, dt, sync=False)
|
|
90
|
-
await victoria.post_data(data)
|
|
90
|
+
if await self.data_exists(dt, sync=False):
|
|
91
|
+
return
|
|
92
|
+
block = await get_block_at_timestamp(dt)
|
|
93
|
+
log_debug("block at %s: %s", dt, block)
|
|
94
|
+
data = await self.get_data_for_export(block, dt, sync=False)
|
|
95
|
+
await victoria.post_data(data)
|
|
91
96
|
except Exception as e:
|
|
92
97
|
log_error("Error processing %s:", dt, exc_info=True)
|
|
93
98
|
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_utils.py
RENAMED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import re
|
|
2
2
|
from asyncio import Task, create_task, sleep
|
|
3
3
|
from datetime import datetime, timedelta, timezone
|
|
4
|
-
from typing import Any, AsyncGenerator, Dict, List, Optional
|
|
4
|
+
from typing import Any, AsyncGenerator, Dict, Final, List, Optional
|
|
5
5
|
|
|
6
6
|
from brownie import chain
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
result = regex.findall(value)
|
|
9
|
+
timedelta_pattern: Final = re.compile(r"(\d+)([dhms]?)")
|
|
10
|
+
|
|
12
11
|
|
|
12
|
+
def parse_timedelta(value: str) -> timedelta:
|
|
13
13
|
days, hours, minutes, seconds = 0, 0, 0, 0
|
|
14
14
|
|
|
15
|
-
for val, unit in
|
|
15
|
+
for val, unit in timedelta_pattern.findall(value):
|
|
16
16
|
val = int(val)
|
|
17
17
|
if unit == "d":
|
|
18
18
|
days = val
|
|
@@ -58,10 +58,24 @@ async def aiter_timestamps(
|
|
|
58
58
|
|
|
59
59
|
timestamp = start
|
|
60
60
|
|
|
61
|
+
timestamps = []
|
|
61
62
|
while timestamp <= datetime.now(tz=timezone.utc):
|
|
62
|
-
|
|
63
|
+
timestamps.append(timestamp)
|
|
63
64
|
timestamp = timestamp + interval
|
|
64
65
|
|
|
66
|
+
# cycle between yielding earliest, latest, and middle from `timestamps` until complete
|
|
67
|
+
while timestamps:
|
|
68
|
+
# yield the earliest timestamp
|
|
69
|
+
yield timestamps.pop(0)
|
|
70
|
+
# yield the most recent timestamp if there is one
|
|
71
|
+
if timestamps:
|
|
72
|
+
yield timestamps.pop(-1)
|
|
73
|
+
# yield the most middle timestamp if there is one
|
|
74
|
+
if timestamps:
|
|
75
|
+
yield timestamps.pop(len(timestamps) // 2)
|
|
76
|
+
|
|
77
|
+
del timestamps
|
|
78
|
+
|
|
65
79
|
while run_forever:
|
|
66
80
|
while timestamp > datetime.now(tz=timezone.utc):
|
|
67
81
|
await _get_waiter(timestamp)
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/balances.py
RENAMED
|
@@ -34,9 +34,8 @@ async def export_balances(args: Namespace) -> None:
|
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
if export_start_block := args.export_start_block or args.first_tx_block:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
)
|
|
37
|
+
start_ts = await dank_mids.eth.get_block_timestamp(export_start_block)
|
|
38
|
+
start = datetime.fromtimestamp(start_ts, tz=timezone.utc)
|
|
40
39
|
else:
|
|
41
40
|
start = None
|
|
42
41
|
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_temp.egg-info/PKG-INFO
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eth_portfolio_temp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4.dev0
|
|
4
4
|
Summary: eth-portfolio makes it easy to analyze your portfolio.
|
|
5
5
|
Home-page: https://github.com/BobTheBuidler/eth-portfolio
|
|
6
6
|
Author: BobTheBuidler
|
|
7
7
|
Author-email: bobthebuidlerdefi@gmail.com
|
|
8
|
-
Requires-Python: >=3.10,<3.
|
|
8
|
+
Requires-Python: >=3.10,<3.14
|
|
9
9
|
Requires-Dist: checksum_dict>=2.1.7
|
|
10
10
|
Requires-Dist: dank_mids>=4.20.154
|
|
11
11
|
Requires-Dist: eth-brownie<1.23,>=1.21.0
|
|
@@ -16,7 +16,7 @@ Requires-Dist: faster-eth-utils
|
|
|
16
16
|
Requires-Dist: numpy<3
|
|
17
17
|
Requires-Dist: pandas<3,>=1.4.3
|
|
18
18
|
Requires-Dist: typed-envs>=0.0.9
|
|
19
|
-
Requires-Dist: ypricemagic<5,>=4.6.
|
|
19
|
+
Requires-Dist: ypricemagic<5,>=4.6.29.dev0
|
|
20
20
|
Dynamic: author
|
|
21
21
|
Dynamic: author-email
|
|
22
22
|
Dynamic: home-page
|
|
@@ -104,7 +104,7 @@ except Exception as e: # fallback in case build fails
|
|
|
104
104
|
setup(
|
|
105
105
|
# NOTE: somebody stole our name on pypi, we have this placeholder until we steal it back
|
|
106
106
|
name="eth_portfolio_temp",
|
|
107
|
-
python_requires=">=3.10,<3.
|
|
107
|
+
python_requires=">=3.10,<3.14",
|
|
108
108
|
# name="eth-portfolio",
|
|
109
109
|
packages=find_packages(),
|
|
110
110
|
use_scm_version={
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/black.yaml
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/deploy_docs.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/.github/workflows/release.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/basic.css
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/custom.css
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/doctools.js
RENAMED
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/file.png
RENAMED
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/minus.png
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/docs/_build/html/_static/plus.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_db/__init__.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_db/decorators.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_db/entities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_decorators.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_exceptions.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ledgers/__init__.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ledgers/address.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ledgers/portfolio.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/__init__.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/_nonce.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/balances.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_loaders/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_submodules.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/_ydb/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/__init__.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/_base.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/convex.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/dsr.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/protocols/liquity.py
RENAMED
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/structs/__init__.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/structs/modified.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/structs/structs.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio/typing/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/__init__.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_args.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/_logging.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/main.py
RENAMED
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/eth_portfolio_scripts/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_portfolio_temp-0.2.2.dev0 → eth_portfolio_temp-0.2.4.dev0}/tests/protocols/test_external.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|