Skip to content

Commit 6d95b77

Browse files
committed
Merge branch 'feat/next' into improve-guarded-accounts-flow
2 parents 55ae23c + b53bf9c commit 6d95b77

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

multiversx_sdk_cli/contracts.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
FALSE_STR_LOWER = "false"
3737
TRUE_STR_LOWER = "true"
3838
STR_PREFIX = "str:"
39+
ADDRESS_PREFIX = "addr:"
40+
MAINCHAIN_ADDRESS_HRP = "erd"
3941

4042

4143
# fmt: off
@@ -262,6 +264,14 @@ def _prepare_args_for_factory(self, arguments: list[str]) -> list[Any]:
262264
args.append(BytesValue(self._hex_to_bytes(arg)))
263265
elif arg.isnumeric():
264266
args.append(BigUIntValue(int(arg)))
267+
elif arg.startswith(ADDRESS_PREFIX):
268+
args.append(AddressValue.new_from_address(Address.new_from_bech32(arg[len(ADDRESS_PREFIX) :])))
269+
elif arg.startswith(MAINCHAIN_ADDRESS_HRP):
270+
# this flow will be removed in the future
271+
logger.warning(
272+
"Address argument has no prefix. This flow will be removed in the future. Please provide each address using the `addr:` prefix. (e.g. --arguments addr:erd1...)"
273+
)
274+
args.append(AddressValue.new_from_address(Address.new_from_bech32(arg)))
265275
elif arg.startswith(get_address_hrp()):
266276
args.append(AddressValue.new_from_address(Address.new_from_bech32(arg)))
267277
elif arg.lower() == FALSE_STR_LOWER:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
"ledgercomm[hid]",
2727
"rich==13.3.4",
2828
"argcomplete==3.2.2",
29-
"multiversx-sdk[ledger]==1.1.0"
29+
"multiversx-sdk[ledger]==1.2.0"
3030
]
3131

3232
[project.scripts]

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ ledgercomm[hid]
77
rich==13.3.4
88
argcomplete==3.2.2
99

10-
# multiversx-sdk[ledger]==1.1.0
11-
git+https://github.com/multiversx/mx-sdk-py@feat/next#egg=multiversx_sdk
10+
multiversx-sdk[ledger]==1.2.0

0 commit comments

Comments
 (0)