mm-balance 0.1.15__tar.gz → 0.1.17__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.
Files changed (30) hide show
  1. mm_balance-0.1.17/PKG-INFO +9 -0
  2. {mm_balance-0.1.15 → mm_balance-0.1.17}/justfile +2 -2
  3. {mm_balance-0.1.15 → mm_balance-0.1.17}/pyproject.toml +14 -19
  4. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/cli.py +1 -0
  5. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/config/example.yml +2 -2
  6. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/config.py +4 -1
  7. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/output/formats/json_format.py +1 -0
  8. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/output/formats/table_format.py +4 -0
  9. mm_balance-0.1.17/uv.lock +2003 -0
  10. mm_balance-0.1.15/PKG-INFO +0 -9
  11. mm_balance-0.1.15/uv.lock +0 -1947
  12. {mm_balance-0.1.15 → mm_balance-0.1.17}/.gitignore +0 -0
  13. {mm_balance-0.1.15 → mm_balance-0.1.17}/README.md +0 -0
  14. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/__init__.py +0 -0
  15. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/constants.py +0 -0
  16. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/output/__init__.py +0 -0
  17. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/output/utils.py +0 -0
  18. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/price.py +0 -0
  19. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/result.py +0 -0
  20. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/rpc/__init__.py +0 -0
  21. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/rpc/aptos.py +0 -0
  22. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/rpc/btc.py +0 -0
  23. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/rpc/evm.py +0 -0
  24. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/rpc/solana.py +0 -0
  25. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/token_decimals.py +0 -0
  26. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/utils.py +0 -0
  27. {mm_balance-0.1.15 → mm_balance-0.1.17}/src/mm_balance/workers.py +0 -0
  28. {mm_balance-0.1.15 → mm_balance-0.1.17}/tests/__init__.py +0 -0
  29. {mm_balance-0.1.15 → mm_balance-0.1.17}/tests/conftest.py +0 -0
  30. {mm_balance-0.1.15 → mm_balance-0.1.17}/tests/test_dummy.py +0 -0
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: mm-balance
3
+ Version: 0.1.17
4
+ Requires-Python: >=3.12
5
+ Requires-Dist: mm-aptos==0.1.4
6
+ Requires-Dist: mm-btc==0.2.0
7
+ Requires-Dist: mm-eth==0.2.0
8
+ Requires-Dist: mm-solana==0.2.0
9
+ Requires-Dist: typer>=0.15.1
@@ -6,14 +6,14 @@ clean:
6
6
  rm -rf .pytest_cache .mypy_cache .ruff_cache .coverage dist build src/*.egg-info
7
7
 
8
8
  build: clean lint audit test
9
- uvx --from build pyproject-build --installer uv
9
+ uv build
10
10
 
11
11
  format:
12
12
  uv run ruff check --select I --fix src tests
13
13
  uv run ruff format src tests
14
14
 
15
15
  test:
16
- uv run coverage run -m pytest -n auto tests
16
+ uv run pytest -n auto tests
17
17
 
18
18
  lint: format
19
19
  uv run ruff check src tests
@@ -1,14 +1,14 @@
1
1
  [project]
2
2
  name = "mm-balance"
3
- version = "0.1.15"
3
+ version = "0.1.17"
4
4
  description = ""
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "mm-btc==0.1.0",
8
- "mm-eth==0.1.3",
9
- "mm-solana==0.1.5",
10
- "mm-aptos==0.1.2",
11
- "typer>=0.12.5",
7
+ "mm-btc==0.2.0",
8
+ "mm-eth==0.2.0",
9
+ "mm-solana==0.2.0",
10
+ "mm-aptos==0.1.4",
11
+ "typer>=0.15.1",
12
12
  ]
13
13
  [project.scripts]
14
14
  mm-balance = "mm_balance.cli:app"
@@ -19,27 +19,24 @@ build-backend = "hatchling.build"
19
19
 
20
20
  [tool.uv]
21
21
  dev-dependencies = [
22
- "pytest~=8.3.3",
22
+ "pytest~=8.3.4",
23
23
  "pytest-xdist~=3.6.1",
24
- "pytest-httpserver~=1.1.0",
25
- "coverage~=7.6.4",
26
- "ruff~=0.7.1",
27
- "pip-audit~=2.7.0",
28
- "bandit~=1.7.10",
29
- "mypy~=1.13.0",
30
- "types-python-dateutil~=2.9.0.20241003",
31
- "types-PyYAML~=6.0.12.20240917",
24
+ "ruff~=0.8.4",
25
+ "pip-audit~=2.7.3",
26
+ "bandit~=1.8.0",
27
+ "mypy~=1.14.0",
28
+ "types-PyYAML~=6.0.12.20241221",
32
29
  ]
33
30
 
34
31
  [tool.mypy]
35
- python_version = "3.12"
32
+ python_version = "3.13"
36
33
  warn_no_return = false
37
34
  strict = true
38
35
  exclude = ["^tests/", "^tmp/"]
39
36
 
40
37
  [tool.ruff]
41
38
  line-length = 130
42
- target-version = "py312"
39
+ target-version = "py313"
43
40
  lint.select = [
44
41
  "F", # Pyflakes
45
42
  "E", "W", # pycodestyle
@@ -55,8 +52,6 @@ lint.select = [
55
52
  ]
56
53
  lint.ignore = [
57
54
  "A003", # builtin-attribute-shadowing
58
- # "B008", # function-call-argument-default
59
- "UP040", # non-pep695-type-alias
60
55
  "COM812",
61
56
  "RUF012"
62
57
  ]
@@ -59,6 +59,7 @@ def cli(
59
59
 
60
60
  if config.print_debug and config.print_format is PrintFormat.TABLE:
61
61
  table_format.print_nodes(config)
62
+ table_format.print_proxy_count(config)
62
63
 
63
64
  token_decimals = get_token_decimals(config)
64
65
  if config.print_debug and config.print_format is PrintFormat.TABLE:
@@ -39,11 +39,11 @@ coins:
39
39
  addresses: binance_eth
40
40
 
41
41
  - ticker: USDC
42
- comment: okx aptos
42
+ comment: swap.thala.apt
43
43
  network: aptos
44
44
  token_address: 0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC
45
45
  token_decimals: 6
46
- addresses: "0x834d639b10d20dcb894728aa4b9b572b2ea2d97073b10eacb111f338b20ea5d7" # for a single line it's necessary to use quotes
46
+ addresses: "0x48271d39d0b05bd6efca2278f22277d6fcc375504f9839fd73f74ace240861af" # for a single line it's necessary to use quotes
47
47
 
48
48
 
49
49
  addresses:
@@ -1,8 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import os
3
4
  from decimal import Decimal
4
5
  from pathlib import Path
5
- from typing import Self
6
+ from typing import Self, cast
6
7
 
7
8
  import pydash
8
9
  from mm_std import BaseConfig, PrintFormat, fatal, hr
@@ -97,6 +98,8 @@ class Config(BaseConfig):
97
98
  # load from proxies_url
98
99
  if self.proxies_url is not None:
99
100
  self.proxies = get_proxies(self.proxies_url)
101
+ elif os.getenv("MM_BALANCE_PROXIES_URL"):
102
+ self.proxies = get_proxies(cast(str, os.getenv("MM_BALANCE_PROXIES_URL")))
100
103
 
101
104
  # load addresses from address_group
102
105
  for group in self.groups:
@@ -12,6 +12,7 @@ def print_result(config: Config, token_decimals: TokenDecimals, prices: Prices,
12
12
  if config.print_debug:
13
13
  data["nodes"] = config.nodes
14
14
  data["token_decimals"] = token_decimals
15
+ data["proxies"] = len(config.proxies)
15
16
  if config.price:
16
17
  data["prices"] = prices
17
18
 
@@ -17,6 +17,10 @@ def print_nodes(config: Config) -> None:
17
17
  print_table("Nodes", ["network", "nodes"], rows)
18
18
 
19
19
 
20
+ def print_proxy_count(config: Config) -> None:
21
+ print_table("Proxies", ["count"], [[len(config.proxies)]])
22
+
23
+
20
24
  def print_token_decimals(token_decimals: TokenDecimals) -> None:
21
25
  rows = []
22
26
  for network, decimals in token_decimals.items():