bittensor.extrinsics.senate#

Functions#

register_senate_extrinsic(subtensor, wallet[, ...])

Registers the wallet to chain for senate voting.

leave_senate_extrinsic(subtensor, wallet[, ...])

Removes the wallet from chain for senate voting.

vote_senate_extrinsic(subtensor, wallet, ...[, ...])

Votes ayes or nays on proposals.

Module Contents#

bittensor.extrinsics.senate.register_senate_extrinsic(subtensor, wallet, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)[source]#

Registers the wallet to chain for senate voting.

Parameters:
  • wallet (bittensor.wallet) – Bittensor wallet object.

  • wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning true, or returns false if the extrinsic fails to enter the block within the timeout.

  • wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.

  • prompt (bool) – If true, the call waits for confirmation from the user before proceeding.

  • subtensor (bittensor.subtensor)

Returns:

Flag is true if extrinsic was finalized or included in the block. If we did not wait for finalization / inclusion, the response is true.

Return type:

success (bool)

bittensor.extrinsics.senate.leave_senate_extrinsic(subtensor, wallet, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)[source]#

Removes the wallet from chain for senate voting.

Parameters:
  • wallet (bittensor.wallet) – Bittensor wallet object.

  • wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning true, or returns false if the extrinsic fails to enter the block within the timeout.

  • wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.

  • prompt (bool) – If true, the call waits for confirmation from the user before proceeding.

  • subtensor (bittensor.subtensor)

Returns:

Flag is true if extrinsic was finalized or included in the block. If we did not wait for finalization / inclusion, the response is true.

Return type:

success (bool)

bittensor.extrinsics.senate.vote_senate_extrinsic(subtensor, wallet, proposal_hash, proposal_idx, vote, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)[source]#

Votes ayes or nays on proposals.

Parameters:
  • wallet (bittensor.wallet) – Bittensor wallet object.

  • wait_for_inclusion (bool) – If set, waits for the extrinsic to enter a block before returning true, or returns false if the extrinsic fails to enter the block within the timeout.

  • wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.

  • prompt (bool) – If true, the call waits for confirmation from the user before proceeding.

  • subtensor (bittensor.subtensor)

  • proposal_hash (str)

  • proposal_idx (int)

  • vote (bool)

Returns:

Flag is true if extrinsic was finalized or included in the block. If we did not wait for finalization / inclusion, the response is true.

Return type:

success (bool)