parseErrors static method

List<AbiError> parseErrors(
  1. String abiJson
)

Parses errors from an ABI JSON string.

Implementation

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