Search in sources :

Example 1 with Evt

use of org.aion.api.server.types.Evt in project aion by aionnetwork.

the class ApiWeb3Aion method buildFilterResponse.

private JSONArray buildFilterResponse(Fltr filter) {
    Object[] events = filter.poll();
    JSONArray response = new JSONArray();
    for (Object event : events) {
        if (event instanceof Evt) {
            // put the Object we get out of the Evt object in here
            response.put(((Evt) event).toJSON());
        }
    }
    return response;
}
Also used : Evt(org.aion.api.server.types.Evt) JSONArray(org.json.JSONArray) JSONObject(org.json.JSONObject)

Aggregations

Evt (org.aion.api.server.types.Evt)1 JSONArray (org.json.JSONArray)1 JSONObject (org.json.JSONObject)1