mm-balance 0.1.15__tar.gz → 0.1.16__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 (28) hide show
  1. {mm_balance-0.1.15 → mm_balance-0.1.16}/PKG-INFO +1 -1
  2. {mm_balance-0.1.15 → mm_balance-0.1.16}/pyproject.toml +2 -2
  3. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/cli.py +1 -0
  4. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/config/example.yml +2 -2
  5. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/config.py +4 -1
  6. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/output/formats/json_format.py +1 -0
  7. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/output/formats/table_format.py +4 -0
  8. {mm_balance-0.1.15 → mm_balance-0.1.16}/uv.lock +25 -25
  9. {mm_balance-0.1.15 → mm_balance-0.1.16}/.gitignore +0 -0
  10. {mm_balance-0.1.15 → mm_balance-0.1.16}/README.md +0 -0
  11. {mm_balance-0.1.15 → mm_balance-0.1.16}/justfile +0 -0
  12. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/__init__.py +0 -0
  13. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/constants.py +0 -0
  14. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/output/__init__.py +0 -0
  15. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/output/utils.py +0 -0
  16. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/price.py +0 -0
  17. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/result.py +0 -0
  18. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/rpc/__init__.py +0 -0
  19. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/rpc/aptos.py +0 -0
  20. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/rpc/btc.py +0 -0
  21. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/rpc/evm.py +0 -0
  22. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/rpc/solana.py +0 -0
  23. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/token_decimals.py +0 -0
  24. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/utils.py +0 -0
  25. {mm_balance-0.1.15 → mm_balance-0.1.16}/src/mm_balance/workers.py +0 -0
  26. {mm_balance-0.1.15 → mm_balance-0.1.16}/tests/__init__.py +0 -0
  27. {mm_balance-0.1.15 → mm_balance-0.1.16}/tests/conftest.py +0 -0
  28. {mm_balance-0.1.15 → mm_balance-0.1.16}/tests/test_dummy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mm-balance
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Requires-Python: >=3.12
5
5
  Requires-Dist: mm-aptos==0.1.2
6
6
  Requires-Dist: mm-btc==0.1.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mm-balance"
3
- version = "0.1.15"
3
+ version = "0.1.16"
4
4
  description = ""
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
@@ -23,7 +23,7 @@ dev-dependencies = [
23
23
  "pytest-xdist~=3.6.1",
24
24
  "pytest-httpserver~=1.1.0",
25
25
  "coverage~=7.6.4",
26
- "ruff~=0.7.1",
26
+ "ruff~=0.7.3",
27
27
  "pip-audit~=2.7.0",
28
28
  "bandit~=1.7.10",
29
29
  "mypy~=1.13.0",
@@ -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():
@@ -937,7 +937,7 @@ wheels = [
937
937
 
938
938
  [[package]]
939
939
  name = "mm-balance"
940
- version = "0.1.15"
940
+ version = "0.1.16"
941
941
  source = { editable = "." }
942
942
  dependencies = [
943
943
  { name = "mm-aptos" },
@@ -947,7 +947,7 @@ dependencies = [
947
947
  { name = "typer" },
948
948
  ]
949
949
 
950
- [package.dependency-groups]
950
+ [package.dev-dependencies]
951
951
  dev = [
952
952
  { name = "bandit" },
953
953
  { name = "coverage" },
@@ -970,7 +970,7 @@ requires-dist = [
970
970
  { name = "typer", specifier = ">=0.12.5" },
971
971
  ]
972
972
 
973
- [package.metadata.dependency-groups]
973
+ [package.metadata.requires-dev]
974
974
  dev = [
975
975
  { name = "bandit", specifier = "~=1.7.10" },
976
976
  { name = "coverage", specifier = "~=7.6.4" },
@@ -979,7 +979,7 @@ dev = [
979
979
  { name = "pytest", specifier = "~=8.3.3" },
980
980
  { name = "pytest-httpserver", specifier = "~=1.1.0" },
981
981
  { name = "pytest-xdist", specifier = "~=3.6.1" },
982
- { name = "ruff", specifier = "~=0.7.1" },
982
+ { name = "ruff", specifier = "~=0.7.3" },
983
983
  { name = "types-python-dateutil", specifier = "~=2.9.0.20241003" },
984
984
  { name = "types-pyyaml", specifier = "~=6.0.12.20240917" },
985
985
  ]
@@ -1612,27 +1612,27 @@ wheels = [
1612
1612
 
1613
1613
  [[package]]
1614
1614
  name = "ruff"
1615
- version = "0.7.1"
1616
- source = { registry = "https://pypi.org/simple" }
1617
- sdist = { url = "https://files.pythonhosted.org/packages/a6/21/5c6e05e0fd3fbb41be4fb92edbc9a04de70baf60adb61435ce0c6b8c3d55/ruff-0.7.1.tar.gz", hash = "sha256:9d8a41d4aa2dad1575adb98a82870cf5db5f76b2938cf2206c22c940034a36f4", size = 3181670 }
1618
- wheels = [
1619
- { url = "https://files.pythonhosted.org/packages/65/45/8a20a9920175c9c4892b2420f80ff3cf14949cf3067118e212f9acd9c908/ruff-0.7.1-py3-none-linux_armv6l.whl", hash = "sha256:cb1bc5ed9403daa7da05475d615739cc0212e861b7306f314379d958592aaa89", size = 10389268 },
1620
- { url = "https://files.pythonhosted.org/packages/1b/d3/2f8382db2cf4f9488e938602e33e36287f9d26cb283aa31f11c31297ce79/ruff-0.7.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:27c1c52a8d199a257ff1e5582d078eab7145129aa02721815ca8fa4f9612dc35", size = 10188348 },
1621
- { url = "https://files.pythonhosted.org/packages/a2/31/7d14e2a88da351200f844b7be889a0845d9e797162cf76b136d21b832a23/ruff-0.7.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:588a34e1ef2ea55b4ddfec26bbe76bc866e92523d8c6cdec5e8aceefeff02d99", size = 9841448 },
1622
- { url = "https://files.pythonhosted.org/packages/db/99/738cafdc768eceeca0bd26c6f03e213aa91203d2278e1d95b1c31c4ece41/ruff-0.7.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94fc32f9cdf72dc75c451e5f072758b118ab8100727168a3df58502b43a599ca", size = 10674864 },
1623
- { url = "https://files.pythonhosted.org/packages/fe/12/bcf2836b50eab53c65008383e7d55201e490d75167c474f14a16e1af47d2/ruff-0.7.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:985818742b833bffa543a84d1cc11b5e6871de1b4e0ac3060a59a2bae3969250", size = 10192105 },
1624
- { url = "https://files.pythonhosted.org/packages/2b/71/261d5d668bf98b6c44e89bfb5dfa4cb8cb6c8b490a201a3d8030e136ea4f/ruff-0.7.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:32f1e8a192e261366c702c5fb2ece9f68d26625f198a25c408861c16dc2dea9c", size = 11194144 },
1625
- { url = "https://files.pythonhosted.org/packages/90/1f/0926d18a3b566fa6e7b3b36093088e4ffef6b6ba4ea85a462d9a93f7e35c/ruff-0.7.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:699085bf05819588551b11751eff33e9ca58b1b86a6843e1b082a7de40da1565", size = 11917066 },
1626
- { url = "https://files.pythonhosted.org/packages/cd/a8/9fac41f128b6a44ab4409c1493430b4ee4b11521e8aeeca19bfe1ce851f9/ruff-0.7.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:344cc2b0814047dc8c3a8ff2cd1f3d808bb23c6658db830d25147339d9bf9ea7", size = 11458821 },
1627
- { url = "https://files.pythonhosted.org/packages/25/cd/59644168f086ab13fe4e02943b9489a0aa710171f66b178e179df5383554/ruff-0.7.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4316bbf69d5a859cc937890c7ac7a6551252b6a01b1d2c97e8fc96e45a7c8b4a", size = 12700379 },
1628
- { url = "https://files.pythonhosted.org/packages/fb/30/3bac63619eb97174661829c07fc46b2055a053dee72da29d7c304c1cd2c0/ruff-0.7.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79d3af9dca4c56043e738a4d6dd1e9444b6d6c10598ac52d146e331eb155a8ad", size = 11019813 },
1629
- { url = "https://files.pythonhosted.org/packages/4b/af/f567b885b5cb3bcdbcca3458ebf210cc8c9c7a9f61c332d3c2a050c3b21e/ruff-0.7.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:c5c121b46abde94a505175524e51891f829414e093cd8326d6e741ecfc0a9112", size = 10662146 },
1630
- { url = "https://files.pythonhosted.org/packages/bc/ad/eb930d3ad117a9f2f7261969c21559ebd82bb13b6e8001c7caed0d44be5f/ruff-0.7.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8422104078324ea250886954e48f1373a8fe7de59283d747c3a7eca050b4e378", size = 10256911 },
1631
- { url = "https://files.pythonhosted.org/packages/20/d5/af292ce70a016fcec792105ca67f768b403dd480a11888bc1f418fed0dd5/ruff-0.7.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:56aad830af8a9db644e80098fe4984a948e2b6fc2e73891538f43bbe478461b8", size = 10767488 },
1632
- { url = "https://files.pythonhosted.org/packages/24/85/cc04a3bd027f433bebd2a097e63b3167653c079f7f13d8f9a1178e693412/ruff-0.7.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:658304f02f68d3a83c998ad8bf91f9b4f53e93e5412b8f2388359d55869727fd", size = 11093368 },
1633
- { url = "https://files.pythonhosted.org/packages/0b/fb/c39cbf32d1f3e318674b8622f989417231794926b573f76dd4d0ca49f0f1/ruff-0.7.1-py3-none-win32.whl", hash = "sha256:b517a2011333eb7ce2d402652ecaa0ac1a30c114fbbd55c6b8ee466a7f600ee9", size = 8594180 },
1634
- { url = "https://files.pythonhosted.org/packages/5a/71/ec8cdea34ecb90c830ca60d54ac7b509a7b5eab50fae27e001d4470fe813/ruff-0.7.1-py3-none-win_amd64.whl", hash = "sha256:f38c41fcde1728736b4eb2b18850f6d1e3eedd9678c914dede554a70d5241307", size = 9419751 },
1635
- { url = "https://files.pythonhosted.org/packages/79/7b/884553415e9f0a9bf358ed52fb68b934e67ef6c5a62397ace924a1afdf9a/ruff-0.7.1-py3-none-win_arm64.whl", hash = "sha256:19aa200ec824c0f36d0c9114c8ec0087082021732979a359d6f3c390a6ff2a37", size = 8717402 },
1615
+ version = "0.7.3"
1616
+ source = { registry = "https://pypi.org/simple" }
1617
+ sdist = { url = "https://files.pythonhosted.org/packages/4b/06/09d1276df977eece383d0ed66052fc24ec4550a61f8fbc0a11200e690496/ruff-0.7.3.tar.gz", hash = "sha256:e1d1ba2e40b6e71a61b063354d04be669ab0d39c352461f3d789cac68b54a313", size = 3243664 }
1618
+ wheels = [
1619
+ { url = "https://files.pythonhosted.org/packages/c0/56/933d433c2489e4642487b835f53dd9ff015fb3d8fa459b09bb2ce42d7c4b/ruff-0.7.3-py3-none-linux_armv6l.whl", hash = "sha256:34f2339dc22687ec7e7002792d1f50712bf84a13d5152e75712ac08be565d344", size = 10372090 },
1620
+ { url = "https://files.pythonhosted.org/packages/20/ea/1f0a22a6bcdd3fc26c73f63a025d05bd565901b729d56bcb093c722a6c4c/ruff-0.7.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fb397332a1879b9764a3455a0bb1087bda876c2db8aca3a3cbb67b3dbce8cda0", size = 10190037 },
1621
+ { url = "https://files.pythonhosted.org/packages/16/74/aca75666e0d481fe394e76a8647c44ea919087748024924baa1a17371e3e/ruff-0.7.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:37d0b619546103274e7f62643d14e1adcbccb242efda4e4bdb9544d7764782e9", size = 9811998 },
1622
+ { url = "https://files.pythonhosted.org/packages/20/a1/cf446a0d7f78ea1f0bd2b9171c11dfe746585c0c4a734b25966121eb4f5d/ruff-0.7.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d59f0c3ee4d1a6787614e7135b72e21024875266101142a09a61439cb6e38a5", size = 10620626 },
1623
+ { url = "https://files.pythonhosted.org/packages/cd/c1/82b27d09286ae855f5d03b1ad37cf243f21eb0081732d4d7b0d658d439cb/ruff-0.7.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:44eb93c2499a169d49fafd07bc62ac89b1bc800b197e50ff4633aed212569299", size = 10177598 },
1624
+ { url = "https://files.pythonhosted.org/packages/b9/42/c0acac22753bf74013d035a5ef6c5c4c40ad4d6686bfb3fda7c6f37d9b37/ruff-0.7.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d0242ce53f3a576c35ee32d907475a8d569944c0407f91d207c8af5be5dae4e", size = 11171963 },
1625
+ { url = "https://files.pythonhosted.org/packages/43/18/bb0befb7fb9121dd9009e6a72eb98e24f1bacb07c6f3ecb55f032ba98aed/ruff-0.7.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:6b6224af8b5e09772c2ecb8dc9f3f344c1aa48201c7f07e7315367f6dd90ac29", size = 11856157 },
1626
+ { url = "https://files.pythonhosted.org/packages/5e/91/04e98d7d6e32eca9d1372be595f9abc7b7f048795e32eb2edbd8794d50bd/ruff-0.7.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c50f95a82b94421c964fae4c27c0242890a20fe67d203d127e84fbb8013855f5", size = 11440331 },
1627
+ { url = "https://files.pythonhosted.org/packages/f5/dc/3fe99f2ce10b76d389041a1b9f99e7066332e479435d4bebcceea16caff5/ruff-0.7.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f3eff9961b5d2644bcf1616c606e93baa2d6b349e8aa8b035f654df252c8c67", size = 12725354 },
1628
+ { url = "https://files.pythonhosted.org/packages/43/7b/1daa712de1c5bc6cbbf9fa60e9c41cc48cda962dc6d2c4f2a224d2c3007e/ruff-0.7.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8963cab06d130c4df2fd52c84e9f10d297826d2e8169ae0c798b6221be1d1d2", size = 11010091 },
1629
+ { url = "https://files.pythonhosted.org/packages/b6/db/1227a903587432eb569e57a95b15a4f191a71fe315cde4c0312df7bc85da/ruff-0.7.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:61b46049d6edc0e4317fb14b33bd693245281a3007288b68a3f5b74a22a0746d", size = 10610687 },
1630
+ { url = "https://files.pythonhosted.org/packages/db/e2/dc41ee90c3085aadad4da614d310d834f641aaafddf3dfbba08210c616ce/ruff-0.7.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:10ebce7696afe4644e8c1a23b3cf8c0f2193a310c18387c06e583ae9ef284de2", size = 10254843 },
1631
+ { url = "https://files.pythonhosted.org/packages/6f/09/5f6cac1c91542bc5bd33d40b4c13b637bf64d7bb29e091dadb01b62527fe/ruff-0.7.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3f36d56326b3aef8eeee150b700e519880d1aab92f471eefdef656fd57492aa2", size = 10730962 },
1632
+ { url = "https://files.pythonhosted.org/packages/d3/42/89a4b9a24ef7d00269e24086c417a006f9a3ffeac2c80f2629eb5ce140ee/ruff-0.7.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5d024301109a0007b78d57ab0ba190087b43dce852e552734ebf0b0b85e4fb16", size = 11101907 },
1633
+ { url = "https://files.pythonhosted.org/packages/b0/5c/efdb4777686683a8edce94ffd812783bddcd3d2454d38c5ac193fef7c500/ruff-0.7.3-py3-none-win32.whl", hash = "sha256:4ba81a5f0c5478aa61674c5a2194de8b02652f17addf8dfc40c8937e6e7d79fc", size = 8611095 },
1634
+ { url = "https://files.pythonhosted.org/packages/bb/b8/28fbc6a4efa50178f973972d1c84b2d0a33cdc731588522ab751ac3da2f5/ruff-0.7.3-py3-none-win_amd64.whl", hash = "sha256:588a9ff2fecf01025ed065fe28809cd5a53b43505f48b69a1ac7707b1b7e4088", size = 9418283 },
1635
+ { url = "https://files.pythonhosted.org/packages/3f/77/b587cba6febd5e2003374f37eb89633f79f161e71084f94057c8653b7fb3/ruff-0.7.3-py3-none-win_arm64.whl", hash = "sha256:1713e2c5545863cdbfe2cbce21f69ffaf37b813bfd1fb3b90dc9a6f1963f5a8c", size = 8725228 },
1636
1636
  ]
1637
1637
 
1638
1638
  [[package]]
File without changes
File without changes
File without changes