@@ -84,11 +84,11 @@ def ensure_wallet(name: str, hotkey: str = "default") -> bt.Wallet:
8484 created_cold = False
8585 created_hot = False
8686
87- if not Path (w .coldkeyfile .path ).exists ():
87+ if not Path (w .coldkey_file .path ).exists ():
8888 w .create_new_coldkey (n_words = 12 , use_password = False , overwrite = False )
8989 created_cold = True
9090
91- if not Path (w .hotkeyfile .path ).exists ():
91+ if not Path (w .hotkey_file .path ).exists ():
9292 w .create_new_hotkey (n_words = 12 , use_password = False , overwrite = False )
9393 created_hot = True
9494
@@ -143,12 +143,11 @@ def ensure_wallet(name: str, hotkey: str = "default") -> bt.Wallet:
143143# ── Step 4: Create subnet ────────────────────────────────────────────────────
144144print (f"\n { BO } [4/6] Ensuring subnet { NETUID } exists...{ RS } " )
145145try :
146- existing = bt_sub .get_subnets ()
147- if NETUID in existing :
146+ if bt_sub .subnet_exists (netuid = NETUID ):
148147 ok (f"Subnet { NETUID } already exists" )
149148 else :
150149 owner_wallet = wallets ["owner" ]
151- result = bt_sub .register_subnetwork (
150+ result = bt_sub .register_subnet (
152151 wallet = owner_wallet ,
153152 prompt = False ,
154153 )
@@ -165,7 +164,7 @@ def ensure_wallet(name: str, hotkey: str = "default") -> bt.Wallet:
165164 w = wallets [wallet_name ]
166165 hk = w .hotkey .ss58_address
167166 try :
168- if bt_sub .is_hotkey_registered ( netuid = NETUID , hotkey_ss58 = hk ):
167+ if bt_sub .is_hotkey_registered_on_subnet ( hotkey_ss58 = hk , netuid = NETUID ):
169168 ok (f"{ wallet_name } : already registered on subnet { NETUID } " )
170169 continue
171170 except Exception :
0 commit comments