meshtensor-cli 9.27.1__tar.gz → 9.27.2__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.27.1 → meshtensor_cli-9.27.2}/PKG-INFO +1 -1
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/cli.py +9 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/governance/governance.py +47 -46
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/pyproject.toml +1 -1
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/README.md +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/doc_generation_helper.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/balances.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/chain_data.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/mev_shield.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/registration.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/root.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/serving.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/transfer.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/minigraph.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/networking.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/subtensor_interface.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/main-filters.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/main-header.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/neuron-details.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/price-multi.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/price-single.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/subnet-details-header.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/subnet-details.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/subnet-metrics.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/subnets-table.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/table.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/view.css +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/view.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/view.js +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/utils.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/axon/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/axon/axon.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/contribute.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/contributors.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/create.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/dissolve.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/refund.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/update.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/utils.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/view.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/governance/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/liquidity/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/liquidity/liquidity.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/liquidity/utils.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/proxy.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/add.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/auto_staking.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/children_hotkeys.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/claim.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/list.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/move.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/remove.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/wizard.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/mechanisms.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/price.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/subnets.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/sudo.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/tc/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/tc/tc.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/treasury/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/treasury/treasury.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/view.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/wallets.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/weights.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/balances.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/chain_data.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/__init__.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/mev_shield.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/registration.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/root.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/serving.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/transfer.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/meshtensor_interface.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/minigraph.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/networking.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/subtensor_interface.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/main-filters.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/main-header.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/neuron-details.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/price-multi.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/price-single.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/subnet-details-header.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/subnet-details.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/subnet-metrics.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/subnets-table.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/table.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/view.css +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/view.j2 +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/view.js +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/utils.py +0 -0
- {meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/version.py +0 -0
|
@@ -10232,6 +10232,7 @@ class CLIManager:
|
|
|
10232
10232
|
wallet = self.wallet_ask(
|
|
10233
10233
|
wallet_name,
|
|
10234
10234
|
wallet_path,
|
|
10235
|
+
None,
|
|
10235
10236
|
ask_for=[WO.NAME, WO.PATH],
|
|
10236
10237
|
validate=WV.WALLET,
|
|
10237
10238
|
)
|
|
@@ -10281,6 +10282,7 @@ class CLIManager:
|
|
|
10281
10282
|
wallet = self.wallet_ask(
|
|
10282
10283
|
wallet_name,
|
|
10283
10284
|
wallet_path,
|
|
10285
|
+
None,
|
|
10284
10286
|
ask_for=[WO.NAME, WO.PATH],
|
|
10285
10287
|
validate=WV.WALLET,
|
|
10286
10288
|
)
|
|
@@ -10328,6 +10330,7 @@ class CLIManager:
|
|
|
10328
10330
|
wallet = self.wallet_ask(
|
|
10329
10331
|
wallet_name,
|
|
10330
10332
|
wallet_path,
|
|
10333
|
+
None,
|
|
10331
10334
|
ask_for=[WO.NAME, WO.PATH],
|
|
10332
10335
|
validate=WV.WALLET,
|
|
10333
10336
|
)
|
|
@@ -10362,6 +10365,7 @@ class CLIManager:
|
|
|
10362
10365
|
wallet = self.wallet_ask(
|
|
10363
10366
|
wallet_name,
|
|
10364
10367
|
wallet_path,
|
|
10368
|
+
None,
|
|
10365
10369
|
ask_for=[WO.NAME, WO.PATH],
|
|
10366
10370
|
validate=WV.WALLET,
|
|
10367
10371
|
)
|
|
@@ -10501,6 +10505,7 @@ class CLIManager:
|
|
|
10501
10505
|
wallet = self.wallet_ask(
|
|
10502
10506
|
wallet_name,
|
|
10503
10507
|
wallet_path,
|
|
10508
|
+
None,
|
|
10504
10509
|
ask_for=[WO.NAME, WO.PATH],
|
|
10505
10510
|
validate=WV.WALLET,
|
|
10506
10511
|
)
|
|
@@ -10526,6 +10531,7 @@ class CLIManager:
|
|
|
10526
10531
|
wallet = self.wallet_ask(
|
|
10527
10532
|
wallet_name,
|
|
10528
10533
|
wallet_path,
|
|
10534
|
+
None,
|
|
10529
10535
|
ask_for=[WO.NAME, WO.PATH],
|
|
10530
10536
|
validate=WV.WALLET,
|
|
10531
10537
|
)
|
|
@@ -10551,6 +10557,7 @@ class CLIManager:
|
|
|
10551
10557
|
wallet = self.wallet_ask(
|
|
10552
10558
|
wallet_name,
|
|
10553
10559
|
wallet_path,
|
|
10560
|
+
None,
|
|
10554
10561
|
ask_for=[WO.NAME, WO.PATH],
|
|
10555
10562
|
validate=WV.WALLET,
|
|
10556
10563
|
)
|
|
@@ -10598,6 +10605,7 @@ class CLIManager:
|
|
|
10598
10605
|
wallet = self.wallet_ask(
|
|
10599
10606
|
wallet_name,
|
|
10600
10607
|
wallet_path,
|
|
10608
|
+
None,
|
|
10601
10609
|
ask_for=[WO.NAME, WO.PATH],
|
|
10602
10610
|
validate=WV.WALLET,
|
|
10603
10611
|
)
|
|
@@ -10714,6 +10722,7 @@ class CLIManager:
|
|
|
10714
10722
|
wallet = self.wallet_ask(
|
|
10715
10723
|
wallet_name,
|
|
10716
10724
|
wallet_path,
|
|
10725
|
+
None,
|
|
10717
10726
|
ask_for=[WO.NAME, WO.PATH],
|
|
10718
10727
|
validate=WV.WALLET,
|
|
10719
10728
|
)
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/governance/governance.py
RENAMED
|
@@ -14,6 +14,8 @@ import sys
|
|
|
14
14
|
from typing import TYPE_CHECKING, Optional
|
|
15
15
|
|
|
16
16
|
from meshtensor_wallet import Wallet
|
|
17
|
+
|
|
18
|
+
from meshtensor_cli.src.meshtensor.balances import Balance
|
|
17
19
|
from rich import box
|
|
18
20
|
from rich.table import Column, Table
|
|
19
21
|
|
|
@@ -38,12 +40,12 @@ if TYPE_CHECKING:
|
|
|
38
40
|
# ============================================================================
|
|
39
41
|
|
|
40
42
|
GOVERNANCE_TRACKS = {
|
|
41
|
-
0: {"name": "Root", "description": "Runtime upgrades & consensus changes"},
|
|
42
|
-
1: {"name": "Treasury", "description": "Fund allocation & grants"},
|
|
43
|
-
2: {"name": "Param-Critical", "description": "Critical network parameters"},
|
|
44
|
-
3: {"name": "Param-Standard", "description": "Standard network parameters"},
|
|
45
|
-
4: {"name": "Subnet", "description": "Subnet-scoped governance"},
|
|
46
|
-
5: {"name": "Emergency", "description": "Emergency actions (TC co-signed)"},
|
|
43
|
+
0: {"name": "Root", "description": "Runtime upgrades & consensus changes", "origin": {"system": "Root"}},
|
|
44
|
+
1: {"name": "Treasury", "description": "Fund allocation & grants", "origin": {"GovernanceOrigins": "Treasurer"}},
|
|
45
|
+
2: {"name": "Param-Critical", "description": "Critical network parameters", "origin": {"GovernanceOrigins": "ParameterCritical"}},
|
|
46
|
+
3: {"name": "Param-Standard", "description": "Standard network parameters", "origin": {"GovernanceOrigins": "ParameterStandard"}},
|
|
47
|
+
4: {"name": "Subnet", "description": "Subnet-scoped governance", "origin": {"GovernanceOrigins": "SubnetGovernance"}},
|
|
48
|
+
5: {"name": "Emergency", "description": "Emergency actions (TC co-signed)", "origin": {"GovernanceOrigins": "Emergency"}},
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
CONVICTION_LEVELS = {
|
|
@@ -100,8 +102,8 @@ async def governance_propose(
|
|
|
100
102
|
call_module="Referenda",
|
|
101
103
|
call_function="submit",
|
|
102
104
|
call_params={
|
|
103
|
-
"proposal_origin":
|
|
104
|
-
"proposal": {"
|
|
105
|
+
"proposal_origin": track_info["origin"],
|
|
106
|
+
"proposal": {"Inline": call_data},
|
|
105
107
|
"enactment_moment": {"After": enactment_delay},
|
|
106
108
|
},
|
|
107
109
|
)
|
|
@@ -113,11 +115,11 @@ async def governance_propose(
|
|
|
113
115
|
extrinsic, wait_for_inclusion=True
|
|
114
116
|
)
|
|
115
117
|
|
|
116
|
-
if response.is_success:
|
|
118
|
+
if await response.is_success:
|
|
117
119
|
print_success(f"Referendum submitted successfully on {track_info['name']} Track")
|
|
118
|
-
print_extrinsic_id(response)
|
|
120
|
+
await print_extrinsic_id(response)
|
|
119
121
|
else:
|
|
120
|
-
print_error(f"Failed to submit referendum: {response.error_message}")
|
|
122
|
+
print_error(f"Failed to submit referendum: {await response.error_message}")
|
|
121
123
|
except Exception as e:
|
|
122
124
|
print_error(f"Error submitting referendum: {e}")
|
|
123
125
|
|
|
@@ -163,7 +165,7 @@ async def governance_vote(
|
|
|
163
165
|
|
|
164
166
|
if vote.lower() == "abstain":
|
|
165
167
|
call = await subtensor.substrate.compose_call(
|
|
166
|
-
call_module="
|
|
168
|
+
call_module="MeshtensorVoting",
|
|
167
169
|
call_function="vote",
|
|
168
170
|
call_params={
|
|
169
171
|
"poll_index": ref_index,
|
|
@@ -178,7 +180,7 @@ async def governance_vote(
|
|
|
178
180
|
)
|
|
179
181
|
else:
|
|
180
182
|
call = await subtensor.substrate.compose_call(
|
|
181
|
-
call_module="
|
|
183
|
+
call_module="MeshtensorVoting",
|
|
182
184
|
call_function="vote",
|
|
183
185
|
call_params={
|
|
184
186
|
"poll_index": ref_index,
|
|
@@ -198,11 +200,11 @@ async def governance_vote(
|
|
|
198
200
|
extrinsic, wait_for_inclusion=True
|
|
199
201
|
)
|
|
200
202
|
|
|
201
|
-
if response.is_success:
|
|
203
|
+
if await response.is_success:
|
|
202
204
|
print_success(f"Vote cast successfully: {vote.upper()} on referendum #{ref_index}")
|
|
203
|
-
print_extrinsic_id(response)
|
|
205
|
+
await print_extrinsic_id(response)
|
|
204
206
|
else:
|
|
205
|
-
print_error(f"Failed to vote: {response.error_message}")
|
|
207
|
+
print_error(f"Failed to vote: {await response.error_message}")
|
|
206
208
|
except Exception as e:
|
|
207
209
|
print_error(f"Error voting: {e}")
|
|
208
210
|
|
|
@@ -263,13 +265,13 @@ async def governance_delegate(
|
|
|
263
265
|
extrinsic, wait_for_inclusion=True
|
|
264
266
|
)
|
|
265
267
|
|
|
266
|
-
if response.is_success:
|
|
268
|
+
if await response.is_success:
|
|
267
269
|
print_success(
|
|
268
270
|
f"Delegated to {delegatee[:8]}...{delegatee[-8:]} on {track_info['name']} Track"
|
|
269
271
|
)
|
|
270
|
-
print_extrinsic_id(response)
|
|
272
|
+
await print_extrinsic_id(response)
|
|
271
273
|
else:
|
|
272
|
-
print_error(f"Failed to delegate: {response.error_message}")
|
|
274
|
+
print_error(f"Failed to delegate: {await response.error_message}")
|
|
273
275
|
except Exception as e:
|
|
274
276
|
print_error(f"Error delegating: {e}")
|
|
275
277
|
|
|
@@ -317,11 +319,11 @@ async def governance_undelegate(
|
|
|
317
319
|
extrinsic, wait_for_inclusion=True
|
|
318
320
|
)
|
|
319
321
|
|
|
320
|
-
if response.is_success:
|
|
322
|
+
if await response.is_success:
|
|
321
323
|
print_success(f"Delegation revoked on {track_info['name']} Track")
|
|
322
|
-
print_extrinsic_id(response)
|
|
324
|
+
await print_extrinsic_id(response)
|
|
323
325
|
else:
|
|
324
|
-
print_error(f"Failed to undelegate: {response.error_message}")
|
|
326
|
+
print_error(f"Failed to undelegate: {await response.error_message}")
|
|
325
327
|
except Exception as e:
|
|
326
328
|
print_error(f"Error undelegating: {e}")
|
|
327
329
|
|
|
@@ -350,17 +352,20 @@ async def governance_list(
|
|
|
350
352
|
async for ref_index, ref_info in referenda:
|
|
351
353
|
ref_data = ref_info.value if hasattr(ref_info, "value") else ref_info
|
|
352
354
|
if isinstance(ref_data, dict) and "Ongoing" in ref_data:
|
|
353
|
-
|
|
355
|
+
ongoing_raw = ref_data["Ongoing"]
|
|
356
|
+
# SCALE decoder wraps enum variant values in a tuple
|
|
357
|
+
ongoing = ongoing_raw[0] if isinstance(ongoing_raw, tuple) else ongoing_raw
|
|
354
358
|
ref_track = ongoing.get("track", -1)
|
|
355
359
|
if track is not None and ref_track != track:
|
|
356
360
|
continue
|
|
361
|
+
tally = ongoing.get("tally", {})
|
|
357
362
|
results.append({
|
|
358
|
-
"index": ref_index
|
|
363
|
+
"index": ref_index,
|
|
359
364
|
"track": ref_track,
|
|
360
365
|
"track_name": GOVERNANCE_TRACKS.get(ref_track, {}).get("name", "Unknown"),
|
|
361
|
-
"tally_ayes":
|
|
362
|
-
"tally_nays":
|
|
363
|
-
"tally_support":
|
|
366
|
+
"tally_ayes": tally.get("ayes", 0),
|
|
367
|
+
"tally_nays": tally.get("nays", 0),
|
|
368
|
+
"tally_support": tally.get("support", 0),
|
|
364
369
|
"submitted": ongoing.get("submitted", 0),
|
|
365
370
|
})
|
|
366
371
|
|
|
@@ -434,7 +439,8 @@ async def governance_info(
|
|
|
434
439
|
console.print(f" Status: {list(ref_data.keys())[0] if isinstance(ref_data, dict) else 'Unknown'}")
|
|
435
440
|
|
|
436
441
|
if isinstance(ref_data, dict) and "Ongoing" in ref_data:
|
|
437
|
-
|
|
442
|
+
ongoing_raw = ref_data["Ongoing"]
|
|
443
|
+
ongoing = ongoing_raw[0] if isinstance(ongoing_raw, tuple) else ongoing_raw
|
|
438
444
|
track_id = ongoing.get("track", -1)
|
|
439
445
|
track_info = GOVERNANCE_TRACKS.get(track_id, {"name": "Unknown"})
|
|
440
446
|
|
|
@@ -478,15 +484,10 @@ async def governance_power(
|
|
|
478
484
|
params=[account],
|
|
479
485
|
)
|
|
480
486
|
|
|
481
|
-
# Query total staked balance
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
storage_function="TotalColdkeyStake",
|
|
486
|
-
params=[account],
|
|
487
|
-
)
|
|
488
|
-
|
|
489
|
-
raw_stake = stake_info.value if stake_info else 0
|
|
487
|
+
# Query total staked balance via the interface method
|
|
488
|
+
stake_results = await subtensor.get_total_stake_for_coldkey(account)
|
|
489
|
+
tao_value, _ = stake_results.get(account, (Balance(0), Balance(0)))
|
|
490
|
+
raw_stake = int(tao_value.meshlet)
|
|
490
491
|
cw = contribution_score.value if contribution_score else 0
|
|
491
492
|
|
|
492
493
|
if output_json:
|
|
@@ -697,11 +698,11 @@ async def governance_signal_golr(
|
|
|
697
698
|
extrinsic, wait_for_inclusion=True
|
|
698
699
|
)
|
|
699
700
|
|
|
700
|
-
if response.is_success:
|
|
701
|
+
if await response.is_success:
|
|
701
702
|
print_success("GoLR signal submitted successfully")
|
|
702
|
-
print_extrinsic_id(response)
|
|
703
|
+
await print_extrinsic_id(response)
|
|
703
704
|
else:
|
|
704
|
-
print_error(f"Failed to signal GoLR: {response.error_message}")
|
|
705
|
+
print_error(f"Failed to signal GoLR: {await response.error_message}")
|
|
705
706
|
except Exception as e:
|
|
706
707
|
print_error(f"Error signaling GoLR: {e}")
|
|
707
708
|
|
|
@@ -741,11 +742,11 @@ async def governance_update_scores(
|
|
|
741
742
|
extrinsic, wait_for_inclusion=True
|
|
742
743
|
)
|
|
743
744
|
|
|
744
|
-
if response.is_success:
|
|
745
|
+
if await response.is_success:
|
|
745
746
|
print_success("Contribution scores updated")
|
|
746
|
-
print_extrinsic_id(response)
|
|
747
|
+
await print_extrinsic_id(response)
|
|
747
748
|
else:
|
|
748
|
-
print_error(f"Failed to update scores: {response.error_message}")
|
|
749
|
+
print_error(f"Failed to update scores: {await response.error_message}")
|
|
749
750
|
except Exception as e:
|
|
750
751
|
print_error(f"Error updating scores: {e}")
|
|
751
752
|
|
|
@@ -785,10 +786,10 @@ async def governance_distribute_rewards(
|
|
|
785
786
|
extrinsic, wait_for_inclusion=True
|
|
786
787
|
)
|
|
787
788
|
|
|
788
|
-
if response.is_success:
|
|
789
|
+
if await response.is_success:
|
|
789
790
|
print_success("Governance rewards distributed")
|
|
790
|
-
print_extrinsic_id(response)
|
|
791
|
+
await print_extrinsic_id(response)
|
|
791
792
|
else:
|
|
792
|
-
print_error(f"Failed to distribute rewards: {response.error_message}")
|
|
793
|
+
print_error(f"Failed to distribute rewards: {await response.error_message}")
|
|
793
794
|
except Exception as e:
|
|
794
795
|
print_error(f"Error distributing rewards: {e}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/root.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/serving.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/extrinsics/transfer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/subtensor_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/table.j2
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/view.css
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/view.j2
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/bittensor/templates/view.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/axon/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/__init__.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/contribute.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/contributors.py
RENAMED
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/crowd/dissolve.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/governance/__init__.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/liquidity/__init__.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/liquidity/liquidity.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/liquidity/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/stake/auto_staking.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/__init__.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/mechanisms.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/price.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/subnets/subnets.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/treasury/__init__.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/commands/treasury/treasury.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/root.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/serving.py
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/extrinsics/transfer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/subtensor_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/table.j2
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/view.css
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/view.j2
RENAMED
|
File without changes
|
{meshtensor_cli-9.27.1 → meshtensor_cli-9.27.2}/meshtensor_cli/src/meshtensor/templates/view.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|