Skip to content

Commit 55cf9ba

Browse files
committed
Set owner UID
1 parent 0759859 commit 55cf9ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apex/common/async_chain.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,13 @@ def network(self) -> list[str]:
112112

113113
async def full_burn(self) -> bool:
114114
try:
115+
metagraph = await self.metagraph()
115116
subtensor = await self.subtensor()
116117
netuid = 1
117118
owner_hotkey = await subtensor.query_subtensor("SubnetOwnerHotkey", params=[netuid])
118-
logger.info(f"Burning to {owner_hotkey} UID")
119-
uids: list[int] = [owner_hotkey]
119+
owner_uid = await metagraph.hotkeys.index(owner_hotkey)
120+
logger.info(f"Burning to {owner_hotkey} hotkey, {owner_uid} UID")
121+
uids: list[int] = [owner_uid]
120122
weights: list[float] = [1.0]
121123
success, message = await subtensor.set_weights(
122124
self.wallet,

0 commit comments

Comments
 (0)