Skip to content

Commit 5739b1e

Browse files
committed
wip: tests
1 parent 0907961 commit 5739b1e

2 files changed

Lines changed: 627 additions & 14 deletions

File tree

multiversx_sdk_cli/cli_tokens.py

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -571,38 +571,60 @@ def add_issuing_tokens_args(
571571
)
572572

573573
sub.add_argument(
574-
"--can-freeze", required=True, type=lambda x: x.lower() == "true", help="whether a token can be freezed"
574+
"--can-not-freeze",
575+
action="store_false",
576+
dest="can_freeze",
577+
default=True,
578+
help="make token not freezable",
575579
)
576580
sub.add_argument(
577-
"--can-wipe", required=True, type=lambda x: x.lower() == "true", help="whether a token can be wiped"
581+
"--can-not-wipe",
582+
action="store_false",
583+
dest="can_wipe",
584+
default=True,
585+
help="make token not wipable",
578586
)
579587
sub.add_argument(
580-
"--can-pause", required=True, type=lambda x: x.lower() == "true", help="whether a token can be paused"
588+
"--can-not-pause",
589+
action="store_false",
590+
dest="can_pause",
591+
default=True,
592+
help="make token not pausable",
581593
)
582594
sub.add_argument(
583-
"--can-change-owner", required=True, type=lambda x: x.lower() == "true", help="whether a token can change owner"
595+
"--can-not-change-owner",
596+
action="store_false",
597+
dest="can_change_owner",
598+
default=True,
599+
help="don't allow changing the token's owner",
584600
)
585601
sub.add_argument(
586-
"--can-upgrade", required=True, type=lambda x: x.lower() == "true", help="whether a token can be upgraded"
602+
"--can-not-upgrade",
603+
action="store_false",
604+
dest="can_upgrade",
605+
default=True,
606+
help="don't allow upgrading the token",
587607
)
588608
sub.add_argument(
589-
"--can-add_special-roles",
590-
required=True,
591-
type=lambda x: x.lower() == "true",
592-
help="whether special roles can be added for the token",
609+
"--can-not-add-special-roles",
610+
action="store_false",
611+
dest="can_add_special_roles",
612+
default=True,
613+
help="don't allow special roles to be added for the token",
593614
)
594615

595616
if with_transfer_nft_create_role:
596617
sub.add_argument(
597-
"--can-transfer-nft-create-role",
598-
required=True,
599-
type=lambda x: x.lower() == "true",
600-
help="whether nft create roles can be transfered for the token",
618+
"--can-not-transfer-nft-create-role",
619+
action="store_false",
620+
dest="can_transfer_nft_create_role",
621+
default=True,
622+
help="don't allow for nft create roles to be transfered for the token",
601623
)
602624

603625

604626
def _add_token_identifier_arg(sub: Any):
605-
sub.add_argument("--identifier", required=True, type=str, help="the token identifier")
627+
sub.add_argument("--token-identifier", required=True, type=str, help="the token identifier")
606628

607629

608630
def _add_user_arg(sub: Any):

0 commit comments

Comments
 (0)