def METHOD_NAME(
    skale: Skale,
    schain_name: str,
    generation: int,
    node_id: int,
    rotation_data: dict,
    ecdsa_key_name: str
) -> SChainConfig:
    schain_nodes_with_schains = get_schain_nodes_with_schains(skale, schain_name)
    schains_on_node = skale.schains.get_schains_for_node(node_id)
    schain = skale.schains.get_by_name(schain_name)
    node = skale.nodes.get(node_id)
    node_groups = get_previous_schain_groups(skale, schain_name)
    is_owner_contract = is_address_contract(skale.web3, schain['mainnetOwner'])
    skale_manager_opts = init_skale_manager_opts(skale)
    return generate_schain_config(
        schain=schain,
        node=node,
        node_id=node_id,
        ecdsa_key_name=ecdsa_key_name,
        schains_on_node=schains_on_node,
        rotation_id=rotation_data['rotation_id'],
        schain_nodes_with_schains=schain_nodes_with_schains,
        node_groups=node_groups,
        generation=generation,
        is_owner_contract=is_owner_contract,
        skale_manager_opts=skale_manager_opts
    )