Node to Subnet
Transfer your node delegate stake balance to a subnet.
keypair = Keypair.create_from_uri('//Alice') # replace with your mnemonic phrase
call = substrate.compose_call(
call_module='Network',
call_function='transfer_from_node_to_subnet',
call_params={
'from_subnet_id': from_subnet_id,
'from_subnet_node_id': from_subnet_node_id,
'to_subnet_id': to_subnet_id,
'node_delegate_stake_shares_to_be_switched': node_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