Subnet to Node

Transfer your subnet delegate stake balance to a subnet node.

keypair = Keypair.create_from_uri('//Alice') # replace with your mnemonic phrase

call = substrate.compose_call(
  call_module='Network',
  call_function='transfer_from_subnet_to_node',
  call_params={
    'from_subnet_id': from_subnet_id,
    'to_subnet_id': to_subnet_id,
    'to_subnet_node_id': to_subnet_node_id,
    'delegate_stake_shares_to_be_switched': delegate_stake_shares_to_be_switched,
  }
)

extrinsic = substrate.create_signed_extrinsic(call=call, keypair=keypair)

receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)

Last updated