def dump_event(e, id):
    meta = {}
    for name in list(set(dir(e)) - META_EXCLUDE):
        meta[name] = getattr(e, name)

    data = {
        "id": id,
        "name": e.name,
        "args": e.args,
        "kwargs": e.kwargs,
        "success": e.success,
        "failure": e.failure,
        "channels": e.channels,
        "notify": e.notify,
        "meta": meta
    }

    return json.dumps(data)
dataset/ETHPy150Open circuits/circuits/circuits/node/utils.py/dump_event/original