def topics_to_calldata(topics, bytes_per_topic=3):
    """Converts a list of topics to calldata.

    Args:
        topics (bytes[]): List of topics.
        bytes_per_topic (int): Byte length of each topic.

    Returns:
        bytes: Topics combined into a single string.
    """

    return b''.join(topic.to_bytes(bytes_per_topic, byteorder='little') for topic in topics)