mm-sol 0.2.9__py3-none-any.whl → 0.2.10__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_sol/cli/cmd/transfer_sol_cmd.py +9 -2
- mm_sol/cli/cmd/transfer_token_cmd.py +9 -2
- {mm_sol-0.2.9.dist-info → mm_sol-0.2.10.dist-info}/METADATA +1 -1
- {mm_sol-0.2.9.dist-info → mm_sol-0.2.10.dist-info}/RECORD +6 -6
- {mm_sol-0.2.9.dist-info → mm_sol-0.2.10.dist-info}/WHEEL +0 -0
- {mm_sol-0.2.9.dist-info → mm_sol-0.2.10.dist-info}/entry_points.txt +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import time
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import Annotated
|
|
4
|
+
from typing import Annotated, Self
|
|
5
5
|
|
|
6
6
|
import mm_crypto_utils
|
|
7
7
|
from loguru import logger
|
|
8
8
|
from mm_crypto_utils import AddressToPrivate, TxRoute
|
|
9
9
|
from mm_std import BaseConfig, Err, utc_now
|
|
10
|
-
from pydantic import AfterValidator, BeforeValidator
|
|
10
|
+
from pydantic import AfterValidator, BeforeValidator, model_validator
|
|
11
11
|
|
|
12
12
|
from mm_sol import transfer
|
|
13
13
|
from mm_sol.cli import calcs, cli_utils
|
|
@@ -33,6 +33,13 @@ class Config(BaseConfig):
|
|
|
33
33
|
def from_addresses(self) -> list[str]:
|
|
34
34
|
return [r.from_address for r in self.routes]
|
|
35
35
|
|
|
36
|
+
@model_validator(mode="after")
|
|
37
|
+
def final_validator(self) -> Self:
|
|
38
|
+
if not self.private_keys.contains_all_addresses(self.from_addresses):
|
|
39
|
+
raise ValueError("private keys are not set for all addresses")
|
|
40
|
+
|
|
41
|
+
return self
|
|
42
|
+
|
|
36
43
|
|
|
37
44
|
def run(
|
|
38
45
|
config_path: str,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import time
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import Annotated
|
|
4
|
+
from typing import Annotated, Self
|
|
5
5
|
|
|
6
6
|
import mm_crypto_utils
|
|
7
7
|
import typer
|
|
8
8
|
from loguru import logger
|
|
9
9
|
from mm_crypto_utils import AddressToPrivate, TxRoute
|
|
10
10
|
from mm_std import BaseConfig, Err, fatal, utc_now
|
|
11
|
-
from pydantic import AfterValidator, BeforeValidator
|
|
11
|
+
from pydantic import AfterValidator, BeforeValidator, model_validator
|
|
12
12
|
|
|
13
13
|
from mm_sol import transfer
|
|
14
14
|
from mm_sol.cli import calcs, cli_utils
|
|
@@ -35,6 +35,13 @@ class Config(BaseConfig):
|
|
|
35
35
|
def from_addresses(self) -> list[str]:
|
|
36
36
|
return [r.from_address for r in self.routes]
|
|
37
37
|
|
|
38
|
+
@model_validator(mode="after")
|
|
39
|
+
def final_validator(self) -> Self:
|
|
40
|
+
if not self.private_keys.contains_all_addresses(self.from_addresses):
|
|
41
|
+
raise ValueError("private keys are not set for all addresses")
|
|
42
|
+
|
|
43
|
+
return self
|
|
44
|
+
|
|
38
45
|
|
|
39
46
|
def run(
|
|
40
47
|
config_path: str,
|
|
@@ -20,15 +20,15 @@ mm_sol/cli/cmd/balance_cmd.py,sha256=DfUZY3-Hr-F7Y0xp1faol0yLnPu6iDU3b839VhdwAbw
|
|
|
20
20
|
mm_sol/cli/cmd/balances_cmd.py,sha256=P2WRCqJXKo36Pqfe-ZrpguggVmpXTMXr-hQeji6-Bb0,2184
|
|
21
21
|
mm_sol/cli/cmd/example_cmd.py,sha256=bK_z4du0UPGAoiHnYdi6iaZim_kKlYw4NKBbzvyes28,221
|
|
22
22
|
mm_sol/cli/cmd/node_cmd.py,sha256=2AEAjq2M9f8-RZiI0rif6wITdns9QUb4Kr34QPsI2CA,238
|
|
23
|
-
mm_sol/cli/cmd/transfer_sol_cmd.py,sha256=
|
|
24
|
-
mm_sol/cli/cmd/transfer_token_cmd.py,sha256=
|
|
23
|
+
mm_sol/cli/cmd/transfer_sol_cmd.py,sha256=XViB1kOlTNQH97w2LMJqSLeGXjmlGme2oclsC3YYnu0,5307
|
|
24
|
+
mm_sol/cli/cmd/transfer_token_cmd.py,sha256=S6lc4WNOueIbBHsenVCb3USMYgnfLZRAqwdfrmWa-Aw,5905
|
|
25
25
|
mm_sol/cli/cmd/wallet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
mm_sol/cli/cmd/wallet/keypair_cmd.py,sha256=cRHVVTs9zNYmUozZ8ZlJoutn9V6r8I1AEHBrszR7dTE,538
|
|
27
27
|
mm_sol/cli/cmd/wallet/new_cmd.py,sha256=hcP9NZPkwYkTBEvT5rBntFtCIvx1QnPGn5FUDnvz5sM,425
|
|
28
28
|
mm_sol/cli/examples/balances.yml,sha256=SoFcf_IhgA2zrbihrVpqm-ikes80wLFGVzafrjO00UY,290
|
|
29
29
|
mm_sol/cli/examples/transfer-sol.yml,sha256=d0kO2FHNEXMD6WSjOk6X7PtDuaGAAQWn098k8z5bgbs,347
|
|
30
30
|
mm_sol/cli/examples/transfer-token.yml,sha256=d8-3GE6NeM5zXo9S6WA8OP6pHjoEZvf7mtu9JwS5SZY,392
|
|
31
|
-
mm_sol-0.2.
|
|
32
|
-
mm_sol-0.2.
|
|
33
|
-
mm_sol-0.2.
|
|
34
|
-
mm_sol-0.2.
|
|
31
|
+
mm_sol-0.2.10.dist-info/METADATA,sha256=EbvFT67OEIkpAFzWtlji3mIy0X2hMzmVUUfympmdsdM,231
|
|
32
|
+
mm_sol-0.2.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
33
|
+
mm_sol-0.2.10.dist-info/entry_points.txt,sha256=MrYnosumy9nsITSAw5TiR3WXDwsdoF0YvUIlZ38TLLs,46
|
|
34
|
+
mm_sol-0.2.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|