File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 57
57
publish_metadata ,
58
58
get_metadata ,
59
59
)
60
+ from bittensor .core .extrinsics .asyncex .start_call import start_call_extrinsic
60
61
from bittensor .core .extrinsics .asyncex .serving import serve_axon_extrinsic
61
62
from bittensor .core .extrinsics .asyncex .staking import (
62
63
add_stake_extrinsic ,
@@ -3986,6 +3987,36 @@ async def serve_axon(
3986
3987
certificate = certificate ,
3987
3988
)
3988
3989
3990
+ async def start_call (
3991
+ self ,
3992
+ wallet : "Wallet" ,
3993
+ netuid : int ,
3994
+ wait_for_inclusion : bool = True ,
3995
+ wait_for_finalization : bool = False ,
3996
+ ) -> tuple [bool , str ]:
3997
+ """
3998
+ Submits a `start_call` extrinsic to the blockchain, indicating that the caller wishes to begin responding
3999
+ to a specific challenge on the specified subnet (`netuid`).
4000
+
4001
+ Args:
4002
+ wallet (Wallet): The wallet used to sign the extrinsic (must be unlocked).
4003
+ netuid (int): The UID of the target subnet for which the call is being initiated.
4004
+ wait_for_inclusion (bool, optional): Whether to wait for the extrinsic to be included in a block. Defaults to True.
4005
+ wait_for_finalization (bool, optional): Whether to wait for finalization of the extrinsic. Defaults to False.
4006
+
4007
+ Returns:
4008
+ Tuple[bool, str]:
4009
+ - True and a success message if the extrinsic is successfully submitted or processed.
4010
+ - False and an error message if the submission fails or the wallet cannot be unlocked.
4011
+ """
4012
+ return await start_call_extrinsic (
4013
+ subtensor = self ,
4014
+ wallet = wallet ,
4015
+ netuid = netuid ,
4016
+ wait_for_inclusion = wait_for_inclusion ,
4017
+ wait_for_finalization = wait_for_finalization ,
4018
+ )
4019
+
3989
4020
async def swap_stake (
3990
4021
self ,
3991
4022
wallet : "Wallet" ,
Original file line number Diff line number Diff line change 60
60
get_metadata ,
61
61
serve_axon_extrinsic ,
62
62
)
63
+ from bittensor .core .extrinsics .start_call import start_call_extrinsic
63
64
from bittensor .core .extrinsics .set_weights import set_weights_extrinsic
64
65
from bittensor .core .extrinsics .staking import (
65
66
add_stake_extrinsic ,
@@ -3252,6 +3253,36 @@ def serve_axon(
3252
3253
certificate = certificate ,
3253
3254
)
3254
3255
3256
+ def start_call (
3257
+ self ,
3258
+ wallet : "Wallet" ,
3259
+ netuid : int ,
3260
+ wait_for_inclusion : bool = True ,
3261
+ wait_for_finalization : bool = False ,
3262
+ ) -> tuple [bool , str ]:
3263
+ """
3264
+ Submits a `start_call` extrinsic to the blockchain, indicating that the caller wishes to begin responding
3265
+ to a specific challenge on the specified subnet (`netuid`).
3266
+
3267
+ Args:
3268
+ wallet (Wallet): The wallet used to sign the extrinsic (must be unlocked).
3269
+ netuid (int): The UID of the target subnet for which the call is being initiated.
3270
+ wait_for_inclusion (bool, optional): Whether to wait for the extrinsic to be included in a block. Defaults to True.
3271
+ wait_for_finalization (bool, optional): Whether to wait for finalization of the extrinsic. Defaults to False.
3272
+
3273
+ Returns:
3274
+ Tuple[bool, str]:
3275
+ - True and a success message if the extrinsic is successfully submitted or processed.
3276
+ - False and an error message if the submission fails or the wallet cannot be unlocked.
3277
+ """
3278
+ return start_call_extrinsic (
3279
+ subtensor = self ,
3280
+ wallet = wallet ,
3281
+ netuid = netuid ,
3282
+ wait_for_inclusion = wait_for_inclusion ,
3283
+ wait_for_finalization = wait_for_finalization ,
3284
+ )
3285
+
3255
3286
def swap_stake (
3256
3287
self ,
3257
3288
wallet : "Wallet" ,
You can’t perform that action at this time.
0 commit comments