Skip to content

Commit 269e0a3

Browse files
wip
1 parent a003727 commit 269e0a3

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

bittensor/core/async_subtensor.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@
149149
class AsyncSubtensor(SubtensorMixin):
150150
"""Asynchronous interface for interacting with the Bittensor blockchain.
151151
152-
This class provides a thin layer over the Substrate Interface, offering a collection of frequently-used calls for
153-
querying blockchain data, managing stakes, registering neurons, and interacting with the Bittensor network.
154-
152+
This class provides a thin layer over the Substrate Interface offering async functionality for Bittensor. This
153+
includes frequently-used calls for querying blockchain data, managing stakes and liquidity positions, registering
154+
neurons, submitting weights, and many other functions for participating in Bittensor.
155155
156156
"""
157157

@@ -384,7 +384,7 @@ def _get_substrate(
384384

385385
@property
386386
async def block(self):
387-
"""Provides an asynchronous property to retrieve the current block."""
387+
"""Provides an asynchronous getter to retrieve the current block."""
388388
return await self.get_current_block()
389389

390390
async def determine_block_hash(
@@ -393,7 +393,7 @@ async def determine_block_hash(
393393
block_hash: Optional[str] = None,
394394
reuse_block: bool = False,
395395
) -> Optional[str]:
396-
"""Determine the appropriate block hash based on the provided parameters.
396+
"""Determine the block hash for the block specified with the provided parameters.
397397
398398
Ensures that only one of the block specification parameters is used and returns the appropriate block hash
399399
for blockchain queries.
@@ -533,6 +533,9 @@ async def get_hyperparameter(
533533
534534
# Get immunity period using block hash
535535
immunity = await subtensor.get_hyperparameter(param_name="ImmunityPeriod", netuid=1, block_hash="0x1234...")
536+
537+
Notes:
538+
- See <https://docs.learnbittensor.org/subnets/subnet-hyperparameters>
536539
"""
537540
block_hash = await self.determine_block_hash(block, block_hash, reuse_block)
538541
if not await self.subnet_exists(
@@ -560,7 +563,8 @@ async def sim_swap(
560563
) -> SimSwapResult:
561564
"""
562565
Hits the SimSwap Runtime API to calculate the fee and result for a given transaction. The SimSwapResult contains
563-
the staking fees and expected returned amounts of a given transaction. This does not include the transaction
566+
the swap fees in alpha or TAO, and quantities of alpha or TAO token expected as output from the transaction.
567+
Does not include the transaction extrinsic fee.
564568
(extrinsic) fee.
565569
566570
Args:
@@ -571,6 +575,9 @@ async def sim_swap(
571575
572576
Returns:
573577
SimSwapResult object representing the result.
578+
579+
Notes:
580+
See: Transaction Fees in Bittensor: <https://docs.learnbittensor.org/learn/fees>
574581
"""
575582
check_balance_amount(amount)
576583
block_hash = block_hash or await self.substrate.get_chain_head()

0 commit comments

Comments
 (0)