multiversx-sdk-cli 9.8.0__tar.gz → 9.8.1__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.8.1}/PKG-INFO +2 -2
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_accounts.py +3 -1
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_contracts.py +6 -10
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_delegation.py +3 -1
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_dns.py +11 -4
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_shared.py +14 -5
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_transactions.py +10 -10
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/config.py +6 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/interfaces.py +1 -6
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/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.8.1}/.gitignore +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/LICENSE +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/README.md +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/.vscode/settings.json +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/accounts.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_config.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_data.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_deps.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_faucet.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_ledger.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_localnet.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_output.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_password.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_validators.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cli_wallet.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/constants.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/contract_verification.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/contracts.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cosign_transaction.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/delegation/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/delegation/staking_provider.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/install.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/modules.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/resolution.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependency_checker.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dns.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/docker.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/downloader.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/errors.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/guards.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/ledger/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/ledger/config.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/ledger/ledger_app_handler.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/ledger/ledger_functions.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_default.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_general.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_networking.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_part.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_root.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_sharding.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_software.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/constants.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/genesis.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/genesis_json.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/genesis_smart_contracts_json.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/libraries.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/node.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/node_config_toml.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/nodes_setup_json.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/p2p_toml.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/seednode_p2pKey.pem +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_build_software.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_clean.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_config.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_new.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_prerequisites.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_start.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/wallets.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/myprocess.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/native_auth_client.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/constants.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/core.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/interfaces.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/migrations.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/project_base.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/project_rust.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/data/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/data/common.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/data/extracted_feature.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/data/folder_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/data/project_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/data/report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/data/wasm_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/do_report.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/features/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/features/features.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/features/report_option.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/features/size.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/features/twiggy_paths_check.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/format/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/format/change_type.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/format/format_options.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/report/report_creator.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/shared.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/templates.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/sign_verify.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/simulation.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/transactions.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/utils.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/ux.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/validators/__init__.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/validators/core.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/validators/validators_file.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/version.py +0 -0
- {multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/workstation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: multiversx-sdk-cli
|
|
3
|
-
Version: 9.8.
|
|
3
|
+
Version: 9.8.1
|
|
4
4
|
Summary: MultiversX Smart Contracts Tools
|
|
5
5
|
Project-URL: Homepage, https://github.com/multiversx/mx-sdk-py-cli
|
|
6
6
|
Author: MultiversX
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
13
13
|
Requires-Python: >=3.8
|
|
14
14
|
Requires-Dist: argcomplete==3.2.2
|
|
15
15
|
Requires-Dist: ledgercomm[hid]
|
|
16
|
-
Requires-Dist: multiversx-sdk==0.
|
|
16
|
+
Requires-Dist: multiversx-sdk==0.16.3
|
|
17
17
|
Requires-Dist: prettytable
|
|
18
18
|
Requires-Dist: requests-cache
|
|
19
19
|
Requires-Dist: requests<3.0.0,>=2.32.0
|
|
@@ -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
|
|
@@ -4,6 +4,7 @@ from multiversx_sdk import Address, ProxyNetworkProvider
|
|
|
4
4
|
from prettytable import PrettyTable
|
|
5
5
|
|
|
6
6
|
from multiversx_sdk_cli import cli_shared
|
|
7
|
+
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
7
8
|
from multiversx_sdk_cli.constants import ADDRESS_ZERO_BECH32
|
|
8
9
|
from multiversx_sdk_cli.dns import (compute_dns_address_for_shard_id,
|
|
9
10
|
dns_address_for_name, name_hash, register,
|
|
@@ -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
|
+
config = get_config_for_network_providers()
|
|
84
|
+
addr = resolve(args.name, ProxyNetworkProvider(url=args.proxy, config=config))
|
|
83
85
|
if addr.to_hex() != Address.new_from_bech32(ADDRESS_ZERO_BECH32).to_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.8.1}/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()
|
|
@@ -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()
|
|
@@ -242,3 +244,7 @@ def get_dependency_directory(key: str, tag: str) -> Path:
|
|
|
242
244
|
|
|
243
245
|
def get_dependency_parent_directory(key: str) -> Path:
|
|
244
246
|
return SDK_PATH / key
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def get_config_for_network_providers() -> NetworkProviderConfig:
|
|
250
|
+
return NetworkProviderConfig(client_name="mxpy")
|
|
@@ -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):
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "multiversx-sdk-cli"
|
|
7
|
-
version = "9.8.
|
|
7
|
+
version = "9.8.1"
|
|
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.16.3"
|
|
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.8.1}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/contract_verification.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/cosign_transaction.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/delegation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/install.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/modules.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/dependencies/resolution.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/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
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/ledger/ledger_functions.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_default.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_general.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_part.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_root.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_sharding.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/config_software.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/constants.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/genesis.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/genesis_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/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.8.1}/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.8.1}/multiversx_sdk_cli/localnet/step_clean.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_config.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_new.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/step_start.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/localnet/wallets.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/native_auth_client.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/interfaces.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/migrations.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/project_base.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/multiversx_sdk_cli/projects/project_rust.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.8.0 → multiversx_sdk_cli-9.8.1}/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.8.1}/multiversx_sdk_cli/projects/templates.py
RENAMED
|
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.8.1}/multiversx_sdk_cli/validators/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|