multiversx-sdk-cli 9.8.0__tar.gz → 9.9.0__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.
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/PKG-INFO +3 -4
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/accounts.py +3 -3
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli.py +3 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_accounts.py +3 -1
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_contracts.py +6 -10
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_delegation.py +3 -1
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_dns.py +14 -7
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_shared.py +14 -5
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_transactions.py +10 -10
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_wallet.py +7 -4
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/config.py +11 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/constants.py +1 -2
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/contracts.py +3 -3
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dns.py +5 -4
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/interfaces.py +1 -6
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/sign_verify.py +2 -2
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/transactions.py +1 -1
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/pyproject.toml +2 -2
- multiversx_sdk_cli-9.8.0/multiversx_sdk_cli/custom_network_provider.py +0 -36
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/.gitignore +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/LICENSE +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/README.md +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/.vscode/settings.json +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_config.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_data.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_deps.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_faucet.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_ledger.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_localnet.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_output.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_password.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_validators.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/contract_verification.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cosign_transaction.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/delegation/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/delegation/staking_provider.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/install.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/modules.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/resolution.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependency_checker.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/docker.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/downloader.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/errors.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/guards.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/config.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/ledger_app_handler.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/ledger_functions.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_default.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_general.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_networking.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_part.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_root.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_sharding.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_software.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/constants.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis_json.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis_smart_contracts_json.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/libraries.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/node.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/node_config_toml.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/nodes_setup_json.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/p2p_toml.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/seednode_p2pKey.pem +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_build_software.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_clean.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_config.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_new.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_prerequisites.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_start.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/wallets.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/myprocess.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/native_auth_client.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/constants.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/core.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/interfaces.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/migrations.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_base.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_rust.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/common.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/extracted_feature.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/folder_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/project_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/data/wasm_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/do_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/features.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/report_option.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/size.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/features/twiggy_paths_check.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/format/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/format/change_type.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/format/format_options.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/report_creator.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/shared.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/templates.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/simulation.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/utils.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ux.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/core.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/validators_file.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/version.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/workstation.py +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: multiversx-sdk-cli
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.9.0
|
|
4
4
|
Summary: MultiversX Smart Contracts Tools
|
|
5
5
|
Project-URL: Homepage, https://github.com/multiversx/mx-sdk-py-cli
|
|
6
6
|
Author: MultiversX
|
|
7
|
-
License
|
|
8
|
-
License-File: LICENSE
|
|
7
|
+
License: MIT
|
|
9
8
|
Classifier: Intended Audience :: Developers
|
|
10
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
10
|
Classifier: Operating System :: OS Independent
|
|
@@ -13,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
13
12
|
Requires-Python: >=3.8
|
|
14
13
|
Requires-Dist: argcomplete==3.2.2
|
|
15
14
|
Requires-Dist: ledgercomm[hid]
|
|
16
|
-
Requires-Dist: multiversx-sdk==0.
|
|
15
|
+
Requires-Dist: multiversx-sdk==0.19.0
|
|
17
16
|
Requires-Dist: prettytable
|
|
18
17
|
Requires-Dist: requests-cache
|
|
19
18
|
Requires-Dist: requests<3.0.0,>=2.32.0
|
|
@@ -6,7 +6,7 @@ from multiversx_sdk import (Address, Message, MessageComputer,
|
|
|
6
6
|
TransactionComputer, UserSigner)
|
|
7
7
|
from multiversx_sdk.network_providers.accounts import AccountOnNetwork
|
|
8
8
|
|
|
9
|
-
from multiversx_sdk_cli.
|
|
9
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
10
10
|
from multiversx_sdk_cli.interfaces import IAccount, IAddress, ITransaction
|
|
11
11
|
from multiversx_sdk_cli.ledger.config import compare_versions
|
|
12
12
|
from multiversx_sdk_cli.ledger.ledger_app_handler import \
|
|
@@ -61,11 +61,11 @@ class Account(AccountBase):
|
|
|
61
61
|
if pem_file:
|
|
62
62
|
pem_path = Path(pem_file).expanduser().resolve()
|
|
63
63
|
self.signer = UserSigner.from_pem_file(pem_path, pem_index)
|
|
64
|
-
self.address = Address(self.signer.get_pubkey().buffer,
|
|
64
|
+
self.address = Address(self.signer.get_pubkey().buffer, get_address_hrp())
|
|
65
65
|
elif key_file and password:
|
|
66
66
|
key_file_path = Path(key_file).expanduser().resolve()
|
|
67
67
|
self.signer = UserSigner.from_wallet(key_file_path, password)
|
|
68
|
-
self.address = Address(self.signer.get_pubkey().buffer,
|
|
68
|
+
self.address = Address(self.signer.get_pubkey().buffer, get_address_hrp())
|
|
69
69
|
|
|
70
70
|
def sign_transaction(self, transaction: ITransaction) -> str:
|
|
71
71
|
assert self.signer is not None
|
|
@@ -6,6 +6,7 @@ from argparse import ArgumentParser
|
|
|
6
6
|
from typing import Any, List
|
|
7
7
|
|
|
8
8
|
import argcomplete
|
|
9
|
+
from multiversx_sdk import LibraryConfig
|
|
9
10
|
from rich.logging import RichHandler
|
|
10
11
|
|
|
11
12
|
import multiversx_sdk_cli.cli_accounts
|
|
@@ -53,6 +54,8 @@ def _do_main(cli_args: List[str]):
|
|
|
53
54
|
logging.basicConfig(level="INFO", format='%(name)s: %(message)s', handlers=[RichHandler(show_time=False, rich_tracebacks=True)])
|
|
54
55
|
|
|
55
56
|
verify_deprecated_entries_in_config_file()
|
|
57
|
+
default_hrp = config.get_address_hrp()
|
|
58
|
+
LibraryConfig.default_address_hrp = default_hrp
|
|
56
59
|
|
|
57
60
|
if not hasattr(args, "func"):
|
|
58
61
|
parser.print_help()
|
|
@@ -4,6 +4,7 @@ from typing import Any
|
|
|
4
4
|
from multiversx_sdk import Address, ProxyNetworkProvider
|
|
5
5
|
|
|
6
6
|
from multiversx_sdk_cli import cli_shared, utils
|
|
7
|
+
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
7
8
|
|
|
8
9
|
logger = logging.getLogger("cli.accounts")
|
|
9
10
|
|
|
@@ -33,7 +34,8 @@ def _add_address_arg(sub: Any):
|
|
|
33
34
|
def get_account(args: Any):
|
|
34
35
|
proxy_url = args.proxy
|
|
35
36
|
address = args.address
|
|
36
|
-
|
|
37
|
+
config = get_config_for_network_providers()
|
|
38
|
+
proxy = ProxyNetworkProvider(url=proxy_url, config=config)
|
|
37
39
|
account = proxy.get_account(Address.new_from_bech32(address))
|
|
38
40
|
|
|
39
41
|
if args.balance:
|
|
@@ -10,6 +10,7 @@ from multiversx_sdk.abi import Abi
|
|
|
10
10
|
|
|
11
11
|
from multiversx_sdk_cli import cli_shared, projects, utils
|
|
12
12
|
from multiversx_sdk_cli.cli_output import CLIOutputBuilder
|
|
13
|
+
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
13
14
|
from multiversx_sdk_cli.constants import NUMBER_OF_SHARDS
|
|
14
15
|
from multiversx_sdk_cli.contract_verification import \
|
|
15
16
|
trigger_contract_verification
|
|
@@ -100,7 +101,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
100
101
|
cli_shared.add_tx_args(args, sub, with_receiver=False, with_data=False)
|
|
101
102
|
_add_function_arg(sub)
|
|
102
103
|
_add_arguments_arg(sub)
|
|
103
|
-
|
|
104
|
+
cli_shared.add_token_transfers_args(sub)
|
|
104
105
|
sub.add_argument("--wait-result", action="store_true", default=False,
|
|
105
106
|
help="signal to wait for the transaction result - only valid if --send is set")
|
|
106
107
|
sub.add_argument("--timeout", default=100, help="max num of seconds to wait for result"
|
|
@@ -243,12 +244,6 @@ def _add_arguments_arg(sub: Any):
|
|
|
243
244
|
"E.g. [{ 'to': 'erd1...', 'amount': 10000000000 }]")
|
|
244
245
|
|
|
245
246
|
|
|
246
|
-
def _add_token_transfers_args(sub: Any):
|
|
247
|
-
sub.add_argument("--token-transfers", nargs='+',
|
|
248
|
-
help="token transfers for transfer & execute, as [token, amount] "
|
|
249
|
-
"E.g. --token-transfers NFT-123456-0a 1 ESDT-987654 100000000")
|
|
250
|
-
|
|
251
|
-
|
|
252
247
|
def _add_metadata_arg(sub: Any):
|
|
253
248
|
sub.add_argument("--metadata-not-upgradeable", dest="metadata_upgradeable", action="store_false",
|
|
254
249
|
help="‼ mark the contract as NOT upgradeable (default: upgradeable)")
|
|
@@ -448,14 +443,15 @@ def query(args: Any):
|
|
|
448
443
|
args.chain = ""
|
|
449
444
|
cli_shared.prepare_chain_id_in_args(args)
|
|
450
445
|
|
|
451
|
-
|
|
446
|
+
factory_config = TransactionsFactoryConfig(args.chain)
|
|
452
447
|
abi = Abi.load(Path(args.abi)) if args.abi else None
|
|
453
|
-
contract = SmartContract(
|
|
448
|
+
contract = SmartContract(factory_config, abi)
|
|
454
449
|
|
|
455
450
|
arguments, should_prepare_args = _get_contract_arguments(args)
|
|
456
451
|
contract_address = Address.new_from_bech32(args.contract)
|
|
457
452
|
|
|
458
|
-
|
|
453
|
+
network_provider_config = get_config_for_network_providers()
|
|
454
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=network_provider_config)
|
|
459
455
|
function = args.function
|
|
460
456
|
|
|
461
457
|
result = contract.query_contract(
|
|
@@ -3,6 +3,7 @@ from typing import Any, List
|
|
|
3
3
|
from multiversx_sdk import ProxyNetworkProvider, TransactionsFactoryConfig
|
|
4
4
|
|
|
5
5
|
from multiversx_sdk_cli import cli_shared, errors, utils
|
|
6
|
+
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
6
7
|
from multiversx_sdk_cli.delegation import DelegationOperations
|
|
7
8
|
|
|
8
9
|
|
|
@@ -209,7 +210,8 @@ def do_create_delegation_contract(args: Any):
|
|
|
209
210
|
def get_contract_address_by_deploy_tx_hash(args: Any):
|
|
210
211
|
args = utils.as_object(args)
|
|
211
212
|
|
|
212
|
-
|
|
213
|
+
config = get_config_for_network_providers()
|
|
214
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=config)
|
|
213
215
|
|
|
214
216
|
transaction = proxy.get_transaction(args.create_tx_hash)
|
|
215
217
|
transaction_events = transaction.logs.events
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from typing import Any, List
|
|
2
2
|
|
|
3
|
-
from multiversx_sdk import
|
|
3
|
+
from multiversx_sdk import ProxyNetworkProvider
|
|
4
4
|
from prettytable import PrettyTable
|
|
5
5
|
|
|
6
6
|
from multiversx_sdk_cli import cli_shared
|
|
7
|
-
from multiversx_sdk_cli.
|
|
7
|
+
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
8
|
+
from multiversx_sdk_cli.constants import ADDRESS_ZERO_HEX
|
|
8
9
|
from multiversx_sdk_cli.dns import (compute_dns_address_for_shard_id,
|
|
9
10
|
dns_address_for_name, name_hash, register,
|
|
10
11
|
registration_cost, resolve, validate_name,
|
|
@@ -79,14 +80,17 @@ def _ensure_proxy_is_provided(args: Any):
|
|
|
79
80
|
def dns_resolve(args: Any):
|
|
80
81
|
_ensure_proxy_is_provided(args)
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
config = get_config_for_network_providers()
|
|
84
|
+
addr = resolve(args.name, ProxyNetworkProvider(url=args.proxy, config=config))
|
|
85
|
+
if addr.to_hex() != ADDRESS_ZERO_HEX:
|
|
84
86
|
print(addr.to_bech32())
|
|
85
87
|
|
|
86
88
|
|
|
87
89
|
def dns_validate_name(args: Any):
|
|
88
90
|
_ensure_proxy_is_provided(args)
|
|
89
|
-
|
|
91
|
+
|
|
92
|
+
config = get_config_for_network_providers()
|
|
93
|
+
validate_name(args.name, args.shard_id, ProxyNetworkProvider(url=args.proxy, config=config))
|
|
90
94
|
|
|
91
95
|
|
|
92
96
|
def get_name_hash(args: Any):
|
|
@@ -107,13 +111,16 @@ def get_dns_address_for_name_hex(args: Any):
|
|
|
107
111
|
|
|
108
112
|
def get_registration_cost(args: Any):
|
|
109
113
|
_ensure_proxy_is_provided(args)
|
|
110
|
-
|
|
114
|
+
|
|
115
|
+
config = get_config_for_network_providers()
|
|
116
|
+
print(registration_cost(args.shard_id, ProxyNetworkProvider(url=args.proxy, config=config)))
|
|
111
117
|
|
|
112
118
|
|
|
113
119
|
def get_version(args: Any):
|
|
114
120
|
_ensure_proxy_is_provided(args)
|
|
115
121
|
|
|
116
|
-
|
|
122
|
+
config = get_config_for_network_providers()
|
|
123
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=config)
|
|
117
124
|
if args.all:
|
|
118
125
|
t = PrettyTable(['Shard ID', 'Contract address (bech32)', 'Contract address (hex)', 'Version'])
|
|
119
126
|
for shard_id in range(0, 256):
|
|
@@ -14,7 +14,6 @@ from multiversx_sdk_cli.cli_password import (load_guardian_password,
|
|
|
14
14
|
load_password)
|
|
15
15
|
from multiversx_sdk_cli.constants import (DEFAULT_TX_VERSION,
|
|
16
16
|
TRANSACTION_OPTIONS_TX_GUARDED)
|
|
17
|
-
from multiversx_sdk_cli.custom_network_provider import CustomNetworkProvider
|
|
18
17
|
from multiversx_sdk_cli.errors import ArgumentsNotProvidedError
|
|
19
18
|
from multiversx_sdk_cli.interfaces import ITransaction
|
|
20
19
|
from multiversx_sdk_cli.ledger.ledger_functions import do_get_ledger_address
|
|
@@ -141,6 +140,12 @@ def add_omit_fields_arg(sub: Any):
|
|
|
141
140
|
sub.add_argument("--omit-fields", default="[]", type=str, required=False, help="omit fields in the output payload (default: %(default)s)")
|
|
142
141
|
|
|
143
142
|
|
|
143
|
+
def add_token_transfers_args(sub: Any):
|
|
144
|
+
sub.add_argument("--token-transfers", nargs='+',
|
|
145
|
+
help="token transfers for transfer & execute, as [token, amount] "
|
|
146
|
+
"E.g. --token-transfers NFT-123456-0a 1 ESDT-987654 100000000")
|
|
147
|
+
|
|
148
|
+
|
|
144
149
|
def parse_omit_fields_arg(args: Any) -> List[str]:
|
|
145
150
|
literal = args.omit_fields
|
|
146
151
|
parsed = ast.literal_eval(literal)
|
|
@@ -182,7 +187,8 @@ def prepare_nonce_in_args(args: Any):
|
|
|
182
187
|
|
|
183
188
|
if args.recall_nonce:
|
|
184
189
|
account = prepare_account(args)
|
|
185
|
-
|
|
190
|
+
network_provider_config = config.get_config_for_network_providers()
|
|
191
|
+
account.sync_nonce(ProxyNetworkProvider(url=args.proxy, config=network_provider_config))
|
|
186
192
|
args.nonce = account.nonce
|
|
187
193
|
|
|
188
194
|
|
|
@@ -191,7 +197,8 @@ def prepare_chain_id_in_args(args: Any):
|
|
|
191
197
|
raise ArgumentsNotProvidedError("chain ID cannot be decided: `--chain` or `--proxy` should be provided")
|
|
192
198
|
|
|
193
199
|
if args.chain and args.proxy:
|
|
194
|
-
|
|
200
|
+
network_provider_config = config.get_config_for_network_providers()
|
|
201
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=network_provider_config)
|
|
195
202
|
fetched_chain_id = proxy.get_network_config().chain_id
|
|
196
203
|
|
|
197
204
|
if args.chain != fetched_chain_id:
|
|
@@ -204,7 +211,8 @@ def prepare_chain_id_in_args(args: Any):
|
|
|
204
211
|
if args.chain:
|
|
205
212
|
return
|
|
206
213
|
elif args.proxy:
|
|
207
|
-
|
|
214
|
+
network_provider_config = config.get_config_for_network_providers()
|
|
215
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=network_provider_config)
|
|
208
216
|
args.chain = proxy.get_network_config().chain_id
|
|
209
217
|
|
|
210
218
|
|
|
@@ -253,7 +261,8 @@ def check_options_for_guarded_tx(options: int):
|
|
|
253
261
|
|
|
254
262
|
|
|
255
263
|
def send_or_simulate(tx: ITransaction, args: Any, dump_output: bool = True) -> CLIOutputBuilder:
|
|
256
|
-
|
|
264
|
+
network_provider_config = config.get_config_for_network_providers()
|
|
265
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=network_provider_config)
|
|
257
266
|
|
|
258
267
|
is_set_wait_result = hasattr(args, "wait_result") and args.wait_result
|
|
259
268
|
is_set_send = hasattr(args, "send") and args.send
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cli_transactions.py
RENAMED
|
@@ -2,10 +2,12 @@ import logging
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
from typing import Any, List
|
|
4
4
|
|
|
5
|
+
from multiversx_sdk import ProxyNetworkProvider
|
|
6
|
+
|
|
5
7
|
from multiversx_sdk_cli import cli_shared, utils
|
|
6
8
|
from multiversx_sdk_cli.cli_output import CLIOutputBuilder
|
|
9
|
+
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
7
10
|
from multiversx_sdk_cli.cosign_transaction import cosign_transaction
|
|
8
|
-
from multiversx_sdk_cli.custom_network_provider import CustomNetworkProvider
|
|
9
11
|
from multiversx_sdk_cli.errors import NoWalletProvided
|
|
10
12
|
from multiversx_sdk_cli.transactions import (compute_relayed_v1_data,
|
|
11
13
|
do_prepare_transaction,
|
|
@@ -20,7 +22,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
20
22
|
|
|
21
23
|
sub = cli_shared.add_command_subparser(subparsers, "tx", "new", f"Create a new transaction.{CLIOutputBuilder.describe()}")
|
|
22
24
|
_add_common_arguments(args, sub)
|
|
23
|
-
|
|
25
|
+
cli_shared.add_token_transfers_args(sub)
|
|
24
26
|
cli_shared.add_outfile_arg(sub, what="signed transaction, hash")
|
|
25
27
|
cli_shared.add_broadcast_args(sub, relay=True)
|
|
26
28
|
cli_shared.add_proxy_arg(sub)
|
|
@@ -65,12 +67,6 @@ def _add_common_arguments(args: List[str], sub: Any):
|
|
|
65
67
|
sub.add_argument("--data-file", type=str, default=None, help="a file containing transaction data")
|
|
66
68
|
|
|
67
69
|
|
|
68
|
-
def _add_token_transfers_args(sub: Any):
|
|
69
|
-
sub.add_argument("--token-transfers", nargs='+',
|
|
70
|
-
help="token transfers for transfer & execute, as [token, amount] "
|
|
71
|
-
"E.g. --token-transfers NFT-123456-0a 1 ESDT-987654 100000000")
|
|
72
|
-
|
|
73
|
-
|
|
74
70
|
def create_transaction(args: Any):
|
|
75
71
|
args = utils.as_object(args)
|
|
76
72
|
|
|
@@ -97,7 +93,9 @@ def send_transaction(args: Any):
|
|
|
97
93
|
|
|
98
94
|
tx = load_transaction_from_file(args.infile)
|
|
99
95
|
output = CLIOutputBuilder()
|
|
100
|
-
|
|
96
|
+
|
|
97
|
+
config = get_config_for_network_providers()
|
|
98
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=config)
|
|
101
99
|
|
|
102
100
|
try:
|
|
103
101
|
tx_hash = proxy.send_transaction(tx)
|
|
@@ -110,7 +108,9 @@ def send_transaction(args: Any):
|
|
|
110
108
|
def get_transaction(args: Any):
|
|
111
109
|
args = utils.as_object(args)
|
|
112
110
|
omit_fields = cli_shared.parse_omit_fields_arg(args)
|
|
113
|
-
|
|
111
|
+
|
|
112
|
+
config = get_config_for_network_providers()
|
|
113
|
+
proxy = ProxyNetworkProvider(url=args.proxy, config=config)
|
|
114
114
|
|
|
115
115
|
transaction = proxy.get_transaction(args.hash, True)
|
|
116
116
|
output = CLIOutputBuilder().set_transaction_on_network(transaction, omit_fields).build()
|
|
@@ -10,7 +10,8 @@ from multiversx_sdk import (Address, Mnemonic, UserPEM, UserSecretKey,
|
|
|
10
10
|
from multiversx_sdk.core.address import get_shard_of_pubkey
|
|
11
11
|
|
|
12
12
|
from multiversx_sdk_cli import cli_shared, utils
|
|
13
|
-
from multiversx_sdk_cli.
|
|
13
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
14
|
+
from multiversx_sdk_cli.constants import NUMBER_OF_SHARDS
|
|
14
15
|
from multiversx_sdk_cli.errors import (BadUserInput, KnownError,
|
|
15
16
|
WalletGenerationError)
|
|
16
17
|
from multiversx_sdk_cli.sign_verify import SignedMessage, sign_message
|
|
@@ -54,7 +55,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
54
55
|
)
|
|
55
56
|
sub.add_argument("--format", choices=WALLET_FORMATS, help="the format of the generated wallet file (default: %(default)s)", default=None)
|
|
56
57
|
sub.add_argument("--outfile", help="the output path and base file name for the generated wallet files (default: %(default)s)", type=str)
|
|
57
|
-
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=
|
|
58
|
+
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=get_address_hrp())
|
|
58
59
|
sub.add_argument("--shard", type=int, help="the shard in which the address will be generated; (default: random)")
|
|
59
60
|
sub.set_defaults(func=wallet_new)
|
|
60
61
|
|
|
@@ -69,7 +70,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
69
70
|
sub.add_argument("--in-format", required=True, choices=WALLET_FORMATS, help="the format of the input file")
|
|
70
71
|
sub.add_argument("--out-format", required=True, choices=WALLET_FORMATS_AND_ADDRESSES, help="the format of the output file")
|
|
71
72
|
sub.add_argument("--address-index", help=f"the address index, if input format is {WALLET_FORMAT_RAW_MNEMONIC}, {WALLET_FORMAT_KEYSTORE_MNEMONIC} or {WALLET_FORMAT_PEM} (with multiple entries) and the output format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM}", type=int, default=0)
|
|
72
|
-
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when the output format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=
|
|
73
|
+
sub.add_argument("--address-hrp", help=f"the human-readable part of the address, when the output format is {WALLET_FORMAT_KEYSTORE_SECRET_KEY} or {WALLET_FORMAT_PEM} (default: %(default)s)", type=str, default=get_address_hrp())
|
|
73
74
|
sub.set_defaults(func=convert_wallet)
|
|
74
75
|
|
|
75
76
|
sub = cli_shared.add_command_subparser(
|
|
@@ -82,6 +83,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
82
83
|
group = sub.add_mutually_exclusive_group(required=True)
|
|
83
84
|
group.add_argument("--encode", action="store_true", help="whether to encode")
|
|
84
85
|
group.add_argument("--decode", action="store_true", help="whether to decode")
|
|
86
|
+
sub.add_argument("--hrp", type=str, help="the human readable part; only used for encoding to bech32 (default: %(default)s)", default=get_address_hrp())
|
|
85
87
|
sub.set_defaults(func=do_bech32)
|
|
86
88
|
|
|
87
89
|
sub = cli_shared.add_command_subparser(
|
|
@@ -288,7 +290,8 @@ def do_bech32(args: Any):
|
|
|
288
290
|
value = args.value
|
|
289
291
|
|
|
290
292
|
if encode:
|
|
291
|
-
|
|
293
|
+
hrp = args.hrp
|
|
294
|
+
address = Address.new_from_hex(value, hrp)
|
|
292
295
|
result = address.to_bech32()
|
|
293
296
|
else:
|
|
294
297
|
address = Address.new_from_bech32(value)
|
|
@@ -2,6 +2,8 @@ import os
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
from typing import Any, Dict, List
|
|
4
4
|
|
|
5
|
+
from multiversx_sdk import NetworkProviderConfig
|
|
6
|
+
|
|
5
7
|
from multiversx_sdk_cli import errors, utils
|
|
6
8
|
|
|
7
9
|
SDK_PATH = Path("~/multiversx-sdk").expanduser().resolve()
|
|
@@ -58,6 +60,10 @@ def get_value(name: str) -> str:
|
|
|
58
60
|
return value
|
|
59
61
|
|
|
60
62
|
|
|
63
|
+
def get_address_hrp():
|
|
64
|
+
return get_value("default_address_hrp")
|
|
65
|
+
|
|
66
|
+
|
|
61
67
|
def set_value(name: str, value: Any):
|
|
62
68
|
_guard_valid_name(name)
|
|
63
69
|
data = read_file()
|
|
@@ -160,6 +166,7 @@ def get_defaults() -> Dict[str, Any]:
|
|
|
160
166
|
"dependencies.testwallets.urlTemplate.windows": "https://github.com/multiversx/mx-sdk-testwallets/archive/{TAG}.tar.gz",
|
|
161
167
|
"dependencies.wasm-opt.tag": "0.112.0",
|
|
162
168
|
"github_api_token": "",
|
|
169
|
+
"default_address_hrp": "erd"
|
|
163
170
|
}
|
|
164
171
|
|
|
165
172
|
|
|
@@ -242,3 +249,7 @@ def get_dependency_directory(key: str, tag: str) -> Path:
|
|
|
242
249
|
|
|
243
250
|
def get_dependency_parent_directory(key: str) -> Path:
|
|
244
251
|
return SDK_PATH / key
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def get_config_for_network_providers() -> NetworkProviderConfig:
|
|
255
|
+
return NetworkProviderConfig(client_name="mxpy")
|
|
@@ -9,7 +9,6 @@ ONE_YEAR_IN_SECONDS = 60 * 60 * 24 * 365
|
|
|
9
9
|
|
|
10
10
|
DEFAULT_TX_VERSION = 2
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
ADDRESS_ZERO_BECH32 = "erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu"
|
|
12
|
+
ADDRESS_ZERO_HEX = "0000000000000000000000000000000000000000000000000000000000000000"
|
|
14
13
|
|
|
15
14
|
NUMBER_OF_SHARDS = 3
|
|
@@ -11,7 +11,7 @@ from multiversx_sdk.abi import Abi
|
|
|
11
11
|
|
|
12
12
|
from multiversx_sdk_cli import errors
|
|
13
13
|
from multiversx_sdk_cli.accounts import Account
|
|
14
|
-
from multiversx_sdk_cli.
|
|
14
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
15
15
|
from multiversx_sdk_cli.interfaces import IAddress
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger("contracts")
|
|
@@ -211,7 +211,7 @@ class SmartContract:
|
|
|
211
211
|
args.append(self._hex_to_bytes(arg))
|
|
212
212
|
elif arg.isnumeric():
|
|
213
213
|
args.append(int(arg))
|
|
214
|
-
elif arg.startswith(
|
|
214
|
+
elif arg.startswith(get_address_hrp()):
|
|
215
215
|
args.append(Address.new_from_bech32(arg))
|
|
216
216
|
elif arg.lower() == FALSE_STR_LOWER:
|
|
217
217
|
args.append(False)
|
|
@@ -253,7 +253,7 @@ def _to_hex(arg: str):
|
|
|
253
253
|
|
|
254
254
|
if arg.isnumeric():
|
|
255
255
|
return _prepare_decimal(arg)
|
|
256
|
-
elif arg.startswith(
|
|
256
|
+
elif arg.startswith(get_address_hrp()):
|
|
257
257
|
addr = Address.from_bech32(arg)
|
|
258
258
|
return _prepare_hexadecimal(f"{HEX_PREFIX}{addr.hex()}")
|
|
259
259
|
elif arg.lower() == FALSE_STR_LOWER or arg.lower() == TRUE_STR_LOWER:
|
|
@@ -6,7 +6,8 @@ from multiversx_sdk.network_providers.network_config import NetworkConfig
|
|
|
6
6
|
|
|
7
7
|
from multiversx_sdk_cli import cli_shared, utils
|
|
8
8
|
from multiversx_sdk_cli.accounts import Account
|
|
9
|
-
from multiversx_sdk_cli.
|
|
9
|
+
from multiversx_sdk_cli.config import get_address_hrp
|
|
10
|
+
from multiversx_sdk_cli.constants import ADDRESS_ZERO_HEX
|
|
10
11
|
from multiversx_sdk_cli.contracts import SmartContract
|
|
11
12
|
from multiversx_sdk_cli.transactions import (compute_relayed_v1_data,
|
|
12
13
|
do_prepare_transaction)
|
|
@@ -36,10 +37,10 @@ def resolve(name: str, proxy: INetworkProvider) -> Address:
|
|
|
36
37
|
)
|
|
37
38
|
|
|
38
39
|
if len(response) == 0:
|
|
39
|
-
return Address.
|
|
40
|
+
return Address.new_from_hex(ADDRESS_ZERO_HEX, get_address_hrp())
|
|
40
41
|
|
|
41
42
|
result = response[0].get("returnDataParts")[0]
|
|
42
|
-
return Address.
|
|
43
|
+
return Address.new_from_hex(result, get_address_hrp())
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
def validate_name(name: str, shard_id: int, proxy: INetworkProvider):
|
|
@@ -137,7 +138,7 @@ def compute_dns_address_for_shard_id(shard_id: int) -> Address:
|
|
|
137
138
|
deployer_pubkey_prefix = InitialDNSAddress[:len(InitialDNSAddress) - ShardIdentiferLen]
|
|
138
139
|
|
|
139
140
|
deployer_pubkey = deployer_pubkey_prefix + bytes([0, shard_id])
|
|
140
|
-
deployer = Account(address=Address(deployer_pubkey,
|
|
141
|
+
deployer = Account(address=Address(deployer_pubkey, get_address_hrp()))
|
|
141
142
|
deployer.nonce = 0
|
|
142
143
|
address_computer = AddressComputer(number_of_shards=3)
|
|
143
144
|
contract_address = address_computer.compute_contract_address(deployer.address, deployer.nonce)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any, Dict, Protocol
|
|
1
|
+
from typing import Any, Dict, Protocol
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class IAddress(Protocol):
|
|
@@ -25,11 +25,6 @@ class ITransaction(Protocol):
|
|
|
25
25
|
guardian: str
|
|
26
26
|
signature: bytes
|
|
27
27
|
guardian_signature: bytes
|
|
28
|
-
relayer: str
|
|
29
|
-
|
|
30
|
-
@property
|
|
31
|
-
def inner_transactions(self) -> Sequence["ITransaction"]:
|
|
32
|
-
...
|
|
33
28
|
|
|
34
29
|
|
|
35
30
|
class IAccount(Protocol):
|
|
@@ -23,7 +23,7 @@ class SignedMessage:
|
|
|
23
23
|
verifiable_message.signature = bytes.fromhex(self.signature)
|
|
24
24
|
message_computer = MessageComputer()
|
|
25
25
|
|
|
26
|
-
verifier = UserVerifier.from_address(Address.
|
|
26
|
+
verifier = UserVerifier.from_address(Address.new_from_bech32(self.address))
|
|
27
27
|
is_signed = verifier.verify(message_computer.compute_bytes_for_signing(verifiable_message), verifiable_message.signature)
|
|
28
28
|
return is_signed
|
|
29
29
|
|
|
@@ -37,4 +37,4 @@ class SignedMessage:
|
|
|
37
37
|
|
|
38
38
|
def sign_message(message: str, account: Account) -> SignedMessage:
|
|
39
39
|
signature = account.sign_message(message.encode())
|
|
40
|
-
return SignedMessage(account.address.
|
|
40
|
+
return SignedMessage(account.address.to_bech32(), message, signature)
|
|
@@ -136,7 +136,7 @@ def get_guardian_account_from_args(args: Any):
|
|
|
136
136
|
account = Account(key_file=args.guardian_keyfile, password=password)
|
|
137
137
|
elif args.guardian_ledger:
|
|
138
138
|
address = do_get_ledger_address(account_index=args.guardian_ledger_account_index, address_index=args.guardian_ledger_address_index)
|
|
139
|
-
account = Account(address=Address.
|
|
139
|
+
account = Account(address=Address.new_from_bech32(address))
|
|
140
140
|
else:
|
|
141
141
|
raise errors.NoWalletProvided()
|
|
142
142
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "multiversx-sdk-cli"
|
|
7
|
-
version = "9.
|
|
7
|
+
version = "9.9.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="MultiversX" },
|
|
10
10
|
]
|
|
@@ -28,7 +28,7 @@ dependencies = [
|
|
|
28
28
|
"requests-cache",
|
|
29
29
|
"rich==13.3.4",
|
|
30
30
|
"argcomplete==3.2.2",
|
|
31
|
-
"multiversx-sdk==0.
|
|
31
|
+
"multiversx-sdk==0.19.0"
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
[project.scripts]
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, Optional, Protocol
|
|
2
|
-
|
|
3
|
-
from multiversx_sdk import GenericError, ProxyNetworkProvider
|
|
4
|
-
|
|
5
|
-
from multiversx_sdk_cli.errors import ProxyError
|
|
6
|
-
from multiversx_sdk_cli.interfaces import ISimulateResponse, ITransaction
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class ITransactionOnNetwork(Protocol):
|
|
10
|
-
hash: str
|
|
11
|
-
is_completed: Optional[bool]
|
|
12
|
-
|
|
13
|
-
def to_dictionary(self) -> Dict[str, Any]:
|
|
14
|
-
...
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class CustomNetworkProvider:
|
|
18
|
-
def __init__(self, url: str) -> None:
|
|
19
|
-
self._provider = ProxyNetworkProvider(url)
|
|
20
|
-
|
|
21
|
-
def send_transaction(self, transaction: ITransaction) -> str:
|
|
22
|
-
try:
|
|
23
|
-
hash = self._provider.send_transaction(transaction)
|
|
24
|
-
return hash
|
|
25
|
-
except GenericError as ge:
|
|
26
|
-
url = ge.url
|
|
27
|
-
message = ge.data.get("error", "")
|
|
28
|
-
data = ge.data.get("data", "")
|
|
29
|
-
code = ge.data.get("code", "")
|
|
30
|
-
raise ProxyError(message, url, data, code)
|
|
31
|
-
|
|
32
|
-
def get_transaction(self, tx_hash: str, with_process_status: Optional[bool] = False) -> ITransactionOnNetwork:
|
|
33
|
-
return self._provider.get_transaction(tx_hash, with_process_status)
|
|
34
|
-
|
|
35
|
-
def simulate_transaction(self, transaction: ITransaction) -> ISimulateResponse:
|
|
36
|
-
return self._provider.simulate_transaction(transaction)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/.vscode/settings.json
RENAMED
|
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
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/contract_verification.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/cosign_transaction.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/delegation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/install.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/modules.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependencies/resolution.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/dependency_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/ledger/ledger_functions.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_default.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_general.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_part.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_root.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_sharding.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/config_software.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/constants.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/genesis_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/libraries.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/p2p_toml.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_clean.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_config.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_new.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/step_start.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/localnet/wallets.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/native_auth_client.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/interfaces.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/migrations.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_base.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/project_rust.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/report/__init__.py
RENAMED
|
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
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/projects/templates.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.9.0}/multiversx_sdk_cli/validators/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|