Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions bittensor_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4163,6 +4163,7 @@ def wallet_swap_coldkey(
network: Optional[list[str]] = Options.network,
proxy: Optional[str] = Options.proxy,
announce_only: bool = Options.announce_only,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
force_swap: bool = typer.Option(
Expand Down Expand Up @@ -4237,6 +4238,8 @@ def wallet_swap_coldkey(
subtensor=self.initialize_chain(network),
new_coldkey_ss58=new_wallet_coldkey_ss58,
force_swap=force_swap,
decline=decline,
quiet=quiet,
proxy=proxy,
)
)
Expand Down Expand Up @@ -5961,6 +5964,8 @@ def stake_wizard(
era=period,
interactive_selection=False,
prompt=prompt,
decline=decline,
quiet=quiet,
mev_protection=mev_protection,
)
)
Expand Down Expand Up @@ -6048,6 +6053,7 @@ def stake_set_claim_type(
proxy: Optional[str] = Options.proxy,
announce_only: bool = Options.announce_only,
prompt: bool = Options.prompt,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
json_output: bool = Options.json_output,
Expand Down Expand Up @@ -6090,6 +6096,8 @@ def stake_set_claim_type(
netuids=netuids,
proxy=proxy,
prompt=prompt,
decline=decline,
quiet=quiet,
json_output=json_output,
)
)
Expand All @@ -6104,6 +6112,7 @@ def stake_process_claim(
proxy: Optional[str] = Options.proxy,
announce_only: bool = Options.announce_only,
prompt: bool = Options.prompt,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
json_output: bool = Options.json_output,
Expand Down Expand Up @@ -6157,6 +6166,8 @@ def stake_process_claim(
netuids=parsed_netuids,
proxy=proxy,
prompt=prompt,
decline=decline,
quiet=quiet,
json_output=json_output,
verbose=verbose,
)
Expand Down Expand Up @@ -6517,6 +6528,7 @@ def mechanism_count_set(
wait_for_inclusion: bool = Options.wait_for_inclusion,
wait_for_finalization: bool = Options.wait_for_finalization,
prompt: bool = Options.prompt,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
json_output: bool = Options.json_output,
Expand Down Expand Up @@ -6564,18 +6576,17 @@ def mechanism_count_set(
mechanism_count = IntPrompt.ask(prompt_text)

if mechanism_count == current_count:
visible_count = max(mechanism_count - 1, 0)
message = (
":white_heavy_check_mark: "
f"[dark_sea_green3]Subnet {netuid} already has {visible_count} mechanism"
f"{'s' if visible_count != 1 else ''}.[/dark_sea_green3]"
f"[dark_sea_green3]Subnet {netuid} already has {mechanism_count} mechanism"
f"{'s' if mechanism_count != 1 else ''}.[/dark_sea_green3]"
)
if json_output:
json_console.print(
json.dumps(
{
"success": True,
"message": f"Subnet {netuid} already has {visible_count} mechanisms.",
"message": f"Subnet {netuid} already has {mechanism_count} mechanisms.",
"extrinsic_identifier": None,
}
)
Expand Down Expand Up @@ -6610,6 +6621,8 @@ def mechanism_count_set(
wait_for_inclusion=wait_for_inclusion,
wait_for_finalization=wait_for_finalization,
json_output=json_output,
quiet=quiet,
decline=decline,
)
)

Expand Down Expand Up @@ -6668,6 +6681,7 @@ def mechanism_emission_set(
wait_for_inclusion: bool = Options.wait_for_inclusion,
wait_for_finalization: bool = Options.wait_for_finalization,
prompt: bool = Options.prompt,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
json_output: bool = Options.json_output,
Expand Down Expand Up @@ -6707,6 +6721,8 @@ def mechanism_emission_set(
wait_for_inclusion=wait_for_inclusion,
wait_for_finalization=wait_for_finalization,
prompt=prompt,
decline=decline,
quiet=quiet,
json_output=json_output,
)
)
Expand Down Expand Up @@ -7606,6 +7622,7 @@ def subnets_create(
mev_protection: bool = Options.mev_protection,
json_output: bool = Options.json_output,
prompt: bool = Options.prompt,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
):
Expand Down Expand Up @@ -7666,6 +7683,8 @@ def subnets_create(
proxy=proxy,
json_output=json_output,
prompt=prompt,
decline=decline,
quiet=quiet,
mev_protection=mev_protection,
)
)
Expand Down Expand Up @@ -7700,6 +7719,7 @@ def subnets_start(
announce_only: bool = Options.announce_only,
netuid: int = Options.netuid,
prompt: bool = Options.prompt,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
):
Expand Down Expand Up @@ -7736,6 +7756,8 @@ def subnets_start(
netuid=netuid,
proxy=proxy,
prompt=prompt,
decline=decline,
quiet=quiet,
)
)

Expand Down Expand Up @@ -7798,6 +7820,7 @@ def subnets_set_identity(
),
json_output: bool = Options.json_output,
prompt: bool = Options.prompt,
decline: bool = Options.decline,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
):
Expand Down Expand Up @@ -7858,6 +7881,8 @@ def subnets_set_identity(
netuid=netuid,
subnet_identity=identity,
prompt=prompt,
decline=decline,
quiet=quiet,
proxy=proxy,
)
)
Expand Down