meshtensor-cli 9.24.0__tar.gz → 9.26.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.
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/PKG-INFO +1 -1
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/cli.py +1 -367
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/__init__.py +32 -32
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/chain_data.py +2 -2
- meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor/meshtensor_interface.py → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor/subtensor_interface.py +4 -4
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/governance/governance.py +2 -597
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/move.py +1 -1
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/subnets/subnets.py +4 -1
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/sudo.py +3 -3
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/__init__.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/balances.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/chain_data.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/extrinsics/__init__.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/extrinsics/mev_shield.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/extrinsics/registration.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/extrinsics/root.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/extrinsics/serving.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/extrinsics/transfer.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/meshtensor_interface.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/minigraph.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/networking.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/subtensor_interface.py +1 -0
- meshtensor_cli-9.26.0/meshtensor_cli/src/meshtensor/utils.py +1 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/pyproject.toml +1 -1
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/README.md +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/doc_generation_helper.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/__init__.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/balances.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/axon → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor/extrinsics}/__init__.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/extrinsics/mev_shield.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/extrinsics/registration.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/extrinsics/root.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/extrinsics/serving.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/extrinsics/transfer.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/minigraph.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/networking.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/main-filters.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/main-header.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/neuron-details.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/price-multi.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/price-single.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/subnet-details-header.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/subnet-details.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/subnet-metrics.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/subnets-table.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/table.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/view.css +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/view.j2 +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/templates/view.js +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/bittensor}/utils.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/crowd → meshtensor_cli-9.26.0/meshtensor_cli/src/commands}/__init__.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/governance → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/axon}/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/axon/axon.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/liquidity → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/crowd}/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/contribute.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/contributors.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/create.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/dissolve.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/refund.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/update.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/utils.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/crowd/view.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/stake → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/governance}/__init__.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/subnets → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/liquidity}/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/liquidity/liquidity.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/liquidity/utils.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/proxy.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/tc → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/stake}/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/add.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/auto_staking.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/children_hotkeys.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/claim.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/list.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/remove.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/stake/wizard.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/commands/treasury → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/subnets}/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/subnets/mechanisms.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/subnets/price.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/tc}/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/tc/tc.py +0 -0
- {meshtensor_cli-9.24.0/meshtensor_cli/src/meshtensor/extrinsics → meshtensor_cli-9.26.0/meshtensor_cli/src/commands/treasury}/__init__.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/treasury/treasury.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/view.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/wallets.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/src/commands/weights.py +0 -0
- {meshtensor_cli-9.24.0 → meshtensor_cli-9.26.0}/meshtensor_cli/version.py +0 -0
|
@@ -125,7 +125,7 @@ except ImportError:
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
logger = logging.getLogger("meshcli")
|
|
128
|
-
_epilog = "Made with [bold red]:heart:[/bold red] by
|
|
128
|
+
_epilog = "Made with [bold red]:heart:[/bold red] by Grobb"
|
|
129
129
|
|
|
130
130
|
np.set_printoptions(precision=8, suppress=True, floatmode="fixed")
|
|
131
131
|
|
|
@@ -1432,18 +1432,6 @@ class CLIManager:
|
|
|
1432
1432
|
self.governance_app.command("signal-golr")(self.governance_signal_golr)
|
|
1433
1433
|
self.governance_app.command("update-scores")(self.governance_update_scores)
|
|
1434
1434
|
self.governance_app.command("distribute-rewards")(self.governance_distribute_rewards)
|
|
1435
|
-
self.governance_app.command("claim-rewards")(self.governance_claim_rewards)
|
|
1436
|
-
self.governance_app.command("submit-preimage")(self.governance_submit_preimage)
|
|
1437
|
-
self.governance_app.command("set-track-coefficients")(self.governance_set_track_coefficients)
|
|
1438
|
-
self.governance_app.command("set-config")(self.governance_set_config)
|
|
1439
|
-
self.governance_app.command("set-golr-config")(self.governance_set_golr_config)
|
|
1440
|
-
self.governance_app.command("prune-accounts")(self.governance_prune_accounts)
|
|
1441
|
-
self.governance_app.command("endorse")(self.governance_endorse)
|
|
1442
|
-
self.governance_app.command("cancel")(self.governance_cancel)
|
|
1443
|
-
self.governance_app.command("approve-treasury")(self.governance_approve_treasury)
|
|
1444
|
-
self.governance_app.command("status")(self.governance_status)
|
|
1445
|
-
self.governance_app.command("my-rewards")(self.governance_my_rewards)
|
|
1446
|
-
self.governance_app.command("my-delegations")(self.governance_my_delegations)
|
|
1447
1435
|
|
|
1448
1436
|
# Treasury commands
|
|
1449
1437
|
self.treasury_app.command("propose")(self.treasury_propose)
|
|
@@ -10485,11 +10473,6 @@ class CLIManager:
|
|
|
10485
10473
|
def governance_history(
|
|
10486
10474
|
self,
|
|
10487
10475
|
network: Optional[list[str]] = Options.network,
|
|
10488
|
-
limit: int = typer.Option(
|
|
10489
|
-
20,
|
|
10490
|
-
"--limit",
|
|
10491
|
-
help="Maximum number of referenda to show.",
|
|
10492
|
-
),
|
|
10493
10476
|
quiet: bool = Options.quiet,
|
|
10494
10477
|
verbose: bool = Options.verbose,
|
|
10495
10478
|
json_output: bool = Options.json_output,
|
|
@@ -10499,7 +10482,6 @@ class CLIManager:
|
|
|
10499
10482
|
return self._run_command(
|
|
10500
10483
|
governance.governance_history(
|
|
10501
10484
|
subtensor=self.initialize_chain(network),
|
|
10502
|
-
limit=limit,
|
|
10503
10485
|
quiet=quiet,
|
|
10504
10486
|
verbose=verbose,
|
|
10505
10487
|
output_json=json_output,
|
|
@@ -10581,354 +10563,6 @@ class CLIManager:
|
|
|
10581
10563
|
)
|
|
10582
10564
|
)
|
|
10583
10565
|
|
|
10584
|
-
def governance_claim_rewards(
|
|
10585
|
-
self,
|
|
10586
|
-
network: Optional[list[str]] = Options.network,
|
|
10587
|
-
wallet_name: str = Options.wallet_name,
|
|
10588
|
-
wallet_path: str = Options.wallet_path,
|
|
10589
|
-
quiet: bool = Options.quiet,
|
|
10590
|
-
verbose: bool = Options.verbose,
|
|
10591
|
-
):
|
|
10592
|
-
"""Claim pending governance rewards from the reward pool."""
|
|
10593
|
-
self.verbosity_handler(quiet, verbose)
|
|
10594
|
-
wallet = self.wallet_ask(
|
|
10595
|
-
wallet_name,
|
|
10596
|
-
wallet_path,
|
|
10597
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10598
|
-
validate=WV.WALLET,
|
|
10599
|
-
)
|
|
10600
|
-
return self._run_command(
|
|
10601
|
-
governance.governance_claim_rewards(
|
|
10602
|
-
subtensor=self.initialize_chain(network),
|
|
10603
|
-
wallet=wallet,
|
|
10604
|
-
quiet=quiet,
|
|
10605
|
-
verbose=verbose,
|
|
10606
|
-
)
|
|
10607
|
-
)
|
|
10608
|
-
|
|
10609
|
-
def governance_submit_preimage(
|
|
10610
|
-
self,
|
|
10611
|
-
call_data: str = typer.Argument(
|
|
10612
|
-
...,
|
|
10613
|
-
help="Hex-encoded SCALE bytes of the runtime call (with or without 0x prefix).",
|
|
10614
|
-
),
|
|
10615
|
-
network: Optional[list[str]] = Options.network,
|
|
10616
|
-
wallet_name: str = Options.wallet_name,
|
|
10617
|
-
wallet_path: str = Options.wallet_path,
|
|
10618
|
-
quiet: bool = Options.quiet,
|
|
10619
|
-
verbose: bool = Options.verbose,
|
|
10620
|
-
):
|
|
10621
|
-
"""Submit a preimage of a runtime call on-chain."""
|
|
10622
|
-
self.verbosity_handler(quiet, verbose)
|
|
10623
|
-
wallet = self.wallet_ask(
|
|
10624
|
-
wallet_name,
|
|
10625
|
-
wallet_path,
|
|
10626
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10627
|
-
validate=WV.WALLET,
|
|
10628
|
-
)
|
|
10629
|
-
return self._run_command(
|
|
10630
|
-
governance.governance_submit_preimage(
|
|
10631
|
-
subtensor=self.initialize_chain(network),
|
|
10632
|
-
wallet=wallet,
|
|
10633
|
-
call_data=call_data,
|
|
10634
|
-
quiet=quiet,
|
|
10635
|
-
verbose=verbose,
|
|
10636
|
-
)
|
|
10637
|
-
)
|
|
10638
|
-
|
|
10639
|
-
def governance_set_track_coefficients(
|
|
10640
|
-
self,
|
|
10641
|
-
track_id: int = typer.Option(
|
|
10642
|
-
..., "--track", help="Governance track ID (0-5)."
|
|
10643
|
-
),
|
|
10644
|
-
alpha: int = typer.Option(
|
|
10645
|
-
..., "--alpha", help="Quadratic stake weight (0-1000)."
|
|
10646
|
-
),
|
|
10647
|
-
beta: int = typer.Option(
|
|
10648
|
-
..., "--beta", help="Contribution weight (0-1000)."
|
|
10649
|
-
),
|
|
10650
|
-
gamma: int = typer.Option(
|
|
10651
|
-
..., "--gamma", help="Reserved/future weight (0-1000)."
|
|
10652
|
-
),
|
|
10653
|
-
network: Optional[list[str]] = Options.network,
|
|
10654
|
-
wallet_name: str = Options.wallet_name,
|
|
10655
|
-
wallet_path: str = Options.wallet_path,
|
|
10656
|
-
quiet: bool = Options.quiet,
|
|
10657
|
-
verbose: bool = Options.verbose,
|
|
10658
|
-
):
|
|
10659
|
-
"""Update VP formula coefficients for a governance track (Root-only)."""
|
|
10660
|
-
self.verbosity_handler(quiet, verbose)
|
|
10661
|
-
wallet = self.wallet_ask(
|
|
10662
|
-
wallet_name,
|
|
10663
|
-
wallet_path,
|
|
10664
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10665
|
-
validate=WV.WALLET,
|
|
10666
|
-
)
|
|
10667
|
-
return self._run_command(
|
|
10668
|
-
governance.governance_set_track_coefficients(
|
|
10669
|
-
subtensor=self.initialize_chain(network),
|
|
10670
|
-
wallet=wallet,
|
|
10671
|
-
track_id=track_id,
|
|
10672
|
-
alpha=alpha,
|
|
10673
|
-
beta=beta,
|
|
10674
|
-
gamma=gamma,
|
|
10675
|
-
quiet=quiet,
|
|
10676
|
-
verbose=verbose,
|
|
10677
|
-
)
|
|
10678
|
-
)
|
|
10679
|
-
|
|
10680
|
-
def governance_set_config(
|
|
10681
|
-
self,
|
|
10682
|
-
min_contribution_floor: int = typer.Option(
|
|
10683
|
-
..., "--min-contribution-floor", help="Minimum CW floor (0-1000, default 150)."
|
|
10684
|
-
),
|
|
10685
|
-
max_delegation_pct: int = typer.Option(
|
|
10686
|
-
..., "--max-delegation-pct", help="Max delegated VP per delegatee (0-1000, default 50)."
|
|
10687
|
-
),
|
|
10688
|
-
delegation_factor: int = typer.Option(
|
|
10689
|
-
..., "--delegation-factor", help="Delegation decay factor (0-1000, default 900)."
|
|
10690
|
-
),
|
|
10691
|
-
network: Optional[list[str]] = Options.network,
|
|
10692
|
-
wallet_name: str = Options.wallet_name,
|
|
10693
|
-
wallet_path: str = Options.wallet_path,
|
|
10694
|
-
quiet: bool = Options.quiet,
|
|
10695
|
-
verbose: bool = Options.verbose,
|
|
10696
|
-
):
|
|
10697
|
-
"""Update core governance configuration parameters (Root-only)."""
|
|
10698
|
-
self.verbosity_handler(quiet, verbose)
|
|
10699
|
-
wallet = self.wallet_ask(
|
|
10700
|
-
wallet_name,
|
|
10701
|
-
wallet_path,
|
|
10702
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10703
|
-
validate=WV.WALLET,
|
|
10704
|
-
)
|
|
10705
|
-
return self._run_command(
|
|
10706
|
-
governance.governance_set_config(
|
|
10707
|
-
subtensor=self.initialize_chain(network),
|
|
10708
|
-
wallet=wallet,
|
|
10709
|
-
min_contribution_floor=min_contribution_floor,
|
|
10710
|
-
max_delegation_pct=max_delegation_pct,
|
|
10711
|
-
delegation_factor=delegation_factor,
|
|
10712
|
-
quiet=quiet,
|
|
10713
|
-
verbose=verbose,
|
|
10714
|
-
)
|
|
10715
|
-
)
|
|
10716
|
-
|
|
10717
|
-
def governance_set_golr_config(
|
|
10718
|
-
self,
|
|
10719
|
-
paralysis_days: int = typer.Option(
|
|
10720
|
-
..., "--paralysis-days", help="Days of inactivity before GoLR (min 30)."
|
|
10721
|
-
),
|
|
10722
|
-
threshold_pct: int = typer.Option(
|
|
10723
|
-
..., "--threshold-pct", help="Validator supermajority percentage (0-100)."
|
|
10724
|
-
),
|
|
10725
|
-
network: Optional[list[str]] = Options.network,
|
|
10726
|
-
wallet_name: str = Options.wallet_name,
|
|
10727
|
-
wallet_path: str = Options.wallet_path,
|
|
10728
|
-
quiet: bool = Options.quiet,
|
|
10729
|
-
verbose: bool = Options.verbose,
|
|
10730
|
-
):
|
|
10731
|
-
"""Update GoLR (Governance of Last Resort) parameters (Root-only)."""
|
|
10732
|
-
self.verbosity_handler(quiet, verbose)
|
|
10733
|
-
wallet = self.wallet_ask(
|
|
10734
|
-
wallet_name,
|
|
10735
|
-
wallet_path,
|
|
10736
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10737
|
-
validate=WV.WALLET,
|
|
10738
|
-
)
|
|
10739
|
-
return self._run_command(
|
|
10740
|
-
governance.governance_set_golr_config(
|
|
10741
|
-
subtensor=self.initialize_chain(network),
|
|
10742
|
-
wallet=wallet,
|
|
10743
|
-
paralysis_days=paralysis_days,
|
|
10744
|
-
threshold_pct=threshold_pct,
|
|
10745
|
-
quiet=quiet,
|
|
10746
|
-
verbose=verbose,
|
|
10747
|
-
)
|
|
10748
|
-
)
|
|
10749
|
-
|
|
10750
|
-
def governance_prune_accounts(
|
|
10751
|
-
self,
|
|
10752
|
-
accounts: list[str] = typer.Option(
|
|
10753
|
-
..., "--accounts", help="SS58 addresses to prune (max 500)."
|
|
10754
|
-
),
|
|
10755
|
-
network: Optional[list[str]] = Options.network,
|
|
10756
|
-
wallet_name: str = Options.wallet_name,
|
|
10757
|
-
wallet_path: str = Options.wallet_path,
|
|
10758
|
-
quiet: bool = Options.quiet,
|
|
10759
|
-
verbose: bool = Options.verbose,
|
|
10760
|
-
):
|
|
10761
|
-
"""Prune governance storage for zero-balance accounts (Root-only)."""
|
|
10762
|
-
self.verbosity_handler(quiet, verbose)
|
|
10763
|
-
wallet = self.wallet_ask(
|
|
10764
|
-
wallet_name,
|
|
10765
|
-
wallet_path,
|
|
10766
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10767
|
-
validate=WV.WALLET,
|
|
10768
|
-
)
|
|
10769
|
-
return self._run_command(
|
|
10770
|
-
governance.governance_prune_accounts(
|
|
10771
|
-
subtensor=self.initialize_chain(network),
|
|
10772
|
-
wallet=wallet,
|
|
10773
|
-
accounts=accounts,
|
|
10774
|
-
quiet=quiet,
|
|
10775
|
-
verbose=verbose,
|
|
10776
|
-
)
|
|
10777
|
-
)
|
|
10778
|
-
|
|
10779
|
-
def governance_endorse(
|
|
10780
|
-
self,
|
|
10781
|
-
ref_index: int = typer.Option(
|
|
10782
|
-
..., "--ref-index", help="Referendum index to endorse."
|
|
10783
|
-
),
|
|
10784
|
-
network: Optional[list[str]] = Options.network,
|
|
10785
|
-
wallet_name: str = Options.wallet_name,
|
|
10786
|
-
wallet_path: str = Options.wallet_path,
|
|
10787
|
-
quiet: bool = Options.quiet,
|
|
10788
|
-
verbose: bool = Options.verbose,
|
|
10789
|
-
):
|
|
10790
|
-
"""Endorse a referendum as a Technical Committee member."""
|
|
10791
|
-
self.verbosity_handler(quiet, verbose)
|
|
10792
|
-
wallet = self.wallet_ask(
|
|
10793
|
-
wallet_name,
|
|
10794
|
-
wallet_path,
|
|
10795
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10796
|
-
validate=WV.WALLET,
|
|
10797
|
-
)
|
|
10798
|
-
return self._run_command(
|
|
10799
|
-
governance.governance_endorse(
|
|
10800
|
-
subtensor=self.initialize_chain(network),
|
|
10801
|
-
wallet=wallet,
|
|
10802
|
-
ref_index=ref_index,
|
|
10803
|
-
quiet=quiet,
|
|
10804
|
-
verbose=verbose,
|
|
10805
|
-
)
|
|
10806
|
-
)
|
|
10807
|
-
|
|
10808
|
-
def governance_cancel(
|
|
10809
|
-
self,
|
|
10810
|
-
ref_index: int = typer.Option(
|
|
10811
|
-
..., "--ref-index", help="Referendum index to cancel."
|
|
10812
|
-
),
|
|
10813
|
-
network: Optional[list[str]] = Options.network,
|
|
10814
|
-
wallet_name: str = Options.wallet_name,
|
|
10815
|
-
wallet_path: str = Options.wallet_path,
|
|
10816
|
-
quiet: bool = Options.quiet,
|
|
10817
|
-
verbose: bool = Options.verbose,
|
|
10818
|
-
):
|
|
10819
|
-
"""Cancel an active referendum (requires root origin)."""
|
|
10820
|
-
self.verbosity_handler(quiet, verbose)
|
|
10821
|
-
wallet = self.wallet_ask(
|
|
10822
|
-
wallet_name,
|
|
10823
|
-
wallet_path,
|
|
10824
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10825
|
-
validate=WV.WALLET,
|
|
10826
|
-
)
|
|
10827
|
-
return self._run_command(
|
|
10828
|
-
governance.governance_cancel(
|
|
10829
|
-
subtensor=self.initialize_chain(network),
|
|
10830
|
-
wallet=wallet,
|
|
10831
|
-
ref_index=ref_index,
|
|
10832
|
-
quiet=quiet,
|
|
10833
|
-
verbose=verbose,
|
|
10834
|
-
)
|
|
10835
|
-
)
|
|
10836
|
-
|
|
10837
|
-
def governance_approve_treasury(
|
|
10838
|
-
self,
|
|
10839
|
-
proposal_id: int = typer.Option(
|
|
10840
|
-
..., "--proposal-id", help="Treasury proposal ID to approve."
|
|
10841
|
-
),
|
|
10842
|
-
network: Optional[list[str]] = Options.network,
|
|
10843
|
-
wallet_name: str = Options.wallet_name,
|
|
10844
|
-
wallet_path: str = Options.wallet_path,
|
|
10845
|
-
quiet: bool = Options.quiet,
|
|
10846
|
-
verbose: bool = Options.verbose,
|
|
10847
|
-
):
|
|
10848
|
-
"""Approve a treasury proposal (requires root origin)."""
|
|
10849
|
-
self.verbosity_handler(quiet, verbose)
|
|
10850
|
-
wallet = self.wallet_ask(
|
|
10851
|
-
wallet_name,
|
|
10852
|
-
wallet_path,
|
|
10853
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10854
|
-
validate=WV.WALLET,
|
|
10855
|
-
)
|
|
10856
|
-
return self._run_command(
|
|
10857
|
-
governance.governance_approve_treasury(
|
|
10858
|
-
subtensor=self.initialize_chain(network),
|
|
10859
|
-
wallet=wallet,
|
|
10860
|
-
proposal_id=proposal_id,
|
|
10861
|
-
quiet=quiet,
|
|
10862
|
-
verbose=verbose,
|
|
10863
|
-
)
|
|
10864
|
-
)
|
|
10865
|
-
|
|
10866
|
-
def governance_status(
|
|
10867
|
-
self,
|
|
10868
|
-
network: Optional[list[str]] = Options.network,
|
|
10869
|
-
quiet: bool = Options.quiet,
|
|
10870
|
-
verbose: bool = Options.verbose,
|
|
10871
|
-
):
|
|
10872
|
-
"""Display governance system status overview."""
|
|
10873
|
-
self.verbosity_handler(quiet, verbose)
|
|
10874
|
-
return self._run_command(
|
|
10875
|
-
governance.governance_status(
|
|
10876
|
-
subtensor=self.initialize_chain(network),
|
|
10877
|
-
quiet=quiet,
|
|
10878
|
-
verbose=verbose,
|
|
10879
|
-
)
|
|
10880
|
-
)
|
|
10881
|
-
|
|
10882
|
-
def governance_my_rewards(
|
|
10883
|
-
self,
|
|
10884
|
-
network: Optional[list[str]] = Options.network,
|
|
10885
|
-
wallet_name: str = Options.wallet_name,
|
|
10886
|
-
wallet_path: str = Options.wallet_path,
|
|
10887
|
-
quiet: bool = Options.quiet,
|
|
10888
|
-
verbose: bool = Options.verbose,
|
|
10889
|
-
):
|
|
10890
|
-
"""Display governance rewards and contribution score for your wallet."""
|
|
10891
|
-
self.verbosity_handler(quiet, verbose)
|
|
10892
|
-
wallet = self.wallet_ask(
|
|
10893
|
-
wallet_name,
|
|
10894
|
-
wallet_path,
|
|
10895
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10896
|
-
validate=WV.WALLET,
|
|
10897
|
-
)
|
|
10898
|
-
return self._run_command(
|
|
10899
|
-
governance.governance_my_rewards(
|
|
10900
|
-
subtensor=self.initialize_chain(network),
|
|
10901
|
-
wallet=wallet,
|
|
10902
|
-
quiet=quiet,
|
|
10903
|
-
verbose=verbose,
|
|
10904
|
-
)
|
|
10905
|
-
)
|
|
10906
|
-
|
|
10907
|
-
def governance_my_delegations(
|
|
10908
|
-
self,
|
|
10909
|
-
network: Optional[list[str]] = Options.network,
|
|
10910
|
-
wallet_name: str = Options.wallet_name,
|
|
10911
|
-
wallet_path: str = Options.wallet_path,
|
|
10912
|
-
quiet: bool = Options.quiet,
|
|
10913
|
-
verbose: bool = Options.verbose,
|
|
10914
|
-
):
|
|
10915
|
-
"""Display active governance delegations for your wallet."""
|
|
10916
|
-
self.verbosity_handler(quiet, verbose)
|
|
10917
|
-
wallet = self.wallet_ask(
|
|
10918
|
-
wallet_name,
|
|
10919
|
-
wallet_path,
|
|
10920
|
-
ask_for=[WO.NAME, WO.PATH],
|
|
10921
|
-
validate=WV.WALLET,
|
|
10922
|
-
)
|
|
10923
|
-
return self._run_command(
|
|
10924
|
-
governance.governance_my_delegations(
|
|
10925
|
-
subtensor=self.initialize_chain(network),
|
|
10926
|
-
wallet=wallet,
|
|
10927
|
-
quiet=quiet,
|
|
10928
|
-
verbose=verbose,
|
|
10929
|
-
)
|
|
10930
|
-
)
|
|
10931
|
-
|
|
10932
10566
|
# =========================================================================
|
|
10933
10567
|
# Treasury commands
|
|
10934
10568
|
# =========================================================================
|
|
@@ -635,54 +635,54 @@ class RootSudoOnly(Enum):
|
|
|
635
635
|
|
|
636
636
|
HYPERPARAMS = {
|
|
637
637
|
# meshcli name: (meshtensor method, root-only enum)
|
|
638
|
-
"rho": ("
|
|
639
|
-
"kappa": ("
|
|
640
|
-
"immunity_period": ("
|
|
641
|
-
"min_allowed_weights": ("
|
|
642
|
-
"max_weights_limit": ("
|
|
643
|
-
"tempo": ("
|
|
644
|
-
"min_difficulty": ("
|
|
645
|
-
"max_difficulty": ("
|
|
646
|
-
"weights_version": ("
|
|
647
|
-
"weights_rate_limit": ("
|
|
648
|
-
"adjustment_interval": ("
|
|
649
|
-
"activity_cutoff": ("
|
|
638
|
+
"rho": ("set_rho", RootSudoOnly.FALSE),
|
|
639
|
+
"kappa": ("set_kappa", RootSudoOnly.TRUE),
|
|
640
|
+
"immunity_period": ("set_immunity_period", RootSudoOnly.FALSE),
|
|
641
|
+
"min_allowed_weights": ("set_min_allowed_weights", RootSudoOnly.FALSE),
|
|
642
|
+
"max_weights_limit": ("set_max_weight_limit", RootSudoOnly.FALSE),
|
|
643
|
+
"tempo": ("set_tempo", RootSudoOnly.TRUE),
|
|
644
|
+
"min_difficulty": ("set_min_difficulty", RootSudoOnly.TRUE),
|
|
645
|
+
"max_difficulty": ("set_max_difficulty", RootSudoOnly.FALSE),
|
|
646
|
+
"weights_version": ("set_weights_version_key", RootSudoOnly.FALSE),
|
|
647
|
+
"weights_rate_limit": ("set_weights_set_rate_limit", RootSudoOnly.TRUE),
|
|
648
|
+
"adjustment_interval": ("set_adjustment_interval", RootSudoOnly.TRUE),
|
|
649
|
+
"activity_cutoff": ("set_activity_cutoff", RootSudoOnly.FALSE),
|
|
650
650
|
"target_regs_per_interval": (
|
|
651
|
-
"
|
|
651
|
+
"set_target_registrations_per_interval",
|
|
652
652
|
RootSudoOnly.TRUE,
|
|
653
653
|
),
|
|
654
|
-
"min_burn": ("
|
|
655
|
-
"max_burn": ("
|
|
656
|
-
"bonds_moving_avg": ("
|
|
657
|
-
"max_regs_per_block": ("
|
|
658
|
-
"serving_rate_limit": ("
|
|
659
|
-
"max_validators": ("
|
|
660
|
-
"adjustment_alpha": ("
|
|
661
|
-
"difficulty": ("
|
|
654
|
+
"min_burn": ("set_min_burn", RootSudoOnly.FALSE),
|
|
655
|
+
"max_burn": ("set_max_burn", RootSudoOnly.TRUE),
|
|
656
|
+
"bonds_moving_avg": ("set_bonds_moving_average", RootSudoOnly.FALSE),
|
|
657
|
+
"max_regs_per_block": ("set_max_registrations_per_block", RootSudoOnly.TRUE),
|
|
658
|
+
"serving_rate_limit": ("set_serving_rate_limit", RootSudoOnly.FALSE),
|
|
659
|
+
"max_validators": ("set_max_allowed_validators", RootSudoOnly.TRUE),
|
|
660
|
+
"adjustment_alpha": ("set_adjustment_alpha", RootSudoOnly.FALSE),
|
|
661
|
+
"difficulty": ("set_difficulty", RootSudoOnly.TRUE),
|
|
662
662
|
"commit_reveal_period": (
|
|
663
|
-
"
|
|
663
|
+
"set_commit_reveal_weights_interval",
|
|
664
664
|
RootSudoOnly.FALSE,
|
|
665
665
|
),
|
|
666
666
|
"commit_reveal_weights_enabled": (
|
|
667
|
-
"
|
|
667
|
+
"set_commit_reveal_weights_enabled",
|
|
668
668
|
RootSudoOnly.FALSE,
|
|
669
669
|
),
|
|
670
|
-
"alpha_values": ("
|
|
671
|
-
"liquid_alpha_enabled": ("
|
|
670
|
+
"alpha_values": ("set_alpha_values", RootSudoOnly.FALSE),
|
|
671
|
+
"liquid_alpha_enabled": ("set_liquid_alpha_enabled", RootSudoOnly.FALSE),
|
|
672
672
|
"registration_allowed": (
|
|
673
|
-
"
|
|
673
|
+
"set_network_registration_allowed",
|
|
674
674
|
RootSudoOnly.TRUE,
|
|
675
675
|
),
|
|
676
676
|
"network_pow_registration_allowed": (
|
|
677
|
-
"
|
|
677
|
+
"set_network_pow_registration_allowed",
|
|
678
678
|
RootSudoOnly.FALSE,
|
|
679
679
|
),
|
|
680
|
-
"yuma3_enabled": ("
|
|
681
|
-
"alpha_sigmoid_steepness": ("
|
|
680
|
+
"yuma3_enabled": ("set_yuma3_enabled", RootSudoOnly.FALSE),
|
|
681
|
+
"alpha_sigmoid_steepness": ("set_alpha_sigmoid_steepness", RootSudoOnly.TRUE),
|
|
682
682
|
"user_liquidity_enabled": ("toggle_user_liquidity", RootSudoOnly.COMPLICATED),
|
|
683
|
-
"bonds_reset_enabled": ("
|
|
684
|
-
"transfers_enabled": ("
|
|
685
|
-
"min_allowed_uids": ("
|
|
683
|
+
"bonds_reset_enabled": ("set_bonds_reset_enabled", RootSudoOnly.FALSE),
|
|
684
|
+
"transfers_enabled": ("set_toggle_transfer", RootSudoOnly.FALSE),
|
|
685
|
+
"min_allowed_uids": ("set_min_allowed_uids", RootSudoOnly.TRUE),
|
|
686
686
|
# Note: These are displayed but not directly settable via HYPERPARAMS
|
|
687
687
|
# They are derived or set via other mechanisms
|
|
688
688
|
"alpha_high": ("", RootSudoOnly.FALSE), # Derived from alpha_values
|
|
@@ -1208,9 +1208,9 @@ class SimSwapResult:
|
|
|
1208
1208
|
@classmethod
|
|
1209
1209
|
def from_dict(cls, d: dict, netuid: int) -> "SimSwapResult":
|
|
1210
1210
|
return cls(
|
|
1211
|
-
tao_amount=Balance.from_meshlet(d
|
|
1211
|
+
tao_amount=Balance.from_meshlet(d.get("mesh_amount", d.get("tao_amount", 0))).set_unit(0),
|
|
1212
1212
|
alpha_amount=Balance.from_meshlet(d["alpha_amount"]).set_unit(netuid),
|
|
1213
|
-
tao_fee=Balance.from_meshlet(d
|
|
1213
|
+
tao_fee=Balance.from_meshlet(d.get("mesh_fee", d.get("tao_fee", 0))).set_unit(0),
|
|
1214
1214
|
alpha_fee=Balance.from_meshlet(d["alpha_fee"]).set_unit(netuid),
|
|
1215
1215
|
)
|
|
1216
1216
|
|
|
@@ -1758,7 +1758,7 @@ class MeshtensorInterface:
|
|
|
1758
1758
|
intermediate_result_, sn_price = await asyncio.gather(
|
|
1759
1759
|
self.query_runtime_api(
|
|
1760
1760
|
"SwapRuntimeApi",
|
|
1761
|
-
"
|
|
1761
|
+
"sim_swap_alpha_for_mesh",
|
|
1762
1762
|
params={"netuid": origin_netuid, "alpha": amount},
|
|
1763
1763
|
block_hash=block_hash,
|
|
1764
1764
|
),
|
|
@@ -1770,7 +1770,7 @@ class MeshtensorInterface:
|
|
|
1770
1770
|
result = SimSwapResult.from_dict(
|
|
1771
1771
|
await self.query_runtime_api(
|
|
1772
1772
|
"SwapRuntimeApi",
|
|
1773
|
-
"
|
|
1773
|
+
"sim_swap_mesh_for_alpha",
|
|
1774
1774
|
params={
|
|
1775
1775
|
"netuid": destination_netuid,
|
|
1776
1776
|
"mesh": intermediate_result.tao_amount.meshlet,
|
|
@@ -1787,7 +1787,7 @@ class MeshtensorInterface:
|
|
|
1787
1787
|
return SimSwapResult.from_dict(
|
|
1788
1788
|
await self.query_runtime_api(
|
|
1789
1789
|
"SwapRuntimeApi",
|
|
1790
|
-
"
|
|
1790
|
+
"sim_swap_alpha_for_mesh",
|
|
1791
1791
|
params={"netuid": origin_netuid, "alpha": amount},
|
|
1792
1792
|
block_hash=block_hash,
|
|
1793
1793
|
),
|
|
@@ -1798,7 +1798,7 @@ class MeshtensorInterface:
|
|
|
1798
1798
|
return SimSwapResult.from_dict(
|
|
1799
1799
|
await self.query_runtime_api(
|
|
1800
1800
|
"SwapRuntimeApi",
|
|
1801
|
-
"
|
|
1801
|
+
"sim_swap_mesh_for_alpha",
|
|
1802
1802
|
params={"netuid": destination_netuid, "mesh": amount},
|
|
1803
1803
|
block_hash=block_hash,
|
|
1804
1804
|
),
|