findEventByTopics method

EventEntry? findEventByTopics(
  1. List<Uint8List> topics
)

Implementation

EventEntry? findEventByTopics(List<Uint8List> topics) {
  if (topics.isEmpty) return null;
  try {
    return entries.firstWhere((e) =>
        e.type == AbiEntryType.event &&
        e.encodeSignature().hex == topics.first.hex) as EventEntry;
  } on StateError {
    return null;
  }
}