multiversx-sdk-cli 9.9.1__tar.gz → 9.10.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.9.1 → multiversx_sdk_cli-9.10.0}/PKG-INFO +1 -1
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_shared.py +31 -1
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_transactions.py +32 -1
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/errors.py +5 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/interfaces.py +2 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/transactions.py +29 -1
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/pyproject.toml +1 -1
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/.gitignore +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/LICENSE +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/README.md +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/.vscode/settings.json +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/accounts.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_accounts.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_config.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_contracts.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_data.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_delegation.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_deps.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_dns.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_faucet.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_ledger.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_localnet.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_output.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_password.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_validators.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_wallet.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/config.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/constants.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/contract_verification.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/contracts.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cosign_transaction.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/delegation/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/delegation/staking_provider.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/install.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/modules.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/resolution.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependency_checker.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dns.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/docker.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/downloader.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/guards.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/ledger/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/ledger/config.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/ledger/ledger_app_handler.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/ledger/ledger_functions.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_default.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_general.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_networking.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_part.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_root.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_sharding.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_software.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/constants.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/genesis.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/genesis_json.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/genesis_smart_contracts_json.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/libraries.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/node.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/node_config_toml.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/nodes_setup_json.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/p2p_toml.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/seednode_p2pKey.pem +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_build_software.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_clean.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_config.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_new.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_prerequisites.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_start.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/wallets.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/myprocess.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/native_auth_client.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/constants.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/core.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/interfaces.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/migrations.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/project_base.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/project_rust.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/data/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/data/common.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/data/extracted_feature.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/data/folder_report.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/data/project_report.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/data/report.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/data/wasm_report.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/do_report.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/features/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/features/features.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/features/report_option.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/features/size.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/features/twiggy_paths_check.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/format/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/format/change_type.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/format/format_options.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/report/report_creator.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/shared.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/templates.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/sign_verify.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/simulation.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/utils.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/ux.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/validators/__init__.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/validators/core.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/validators/validators_file.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/version.py +0 -0
- {multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/workstation.py +0 -0
|
@@ -68,7 +68,8 @@ def add_tx_args(
|
|
|
68
68
|
with_nonce: bool = True,
|
|
69
69
|
with_receiver: bool = True,
|
|
70
70
|
with_data: bool = True,
|
|
71
|
-
with_estimate_gas: bool = False
|
|
71
|
+
with_estimate_gas: bool = False,
|
|
72
|
+
with_relayer_wallet_args: bool = True):
|
|
72
73
|
if with_nonce:
|
|
73
74
|
sub.add_argument("--nonce", type=int, required=not ("--recall-nonce" in args), help="# the nonce for the transaction")
|
|
74
75
|
sub.add_argument("--recall-nonce", action="store_true", default=False, help="⭮ whether to recall the nonce when creating the transaction (default: %(default)s)")
|
|
@@ -90,6 +91,10 @@ def add_tx_args(
|
|
|
90
91
|
sub.add_argument("--chain", help="the chain identifier")
|
|
91
92
|
sub.add_argument("--version", type=int, default=DEFAULT_TX_VERSION, help="the transaction version (default: %(default)s)")
|
|
92
93
|
|
|
94
|
+
sub.add_argument("--relayer", help="the bech32 address of the relayer")
|
|
95
|
+
if with_relayer_wallet_args:
|
|
96
|
+
add_relayed_v3_wallet_args(args, sub)
|
|
97
|
+
|
|
93
98
|
add_guardian_args(sub)
|
|
94
99
|
|
|
95
100
|
sub.add_argument("--options", type=int, default=0, help="the transaction options (default: 0)")
|
|
@@ -122,6 +127,17 @@ def add_guardian_wallet_args(args: List[str], sub: Any):
|
|
|
122
127
|
sub.add_argument("--guardian-ledger-address-index", type=int, default=0, help="🔐 the index of the address when using Ledger")
|
|
123
128
|
|
|
124
129
|
|
|
130
|
+
# Required check not properly working, same for guardian. Will be refactored in the future.
|
|
131
|
+
def add_relayed_v3_wallet_args(args: List[str], sub: Any):
|
|
132
|
+
sub.add_argument("--relayer-pem", help="🔑 the PEM file, if keyfile not provided")
|
|
133
|
+
sub.add_argument("--relayer-pem-index", type=int, default=0, help="🔑 the index in the PEM file (default: %(default)s)")
|
|
134
|
+
sub.add_argument("--relayer-keyfile", help="🔑 a JSON keyfile, if PEM not provided")
|
|
135
|
+
sub.add_argument("--relayer-passfile", help="🔑 a file containing keyfile's password, if keyfile provided")
|
|
136
|
+
sub.add_argument("--relayer-ledger", action="store_true", default=False, help="🔐 bool flag for signing transaction using ledger")
|
|
137
|
+
sub.add_argument("--relayer-ledger-account-index", type=int, default=0, help="🔐 the index of the account when using Ledger")
|
|
138
|
+
sub.add_argument("--relayer-ledger-address-index", type=int, default=0, help="🔐 the index of the address when using Ledger")
|
|
139
|
+
|
|
140
|
+
|
|
125
141
|
def add_proxy_arg(sub: Any):
|
|
126
142
|
sub.add_argument("--proxy", help="🔗 the URL of the proxy")
|
|
127
143
|
|
|
@@ -166,6 +182,20 @@ def prepare_account(args: Any):
|
|
|
166
182
|
return account
|
|
167
183
|
|
|
168
184
|
|
|
185
|
+
def prepare_relayer_account(args: Any) -> Account:
|
|
186
|
+
if args.relayer_ledger:
|
|
187
|
+
account = LedgerAccount(account_index=args.relayer_ledger_account_index, address_index=args.relayer_ledger_address_index)
|
|
188
|
+
if args.relayer_pem:
|
|
189
|
+
account = Account(pem_file=args.relayer_pem, pem_index=args.relayer_pem_index)
|
|
190
|
+
elif args.relayer_keyfile:
|
|
191
|
+
password = load_password(args)
|
|
192
|
+
account = Account(key_file=args.relayer_keyfile, password=password)
|
|
193
|
+
else:
|
|
194
|
+
raise errors.NoWalletProvided()
|
|
195
|
+
|
|
196
|
+
return account
|
|
197
|
+
|
|
198
|
+
|
|
169
199
|
def prepare_guardian_account(args: Any):
|
|
170
200
|
if args.guardian_pem:
|
|
171
201
|
account = Account(pem_file=args.guardian_pem, pem_index=args.guardian_pem_index)
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cli_transactions.py
RENAMED
|
@@ -8,7 +8,7 @@ from multiversx_sdk_cli import cli_shared, utils
|
|
|
8
8
|
from multiversx_sdk_cli.cli_output import CLIOutputBuilder
|
|
9
9
|
from multiversx_sdk_cli.config import get_config_for_network_providers
|
|
10
10
|
from multiversx_sdk_cli.cosign_transaction import cosign_transaction
|
|
11
|
-
from multiversx_sdk_cli.errors import NoWalletProvided
|
|
11
|
+
from multiversx_sdk_cli.errors import IncorrectWalletError, NoWalletProvided
|
|
12
12
|
from multiversx_sdk_cli.transactions import (compute_relayed_v1_data,
|
|
13
13
|
do_prepare_transaction,
|
|
14
14
|
load_transaction_from_file)
|
|
@@ -57,6 +57,14 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
|
|
|
57
57
|
cli_shared.add_guardian_wallet_args(args, sub)
|
|
58
58
|
sub.set_defaults(func=sign_transaction)
|
|
59
59
|
|
|
60
|
+
sub = cli_shared.add_command_subparser(subparsers, "tx", "relay", f"Relay a previously saved transaction.{CLIOutputBuilder.describe()}")
|
|
61
|
+
cli_shared.add_relayed_v3_wallet_args(args, sub)
|
|
62
|
+
cli_shared.add_infile_arg(sub, what="a previously saved transaction")
|
|
63
|
+
cli_shared.add_outfile_arg(sub, what="the relayer signed transaction")
|
|
64
|
+
cli_shared.add_broadcast_args(sub)
|
|
65
|
+
cli_shared.add_proxy_arg(sub)
|
|
66
|
+
sub.set_defaults(func=relay_transaction)
|
|
67
|
+
|
|
60
68
|
parser.epilog = cli_shared.build_group_epilog(subparsers)
|
|
61
69
|
return subparsers
|
|
62
70
|
|
|
@@ -141,3 +149,26 @@ def sign_transaction(args: Any):
|
|
|
141
149
|
tx = cosign_transaction(tx, args.guardian_service_url, args.guardian_2fa_code)
|
|
142
150
|
|
|
143
151
|
cli_shared.send_or_simulate(tx, args)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def relay_transaction(args: Any):
|
|
155
|
+
args = utils.as_object(args)
|
|
156
|
+
|
|
157
|
+
if not _is_relayer_wallet_provided(args):
|
|
158
|
+
raise NoWalletProvided()
|
|
159
|
+
|
|
160
|
+
cli_shared.check_broadcast_args(args)
|
|
161
|
+
|
|
162
|
+
tx = load_transaction_from_file(args.infile)
|
|
163
|
+
relayer = cli_shared.prepare_relayer_account(args)
|
|
164
|
+
|
|
165
|
+
if tx.relayer != relayer.address.to_bech32():
|
|
166
|
+
raise IncorrectWalletError("Relayer wallet does not match the relayer's address set in the transaction.")
|
|
167
|
+
|
|
168
|
+
tx.relayer_signature = bytes.fromhex(relayer.sign_transaction(tx))
|
|
169
|
+
|
|
170
|
+
cli_shared.send_or_simulate(tx, args)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def _is_relayer_wallet_provided(args: Any):
|
|
174
|
+
return any([args.relayer_pem, args.relayer_keyfile, args.relayer_ledger])
|
|
@@ -182,3 +182,8 @@ class QueryContractError(KnownError):
|
|
|
182
182
|
class NativeAuthClientError(KnownError):
|
|
183
183
|
def __init__(self, message: str):
|
|
184
184
|
super().__init__(message)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class IncorrectWalletError(KnownError):
|
|
188
|
+
def __init__(self, message: str):
|
|
189
|
+
super().__init__(message)
|
|
@@ -14,7 +14,7 @@ from multiversx_sdk_cli.accounts import Account, LedgerAccount
|
|
|
14
14
|
from multiversx_sdk_cli.cli_password import (load_guardian_password,
|
|
15
15
|
load_password)
|
|
16
16
|
from multiversx_sdk_cli.cosign_transaction import cosign_transaction
|
|
17
|
-
from multiversx_sdk_cli.errors import NoWalletProvided
|
|
17
|
+
from multiversx_sdk_cli.errors import IncorrectWalletError, NoWalletProvided
|
|
18
18
|
from multiversx_sdk_cli.interfaces import ITransaction
|
|
19
19
|
from multiversx_sdk_cli.ledger.ledger_functions import do_get_ledger_address
|
|
20
20
|
|
|
@@ -78,6 +78,20 @@ def do_prepare_transaction(args: Any) -> Transaction:
|
|
|
78
78
|
if args.guardian:
|
|
79
79
|
tx.guardian = args.guardian
|
|
80
80
|
|
|
81
|
+
if args.relayer:
|
|
82
|
+
tx.relayer = args.relayer
|
|
83
|
+
|
|
84
|
+
try:
|
|
85
|
+
relayer_account = load_relayer_account_from_args(args)
|
|
86
|
+
if relayer_account.address.to_bech32() != tx.relayer:
|
|
87
|
+
raise IncorrectWalletError("")
|
|
88
|
+
|
|
89
|
+
tx.relayer_signature = bytes.fromhex(relayer_account.sign_transaction(tx))
|
|
90
|
+
except NoWalletProvided:
|
|
91
|
+
logger.warning("Relayer wallet not provided. Transaction will not be signed by relayer.")
|
|
92
|
+
except IncorrectWalletError:
|
|
93
|
+
raise IncorrectWalletError("Relayer wallet does not match the relayer's address set in the transaction.")
|
|
94
|
+
|
|
81
95
|
tx.signature = bytes.fromhex(account.sign_transaction(tx))
|
|
82
96
|
tx = sign_tx_by_guardian(args, tx)
|
|
83
97
|
|
|
@@ -97,6 +111,20 @@ def load_sender_account_from_args(args: Any) -> Account:
|
|
|
97
111
|
return account
|
|
98
112
|
|
|
99
113
|
|
|
114
|
+
def load_relayer_account_from_args(args: Any) -> Account:
|
|
115
|
+
if args.relayer_ledger:
|
|
116
|
+
account = LedgerAccount(account_index=args.relayer_ledger_account_index, address_index=args.relayer_ledger_address_index)
|
|
117
|
+
if args.relayer_pem:
|
|
118
|
+
account = Account(pem_file=args.relayer_pem, pem_index=args.relayer_pem_index)
|
|
119
|
+
elif args.relayer_keyfile:
|
|
120
|
+
password = load_password(args)
|
|
121
|
+
account = Account(key_file=args.relayer_keyfile, password=password)
|
|
122
|
+
else:
|
|
123
|
+
raise errors.NoWalletProvided()
|
|
124
|
+
|
|
125
|
+
return account
|
|
126
|
+
|
|
127
|
+
|
|
100
128
|
def prepare_token_transfers(transfers: List[Any]) -> List[TokenTransfer]:
|
|
101
129
|
token_computer = TokenComputer()
|
|
102
130
|
token_transfers: List[TokenTransfer] = []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.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
|
|
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.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/contract_verification.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/cosign_transaction.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/delegation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/install.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/modules.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependencies/resolution.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/dependency_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/ledger/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/ledger/ledger_functions.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_default.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_general.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_part.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/config_root.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/constants.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/genesis.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/genesis_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/libraries.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/p2p_toml.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_clean.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_config.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_new.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/step_start.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/localnet/wallets.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/native_auth_client.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/interfaces.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/migrations.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/project_base.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/project_rust.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.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/shared.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/projects/templates.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/validators/__init__.py
RENAMED
|
File without changes
|
{multiversx_sdk_cli-9.9.1 → multiversx_sdk_cli-9.10.0}/multiversx_sdk_cli/validators/core.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|