mm-eth 0.2.2__py3-none-any.whl → 0.2.3__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_eth/cli/cli_utils.py +4 -7
- mm_eth/cli/cmd/balances_cmd.py +3 -7
- mm_eth/cli/cmd/call_contract_cmd.py +3 -7
- mm_eth/cli/cmd/deploy_cmd.py +3 -8
- mm_eth/cli/cmd/send_contract_cmd.py +3 -5
- mm_eth/cli/cmd/transfer_erc20_cmd.py +3 -5
- mm_eth/cli/cmd/transfer_eth_cmd.py +3 -5
- {mm_eth-0.2.2.dist-info → mm_eth-0.2.3.dist-info}/METADATA +2 -2
- {mm_eth-0.2.2.dist-info → mm_eth-0.2.3.dist-info}/RECORD +11 -11
- {mm_eth-0.2.2.dist-info → mm_eth-0.2.3.dist-info}/WHEEL +0 -0
- {mm_eth-0.2.2.dist-info → mm_eth-0.2.3.dist-info}/entry_points.txt +0 -0
mm_eth/cli/cli_utils.py
CHANGED
|
@@ -96,10 +96,7 @@ def load_private_keys_from_file(private_keys_file: str) -> list[str]:
|
|
|
96
96
|
return [line for line in lines if is_private_key(line)]
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
def
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
print_json(res.err)
|
|
105
|
-
sys.exit(1)
|
|
99
|
+
def print_config_and_exit(exit_: bool, config: BaseConfig, exclude: set[str] | None = None) -> None:
|
|
100
|
+
if exit_:
|
|
101
|
+
print_json(config.model_dump(exclude=exclude))
|
|
102
|
+
sys.exit(0)
|
mm_eth/cli/cmd/balances_cmd.py
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
from dataclasses import dataclass
|
|
3
|
-
from pathlib import Path
|
|
4
2
|
|
|
5
|
-
from mm_std import BaseConfig, Err, Ok, fatal
|
|
3
|
+
from mm_std import BaseConfig, Err, Ok, fatal
|
|
6
4
|
from pydantic import Field, field_validator
|
|
7
5
|
from rich.live import Live
|
|
8
6
|
from rich.table import Table
|
|
@@ -37,10 +35,8 @@ class Token:
|
|
|
37
35
|
|
|
38
36
|
|
|
39
37
|
def run(config_path: str, print_config: bool, wei: bool, show_nonce: bool) -> None:
|
|
40
|
-
config =
|
|
41
|
-
|
|
42
|
-
print_json(config.model_dump())
|
|
43
|
-
sys.exit(0)
|
|
38
|
+
config = Config.read_config_or_exit(config_path)
|
|
39
|
+
cli_utils.print_config_and_exit(print_config, config)
|
|
44
40
|
|
|
45
41
|
tokens = _get_tokens_info(config)
|
|
46
42
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
|
-
import sys
|
|
3
2
|
from logging import fatal
|
|
4
|
-
from pathlib import Path
|
|
5
3
|
|
|
6
|
-
from mm_std import BaseConfig, Err,
|
|
4
|
+
from mm_std import BaseConfig, Err, print_plain
|
|
7
5
|
from pydantic import StrictStr
|
|
8
6
|
|
|
9
7
|
from mm_eth import abi, rpc
|
|
@@ -19,10 +17,8 @@ class Config(BaseConfig):
|
|
|
19
17
|
|
|
20
18
|
|
|
21
19
|
def run(config_path: str, print_config: bool) -> None:
|
|
22
|
-
config =
|
|
23
|
-
|
|
24
|
-
print_json(config.model_dump())
|
|
25
|
-
sys.exit(0)
|
|
20
|
+
config = Config.read_config_or_exit(config_path)
|
|
21
|
+
cli_utils.print_config_and_exit(print_config, config)
|
|
26
22
|
|
|
27
23
|
input_data = abi.encode_function_input_by_signature(
|
|
28
24
|
config.function_signature,
|
mm_eth/cli/cmd/deploy_cmd.py
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
|
|
4
1
|
import yaml
|
|
5
|
-
from mm_std import BaseConfig, fatal
|
|
2
|
+
from mm_std import BaseConfig, fatal
|
|
6
3
|
from pydantic import StrictStr
|
|
7
4
|
|
|
8
5
|
from mm_eth import account, deploy
|
|
@@ -24,10 +21,8 @@ class Config(BaseConfig):
|
|
|
24
21
|
|
|
25
22
|
|
|
26
23
|
def run(config_path: str, *, print_config: bool) -> None:
|
|
27
|
-
config =
|
|
28
|
-
|
|
29
|
-
print_json(config.model_dump(exclude={"private_key"}))
|
|
30
|
-
sys.exit(0)
|
|
24
|
+
config = Config.read_config_or_exit(config_path)
|
|
25
|
+
cli_utils.print_config_and_exit(print_config, config, {"private_key"})
|
|
31
26
|
|
|
32
27
|
constructor_types = yaml.full_load(config.constructor_types)
|
|
33
28
|
constructor_values = yaml.full_load(config.constructor_values)
|
|
@@ -5,7 +5,7 @@ from pathlib import Path
|
|
|
5
5
|
from typing import Self
|
|
6
6
|
|
|
7
7
|
from loguru import logger
|
|
8
|
-
from mm_std import BaseConfig, Err, Ok,
|
|
8
|
+
from mm_std import BaseConfig, Err, Ok, str_to_list, utc_now
|
|
9
9
|
from pydantic import Field, StrictStr, field_validator, model_validator
|
|
10
10
|
|
|
11
11
|
from mm_eth import abi, rpc
|
|
@@ -118,10 +118,8 @@ def run(
|
|
|
118
118
|
no_receipt: bool,
|
|
119
119
|
emulate: bool,
|
|
120
120
|
) -> None:
|
|
121
|
-
config =
|
|
122
|
-
|
|
123
|
-
print_json(config.model_dump(exclude={"private_key"}))
|
|
124
|
-
sys.exit(0)
|
|
121
|
+
config = Config.read_config_or_exit(config_path)
|
|
122
|
+
cli_utils.print_config_and_exit(print_config, config, {"private_key"})
|
|
125
123
|
|
|
126
124
|
cli_utils.init_logger(debug, config.log_debug, config.log_info)
|
|
127
125
|
rpc_helpers.check_nodes_for_chain_id(config.nodes, config.chain_id)
|
|
@@ -4,7 +4,7 @@ from pathlib import Path
|
|
|
4
4
|
from typing import Self
|
|
5
5
|
|
|
6
6
|
from loguru import logger
|
|
7
|
-
from mm_std import BaseConfig, Err, Ok, fatal,
|
|
7
|
+
from mm_std import BaseConfig, Err, Ok, fatal, str_to_list, utc_now
|
|
8
8
|
from pydantic import Field, StrictStr, field_validator, model_validator
|
|
9
9
|
|
|
10
10
|
from mm_eth import erc20, rpc
|
|
@@ -130,10 +130,8 @@ def run(
|
|
|
130
130
|
no_receipt: bool,
|
|
131
131
|
emulate: bool,
|
|
132
132
|
) -> None:
|
|
133
|
-
config =
|
|
134
|
-
|
|
135
|
-
print_json(config.model_dump(exclude={"private_key", "addresses_map"}))
|
|
136
|
-
sys.exit(0)
|
|
133
|
+
config = Config.read_config_or_exit(config_path)
|
|
134
|
+
cli_utils.print_config_and_exit(print_config, config, {"private_key", "addresses_map"})
|
|
137
135
|
|
|
138
136
|
cli_utils.init_logger(debug, config.log_debug, config.log_info)
|
|
139
137
|
rpc_helpers.check_nodes_for_chain_id(config.nodes, config.chain_id)
|
|
@@ -4,7 +4,7 @@ from pathlib import Path
|
|
|
4
4
|
from typing import Self
|
|
5
5
|
|
|
6
6
|
from loguru import logger
|
|
7
|
-
from mm_std import BaseConfig, Err, Ok,
|
|
7
|
+
from mm_std import BaseConfig, Err, Ok, str_to_list, utc_now
|
|
8
8
|
from pydantic import Field, StrictStr, field_validator, model_validator
|
|
9
9
|
|
|
10
10
|
from mm_eth import rpc
|
|
@@ -128,10 +128,8 @@ def run(
|
|
|
128
128
|
no_receipt: bool,
|
|
129
129
|
emulate: bool,
|
|
130
130
|
) -> None:
|
|
131
|
-
config =
|
|
132
|
-
|
|
133
|
-
print_json(config.model_dump(exclude={"private_key", "addresses_map"}))
|
|
134
|
-
sys.exit(0)
|
|
131
|
+
config = Config.read_config_or_exit(config_path)
|
|
132
|
+
cli_utils.print_config_and_exit(print_config, config, {"private_key", "addresses_map"})
|
|
135
133
|
|
|
136
134
|
cli_utils.init_logger(debug, config.log_debug, config.log_info)
|
|
137
135
|
rpc_helpers.check_nodes_for_chain_id(config.nodes, config.chain_id)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mm-eth
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Requires-Python: >=3.12
|
|
5
5
|
Requires-Dist: loguru~=0.7.3
|
|
6
|
-
Requires-Dist: mm-std~=0.1.
|
|
6
|
+
Requires-Dist: mm-std~=0.1.12
|
|
7
7
|
Requires-Dist: typer>=0.15.1
|
|
8
8
|
Requires-Dist: web3~=7.7.0
|
|
9
9
|
Requires-Dist: websocket-client~=1.8.0
|
|
@@ -16,32 +16,32 @@ mm_eth/vault.py,sha256=h8NyiOQh5YFskh1lZA3KyvnJUnxl9769ME2ChplG0CM,1477
|
|
|
16
16
|
mm_eth/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
mm_eth/cli/calcs.py,sha256=yDx3VgFmCLRYWpZVqyk_-mXIgTVFDPKGTktx-7H2XDw,4426
|
|
18
18
|
mm_eth/cli/cli.py,sha256=FfEgosWXa9gIGRuwSbPILvaDQ2Crh9hqTU50CqatvgY,8956
|
|
19
|
-
mm_eth/cli/cli_utils.py,sha256=
|
|
19
|
+
mm_eth/cli/cli_utils.py,sha256=jkw2hDzR2hrYKmY8egR4RicLHe4RFjC7yhShtA0HzhQ,3682
|
|
20
20
|
mm_eth/cli/print_helpers.py,sha256=yOiOFjTKloumwf07AqNIHQswUo8t0yuT9bpeGBGl60Q,1470
|
|
21
21
|
mm_eth/cli/rpc_helpers.py,sha256=tAJBUHwpH0jPvg0Hrm-cwpOrpp9GUb91e4ZdwixNUQg,4723
|
|
22
22
|
mm_eth/cli/validators.py,sha256=CWOXorI2HGajhLvQ354d2cCl5S3JC7tKUxWmmVn6j4Y,2417
|
|
23
23
|
mm_eth/cli/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
mm_eth/cli/cmd/balance_cmd.py,sha256=SjRSbGF8QFMBHncEyzPdVUi_rjOwNW2wxfbFsRBV2A0,2097
|
|
25
|
-
mm_eth/cli/cmd/balances_cmd.py,sha256=
|
|
26
|
-
mm_eth/cli/cmd/call_contract_cmd.py,sha256=
|
|
25
|
+
mm_eth/cli/cmd/balances_cmd.py,sha256=WIB9jhQP0Uut-JQ5H4gVouOxtUvQkqwobaidu4OvE60,4248
|
|
26
|
+
mm_eth/cli/cmd/call_contract_cmd.py,sha256=T6IHzxHuymJsEog2y7oMKNiHahip_W3FIk0adH4T0W4,1170
|
|
27
27
|
mm_eth/cli/cmd/config_example_cmd.py,sha256=hMfrFxjIP0xZllJRRxi99qhF8tzJI3lrp-XudFEWF1g,270
|
|
28
|
-
mm_eth/cli/cmd/deploy_cmd.py,sha256=
|
|
28
|
+
mm_eth/cli/cmd/deploy_cmd.py,sha256=nFJExEcKbm-6pE-r-XDY6pExOJywSSK7fN_gMZs9hc4,1173
|
|
29
29
|
mm_eth/cli/cmd/encode_input_data_cmd.py,sha256=9UQ1MKPEFQJ8j_COsP3KGKhwOf9tT3feBezI8vvxTlw,267
|
|
30
30
|
mm_eth/cli/cmd/mnemonic_cmd.py,sha256=Mb0H0inSNCa93GEPxGYQi7BnPe11mnLjnspfe7h54I4,972
|
|
31
31
|
mm_eth/cli/cmd/node_cmd.py,sha256=mUqixPGNHzuKCJvk1Fd5VaUGumpbR2AE7raGmXZscg4,1943
|
|
32
32
|
mm_eth/cli/cmd/private_key_cmd.py,sha256=Fv_2OLog1h32pIP7PJITwl_pHdy3BXvaDRcXZsxY1xo,241
|
|
33
33
|
mm_eth/cli/cmd/rpc_cmd.py,sha256=02q82YqgbPezfEBmV_QBCIeNReE7ktkPych8Xr9ann8,2186
|
|
34
|
-
mm_eth/cli/cmd/send_contract_cmd.py,sha256=
|
|
34
|
+
mm_eth/cli/cmd/send_contract_cmd.py,sha256=53MRNTWA4tMqMRwt_VUziR1W1m97fYhiBrvELreYraM,9091
|
|
35
35
|
mm_eth/cli/cmd/solc_cmd.py,sha256=tBpeMdPfGs2iQIMaIJAAhMh1a3KyXHwyninfXPVpsgs,677
|
|
36
36
|
mm_eth/cli/cmd/token_cmd.py,sha256=4y6ZQpLOJ33_iNuKpm9tZXh4RntWhmPUcizgaNNBzaw,1102
|
|
37
|
-
mm_eth/cli/cmd/transfer_erc20_cmd.py,sha256=
|
|
38
|
-
mm_eth/cli/cmd/transfer_eth_cmd.py,sha256=
|
|
37
|
+
mm_eth/cli/cmd/transfer_erc20_cmd.py,sha256=8IfLuqXV5OnPByrj3MTAsjyYn95X9f8IPKk0wHHcSPw,10246
|
|
38
|
+
mm_eth/cli/cmd/transfer_eth_cmd.py,sha256=_nX_iCg6XPa8xjM1EwjE2CX-iDLj2vx0jNVXYq3UlzI,9420
|
|
39
39
|
mm_eth/cli/cmd/vault_cmd.py,sha256=rRTclz0U6N_87KFsssdvZhi3_f6tmkHiYxMsIoVeBGc,532
|
|
40
40
|
mm_eth/cli/config_examples/balances.yml,sha256=fpXJfoOSqOrkoWpqO7-HrTTb5OBs9PM-PpZ1ulqWUnY,399
|
|
41
41
|
mm_eth/cli/config_examples/call_contract.yml,sha256=E0XuWuBnbhyTYfxNqaoxH6Cy7UCYqMLDwoEu_4OSV3M,233
|
|
42
42
|
mm_eth/cli/config_examples/transfer_erc20.yml,sha256=mCUpUfqzZjTvst8kqd3EGzJY0S7cr48ySqS6yZhzLdI,1324
|
|
43
43
|
mm_eth/cli/config_examples/transfer_eth.yml,sha256=i4hh3-LTcpl7JsrSuuM6gDi23B5ZnCeEnaYazQO3bzQ,1181
|
|
44
|
-
mm_eth-0.2.
|
|
45
|
-
mm_eth-0.2.
|
|
46
|
-
mm_eth-0.2.
|
|
47
|
-
mm_eth-0.2.
|
|
44
|
+
mm_eth-0.2.3.dist-info/METADATA,sha256=8FzuizpFSQqE8u73z4BDoTMQlE2S6cSxEj-iUyI_d_Q,228
|
|
45
|
+
mm_eth-0.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
46
|
+
mm_eth-0.2.3.dist-info/entry_points.txt,sha256=aGhpsozl8NIrkuUcX5fSgURCcDhr3ShUdeTSIrJq4oc,46
|
|
47
|
+
mm_eth-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|