mm-balance 0.1.15__py3-none-any.whl → 0.1.16__py3-none-any.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.
mm_balance/cli.py CHANGED
@@ -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:
mm_balance/config.py CHANGED
@@ -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():
@@ -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,23 +1,23 @@
1
1
  mm_balance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mm_balance/cli.py,sha256=NJ-1d03faDO_1V1Nd96b6b3Y40LhuewFxCvnw0SupuY,3064
3
- mm_balance/config.py,sha256=5qOsU1JjWu2TbH1VgikK4oZpBcuPMqsOe8DOwMRtrWM,5230
2
+ mm_balance/cli.py,sha256=LbOyGiF3IFCl2oBJzAzR-CE7QZWiR-Q-p9wIgfqv_r8,3111
3
+ mm_balance/config.py,sha256=LsmfluUFpTfXMvXUUzGQtiZlz1gliiDrDx4c4SqgPws,5383
4
4
  mm_balance/constants.py,sha256=4C2BxYRY_i83Rba5NOXeLLeA0ZTWR9WD6BeyQwiCj_U,2335
5
5
  mm_balance/price.py,sha256=f6fYhpPVqZE9hH22ypfYb9m-nfE41LeVIvksEvqmz54,1615
6
6
  mm_balance/result.py,sha256=fG63HrHXWS3kBLHmefxKsRh9tj53dloamO_nv3xFboM,4576
7
7
  mm_balance/token_decimals.py,sha256=WAz9wbvwjPJEcQnrLyPAf23eGp89t9oP_xBmaEecEG0,2348
8
8
  mm_balance/utils.py,sha256=YjQMfyAaLiiprjt9CuNbDQSJrLbRoTkb2rurAb6bHDc,288
9
9
  mm_balance/workers.py,sha256=PGhLVhYYVm2jIAzIiJQYby_UqW0xsRv-wQJURqOUYxg,3767
10
- mm_balance/config/example.yml,sha256=QRUYEYKmq33dqHv4RIdlPkjMRjU-oZ8LMeoS4064sY4,1894
10
+ mm_balance/config/example.yml,sha256=7n72tHsnUbZ64q856IeKHlmt-7PvtAgZlB8t4AS0NzI,1899
11
11
  mm_balance/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  mm_balance/output/utils.py,sha256=Vp-6ev-9YIa3kGZxKzMdoJZQB_KLUaAdQGvgOxmZtrc,718
13
- mm_balance/output/formats/json_format.py,sha256=Jz2b2-FRvCie0at2loTIdJHCeUMb_Nn6uI0QONVXZ4g,820
14
- mm_balance/output/formats/table_format.py,sha256=zs2rgj2djYoDhG6i9tE_2GYYsn2HbAneH4VXfmJuDwI,4427
13
+ mm_balance/output/formats/json_format.py,sha256=yMkZTA6vOUpLSixF7H4H4lVZKShRs4B9qmUR8L-CRvw,866
14
+ mm_balance/output/formats/table_format.py,sha256=qN1uMF1cyAVOH31Gohoc_a4l9-pWTSZ8WRxBBSAwj54,4539
15
15
  mm_balance/rpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  mm_balance/rpc/aptos.py,sha256=6hKGKTs2DPQMa4RmPXzfvjCFjPjN8wjJhRRI6HdI9GM,628
17
17
  mm_balance/rpc/btc.py,sha256=ugp90H7YW0kiXIh98bQWk9mQTW20yE-jBiCpRvfoH-U,481
18
18
  mm_balance/rpc/evm.py,sha256=ewlMmRrcXKlky3DPNbnUBTVwnvyw7N9iCZLsCX2V14w,1007
19
19
  mm_balance/rpc/solana.py,sha256=Lwl5Otqy48g4LWfz9uN7_rkICKUIYJvf88PbIAnfMdc,1051
20
- mm_balance-0.1.15.dist-info/METADATA,sha256=vioUnF6B0nxZ73wZe13jRQtRMTVpYup5brkzIOs_9Ds,229
21
- mm_balance-0.1.15.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
22
- mm_balance-0.1.15.dist-info/entry_points.txt,sha256=rSnP0ZW1a3ACNwTWM7T53CmOycKbzhG43m2_wseENng,50
23
- mm_balance-0.1.15.dist-info/RECORD,,
20
+ mm_balance-0.1.16.dist-info/METADATA,sha256=MuArrbQbWKMo5Xx9Auu7YzciGl1oKfjCT1PWnBgyhP0,229
21
+ mm_balance-0.1.16.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
22
+ mm_balance-0.1.16.dist-info/entry_points.txt,sha256=rSnP0ZW1a3ACNwTWM7T53CmOycKbzhG43m2_wseENng,50
23
+ mm_balance-0.1.16.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.25.0
2
+ Generator: hatchling 1.26.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any