@@ -28,14 +28,15 @@ async def async_sign_and_send_with_nonce(
28
28
wait_for_finalization : bool ,
29
29
period : Optional [int ] = None ,
30
30
nonce_key : str = "hotkey" ,
31
+ signing_key : str = "hotkey" ,
31
32
):
32
33
"""
33
34
Signs an extrinsic call with the wallet keypair (default hotkey), adding an optional era for period
34
35
"""
35
36
keypair = getattr (wallet , nonce_key )
36
37
next_nonce = await subtensor .substrate .get_account_next_index (keypair .ss58_address )
37
-
38
- extrinsic_data = {"call" : call , "keypair" : wallet . hotkey , "nonce" : next_nonce }
38
+ signing_keypair = getattr ( wallet , signing_key )
39
+ extrinsic_data = {"call" : call , "keypair" : signing_keypair , "nonce" : next_nonce }
39
40
if period is not None :
40
41
extrinsic_data ["era" ] = {"period" : period }
41
42
@@ -66,12 +67,14 @@ def sign_and_send_with_nonce(
66
67
wait_for_inclusion ,
67
68
wait_for_finalization ,
68
69
nonce_key : str = "hotkey" ,
70
+ signing_key : str = "hotkey" ,
69
71
):
70
72
keypair = getattr (wallet , nonce_key )
71
73
next_nonce = subtensor .substrate .get_account_next_index (keypair .ss58_address )
74
+ signing_keypair = getattr (wallet , signing_key )
72
75
extrinsic = subtensor .substrate .create_signed_extrinsic (
73
76
call = call ,
74
- keypair = wallet . hotkey ,
77
+ keypair = signing_keypair ,
75
78
nonce = next_nonce ,
76
79
)
77
80
response = subtensor .substrate .submit_extrinsic (
0 commit comments