def parse_events(artifact: dict):
    """
    Parses events from the compiled contract, 
    and stores them in the global events variable.
    
    :param json artifact: the artifact json object compiled contract loaded
    """

    events = [] # list of event names
    event_input_types = {} # map event name to tuple of input types

    
    for entry in artifact['abi']:
        if entry['type'] == 'event':
            event_name = entry['name']
            events.append(event_name)
            event_input_types[event_name] = (input['type'] for input in entry['inputs'])

    return events, event_input_types