mm-eth 0.2.2__tar.gz → 0.2.3__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.
- {mm_eth-0.2.2 → mm_eth-0.2.3}/PKG-INFO +2 -2
- {mm_eth-0.2.2 → mm_eth-0.2.3}/pyproject.toml +2 -2
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cli_utils.py +4 -7
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/balances_cmd.py +3 -7
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/call_contract_cmd.py +3 -7
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/deploy_cmd.py +3 -8
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/send_contract_cmd.py +3 -5
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/transfer_erc20_cmd.py +3 -5
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/transfer_eth_cmd.py +3 -5
- {mm_eth-0.2.2 → mm_eth-0.2.3}/uv.lock +4 -4
- {mm_eth-0.2.2 → mm_eth-0.2.3}/.gitignore +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/README.txt +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/justfile +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/__init__.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/abi.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/account.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/anvil.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/__init__.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/calcs.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cli.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/__init__.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/balance_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/config_example_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/encode_input_data_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/mnemonic_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/node_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/private_key_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/rpc_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/solc_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/token_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/cmd/vault_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/config_examples/balances.yml +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/config_examples/call_contract.yml +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/config_examples/transfer_erc20.yml +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/config_examples/transfer_eth.yml +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/print_helpers.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/rpc_helpers.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/cli/validators.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/deploy.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/ens.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/erc20.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/ethernodes.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/py.typed +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/rpc.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/solc.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/tx.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/types.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/utils.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/src/mm_eth/vault.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/__init__.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/cli/__init__.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/cli/cmd/__init__.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/cli/cmd/test_balance_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/cli/cmd/test_mnemonic_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/cli/cmd/test_node_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/cli/cmd/test_private_key_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/cli/cmd/test_solc_cmd.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/conftest.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/contracts/ERC20.sol +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/contracts/abi/ERC20.json +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/test_abi.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/test_account.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/test_ethernodes.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/test_rpc.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/test_tx.py +0 -0
- {mm_eth-0.2.2 → mm_eth-0.2.3}/tests/test_utils.py +0 -0
|
@@ -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
|
|
@@ -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)
|
|
@@ -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,
|
|
@@ -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)
|
|
@@ -730,7 +730,7 @@ wheels = [
|
|
|
730
730
|
|
|
731
731
|
[[package]]
|
|
732
732
|
name = "mm-eth"
|
|
733
|
-
version = "0.2.
|
|
733
|
+
version = "0.2.2"
|
|
734
734
|
source = { editable = "." }
|
|
735
735
|
dependencies = [
|
|
736
736
|
{ name = "loguru" },
|
|
@@ -754,7 +754,7 @@ dev = [
|
|
|
754
754
|
[package.metadata]
|
|
755
755
|
requires-dist = [
|
|
756
756
|
{ name = "loguru", specifier = "~=0.7.3" },
|
|
757
|
-
{ name = "mm-std", specifier = "~=0.1.
|
|
757
|
+
{ name = "mm-std", specifier = "~=0.1.12" },
|
|
758
758
|
{ name = "typer", specifier = ">=0.15.1" },
|
|
759
759
|
{ name = "web3", specifier = "~=7.7.0" },
|
|
760
760
|
{ name = "websocket-client", specifier = "~=1.8.0" },
|
|
@@ -773,7 +773,7 @@ dev = [
|
|
|
773
773
|
|
|
774
774
|
[[package]]
|
|
775
775
|
name = "mm-std"
|
|
776
|
-
version = "0.1.
|
|
776
|
+
version = "0.1.12"
|
|
777
777
|
source = { registry = "https://pypi.org/simple" }
|
|
778
778
|
dependencies = [
|
|
779
779
|
{ name = "cryptography" },
|
|
@@ -785,7 +785,7 @@ dependencies = [
|
|
|
785
785
|
{ name = "rich" },
|
|
786
786
|
]
|
|
787
787
|
wheels = [
|
|
788
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
788
|
+
{ url = "https://files.pythonhosted.org/packages/ca/18/ea37b98761b2d39ff2d45e985e4ef5eedae08a421cee3ee19088a9c0da03/mm_std-0.1.12-py3-none-any.whl", hash = "sha256:2e3d3ed745755096cecf9690ca2fb772abed1a4064935717ce3c8824b7cabd83", size = 14699 },
|
|
789
789
|
]
|
|
790
790
|
|
|
791
791
|
[[package]]
|
|
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
|
|
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
|
|
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
|
|
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
|