bittensor.core.extrinsics.pallets.base#

Attributes#

Classes#

CallBuilder

Base class for creating GenericCall objects for all Subtensor pallet functions.

Module Contents#

bittensor.core.extrinsics.pallets.base.Call#
class bittensor.core.extrinsics.pallets.base.CallBuilder#

Base class for creating GenericCall objects for all Subtensor pallet functions.

This class implements an interface for creating GenericCall objects that can be used with any Subtensor pallet function. For async operations, pass an AsyncSubtensor instance and await the result.

Variables:
  • subtensor – The Subtensor or AsyncSubtensor instance used for call composition.

  • dynamic_function – If True, allows dynamic calls to functions not explicitly defined in the pallet class. When a

  • pallet (method is called that doesn't exist in the class, it will be dynamically created as a call to the)

  • name. (function with the same)

create_composed_call(call_module=None, call_function=None, **kwargs)#

Create a call to the pallet function.

Parameters:
  • call_module (str) – If not provided, will be determined from the calling class name.

  • call_function (str) – If not provided, will be determined from the calling method name.

  • **kwargs – Named parameters that will be passed to the function.

Return type:

Call

Note

The key in kwargs must always match the parameter name in the subtensor’s function.

dynamic_function: bool = True#
subtensor: bittensor.core.subtensor.Subtensor | bittensor.core.async_subtensor.AsyncSubtensor#