Skip to content

[v10] Standardize extrinsic parameter order#3045

Merged
basfroman merged 53 commits intoSDKv10from
feat/roman/extrinsics-part-2
Sep 5, 2025
Merged

[v10] Standardize extrinsic parameter order#3045
basfroman merged 53 commits intoSDKv10from
feat/roman/extrinsics-part-2

Conversation

@basfroman
Copy link
Collaborator

@basfroman basfroman commented Sep 3, 2025

Context:

  • Standardize extrinsic parameter order.
    These parameters will now exist in all extrinsics and related calls (default values could be different depends by extrinsic).
    period: Optional[int] = None,
    raise_error: bool = False,
    wait_for_inclusion: bool = False,
    wait_for_finalization: bool = False,
  • Set wait_for_inclusion and wait_for_finalization to True by default in extrinsics and their related calls. (not for intrinsics)
  • Make the internal logic of extrinsics the same.
  • Small docstrings refactoring

Includes:

Note: raise_error parameter is included in the list of parameters and parameters order is standardized.

  • .set_children_extrinsic and .root_set_pending_childkey_cooldown_extrinsic. subtensor.set_children and subtensor.root_set_pending_childkey_cooldown methods.
  • .commit_reveal_extrinsic and subtensor.set_weights
  • .add_liquidity_extrinsic and subtensor.add_liquidity
  • .modify_liquidity_extrinsic and subtensor.modify_liquidity
  • .remove_liquidity_extrinsic and subtensor.remove_liquidity
  • .toggle_user_liquidity_extrinsic and subtensor.toggle_user_liquidity
  • .transfer_stake_extrinsic and subtensor.transfer_stake
  • .swap_stake_extrinsic and subtensor.swap_stake
  • .move_stake_extrinsic and subtensor.move_stake
    • Changes in move_stake_extrinsic and subtensor.move_stake:
      • parameter origin_hotkey renamed to origin_hotkey_ss58
      • parameter destination_hotkey renamed to destination_hotkey_ss58
  • .burned_register_extrinsic and subtensor.burned_register
  • .register_subnet_extrinsic and subtensor.register_subnet
  • .register_extrinsic and subtensor.register
  • .set_subnet_identity_extrinsic and subtensor.set_subnet_identity
  • .root_register_extrinsic, subtensor.burned_register and subtensor.root_register
  • .serve_extrinsic
  • .serve_axon_extrinsic and subtensor.serve_axon
  • alias subtensor.set_commitment removed
  • subtensor.comit renamed to subtensor.set_commitment
  • .publish_metadata, subtensor.set_commitment and subtenor.set_reveal_commitment
  • .add_stake_extrinsic and subtensor.add_stake
  • .add_stake_multiple_extrinsic and subtensor.add_stake_multiple
  • .start_call_extrinsic and subtensor.start_call
  • .increase_take_extrinsic, .decrease_take_extrinsic and subtenor.set_reveal_commitment
  • .transfer_extrinsic and subtensor.transfer
  • .unstake_extrinsic and subtensor.unstake
    • Changes in unstake_extrinsic and subtensor.unstake:
      • parameter netuid: Optional[int] is now required -> netuid: int
      • parameter hotkey_ss58: Optional[str] is now required -> hotkey_ss58: str
      • parameter amount: Optional[Balance] is now required -> amount: Balance
      • parameter unstake_all: bool removed (use unstake_all_extrinsic for unstake all stake)
  • .unstake_all_extrinsic and subtensor.unstake_all
  • .unstake_multiple_extrinsic and subtensor.unstake_multiple
  • .commit_weights_extrinsic and subtensor.commit_weights
  • .reveal_weights_extrinsic and subtensor.reveal_weights
  • .set_weights_extrinsic and subtensor.set_weights

@basfroman basfroman self-assigned this Sep 3, 2025
@basfroman basfroman mentioned this pull request Sep 3, 2025
Roman added 27 commits September 3, 2025 15:16
…ubtensor.set_weights` since this is extrinsic
…move_liquidity_extrinsic` and `subtensor.remove_liquidity` + `.toggle_user_liquidity_extrinsic` and `subtensor.toggle_user_liquidity`
…eal_commitment` + `subtensor.comit` renamed to `subtensor.set_commitment` + alias `subtensor.set_commitment` removed
…extrinsic`, `subtensor.add_stake_multiple`
@basfroman basfroman requested a review from a team September 4, 2025 23:24
Roman added 5 commits September 4, 2025 16:33
…`.unstake_extrinsic` and `subtensor.unstake`
…ng: bool` renamed to `safe_unstaking: bool` + in `.swap_stake_extrinsic` and `subtensor.swap_stake` parameter `safe_staking: bool` renamed to `safe_swapping: bool`
@basfroman basfroman changed the title [WIP] [v10] Standardize extrinsic parameter order [v10] Standardize extrinsic parameter order Sep 5, 2025
@basfroman basfroman merged commit f632786 into SDKv10 Sep 5, 2025
1263 of 1265 checks passed
@basfroman basfroman deleted the feat/roman/extrinsics-part-2 branch September 5, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants