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
41 changes: 23 additions & 18 deletions bittensor_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,11 @@ class Options:
"--json-out",
help="Outputs the result of the command as JSON.",
)
era: int = typer.Option(
3, help="Length (in blocks) for which the transaction should be valid."
period: int = typer.Option(
16,
"--period",
"--era",
help="Length (in blocks) for which the transaction should be valid.",
)


Expand Down Expand Up @@ -1792,7 +1795,7 @@ def wallet_transfer(
transfer_all: bool = typer.Option(
False, "--all", prompt=False, help="Transfer all available balance."
),
era: int = Options.era,
period: int = Options.period,
wallet_name: str = Options.wallet_name,
wallet_path: str = Options.wallet_path,
wallet_hotkey: str = Options.wallet_hotkey,
Expand Down Expand Up @@ -1847,7 +1850,7 @@ def wallet_transfer(
destination=destination_ss58_address,
amount=amount,
transfer_all=transfer_all,
era=era,
era=period,
prompt=prompt,
json_output=json_output,
)
Expand Down Expand Up @@ -3190,7 +3193,7 @@ def stake_add(
rate_tolerance: Optional[float] = Options.rate_tolerance,
safe_staking: Optional[bool] = Options.safe_staking,
allow_partial_stake: Optional[bool] = Options.allow_partial_stake,
era: int = Options.era,
period: int = Options.period,
prompt: bool = Options.prompt,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
Expand Down Expand Up @@ -3386,7 +3389,7 @@ def stake_add(
rate_tolerance,
allow_partial_stake,
json_output,
era,
period,
)
)

Expand Down Expand Up @@ -3438,7 +3441,7 @@ def stake_remove(
rate_tolerance: Optional[float] = Options.rate_tolerance,
safe_staking: Optional[bool] = Options.safe_staking,
allow_partial_stake: Optional[bool] = Options.allow_partial_stake,
era: int = Options.era,
period: int = Options.period,
prompt: bool = Options.prompt,
interactive: bool = typer.Option(
False,
Expand Down Expand Up @@ -3631,7 +3634,7 @@ def stake_remove(
exclude_hotkeys=exclude_hotkeys,
prompt=prompt,
json_output=json_output,
era=era,
era=period,
)
)
elif (
Expand Down Expand Up @@ -3687,7 +3690,7 @@ def stake_remove(
rate_tolerance=rate_tolerance,
allow_partial_stake=allow_partial_stake,
json_output=json_output,
era=era,
era=period,
)
)

Expand Down Expand Up @@ -3715,7 +3718,7 @@ def stake_move(
stake_all: bool = typer.Option(
False, "--stake-all", "--all", help="Stake all", prompt=False
),
era: int = Options.era,
period: int = Options.period,
prompt: bool = Options.prompt,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
Expand Down Expand Up @@ -3845,7 +3848,7 @@ def stake_move(
destination_hotkey=destination_hotkey,
amount=amount,
stake_all=stake_all,
era=era,
era=period,
interactive_selection=interactive_selection,
prompt=prompt,
)
Expand Down Expand Up @@ -3886,7 +3889,7 @@ def stake_transfer(
stake_all: bool = typer.Option(
False, "--stake-all", "--all", help="Stake all", prompt=False
),
era: int = Options.era,
period: int = Options.period,
prompt: bool = Options.prompt,
quiet: bool = Options.quiet,
verbose: bool = Options.verbose,
Expand Down Expand Up @@ -4008,7 +4011,7 @@ def stake_transfer(
dest_netuid=dest_netuid,
dest_coldkey_ss58=dest_ss58,
amount=amount,
era=era,
era=period,
interactive_selection=interactive_selection,
stake_all=stake_all,
prompt=prompt,
Expand Down Expand Up @@ -4050,7 +4053,7 @@ def stake_swap(
"--all",
help="Swap all available stake",
),
era: int = Options.era,
period: int = Options.period,
prompt: bool = Options.prompt,
wait_for_inclusion: bool = Options.wait_for_inclusion,
wait_for_finalization: bool = Options.wait_for_finalization,
Expand Down Expand Up @@ -4115,7 +4118,7 @@ def stake_swap(
destination_netuid=dest_netuid,
amount=amount,
swap_all=swap_all,
era=era,
era=period,
interactive_selection=interactive_selection,
prompt=prompt,
wait_for_inclusion=wait_for_inclusion,
Expand Down Expand Up @@ -5275,10 +5278,12 @@ def subnets_register(
wallet_hotkey: str = Options.wallet_hotkey,
network: Optional[list[str]] = Options.network,
netuid: int = Options.netuid,
era: Optional[
period: Optional[
int
] = typer.Option( # Should not be Options.era bc this needs to be an Optional[int]
] = typer.Option( # Should not be Options.period bc this needs to be an Optional[int]
None,
"--period",
"--era",
help="Length (in blocks) for which the transaction should be valid. Note that it is possible that if you "
"use an era for this transaction that you may pay a different fee to register than the one stated.",
),
Expand Down Expand Up @@ -5311,7 +5316,7 @@ def subnets_register(
wallet,
self.initialize_chain(network),
netuid,
era,
period,
json_output,
prompt,
)
Expand Down
Loading