Skip to content

Commit ccd8a00

Browse files
committed
Removed sign_and_send_with_nonce as this functionality has been moved to Subtensor.
1 parent f77c182 commit ccd8a00

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

bittensor/core/extrinsics/utils.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,6 @@
2020
from scalecodec.types import GenericExtrinsic, GenericCall
2121

2222

23-
def sign_and_send_with_nonce(
24-
subtensor: "Subtensor",
25-
call: "GenericCall",
26-
wallet: "Wallet",
27-
wait_for_inclusion: bool,
28-
wait_for_finalization,
29-
nonce_key: str = "hotkey",
30-
signing_key: str = "hotkey",
31-
):
32-
keypair = getattr(wallet, nonce_key)
33-
next_nonce = subtensor.substrate.get_account_next_index(keypair.ss58_address)
34-
signing_keypair = getattr(wallet, signing_key)
35-
extrinsic = subtensor.substrate.create_signed_extrinsic(
36-
call=call,
37-
keypair=signing_keypair,
38-
nonce=next_nonce,
39-
)
40-
response = subtensor.substrate.submit_extrinsic(
41-
extrinsic=extrinsic,
42-
wait_for_inclusion=wait_for_inclusion,
43-
wait_for_finalization=wait_for_finalization,
44-
)
45-
46-
if not wait_for_finalization and not wait_for_inclusion:
47-
return True, None
48-
49-
if response.is_success:
50-
return True, None
51-
52-
return False, format_error_message(response.error_message)
53-
54-
5523
def submit_extrinsic(
5624
subtensor: "Subtensor",
5725
extrinsic: "GenericExtrinsic",

0 commit comments

Comments
 (0)