parseEvents static method

List<AbiEvent> parseEvents(
  1. String abiJson
)

Parses events from an ABI JSON string.

Implementation

static List<AbiEvent> parseEvents(String abiJson) {
  final abi = json.decode(abiJson) as List;
  return abi
      .cast<Map<String, dynamic>>()
      .where((item) => item['type'] == 'event')
      .map(AbiEvent.fromJson)
      .toList();
}