getEventTopic static method

Uint8List getEventTopic(
  1. String signature
)

Gets the 32-byte event topic from a signature. Per Solidity ABI specification, the signature is UTF-8 encoded before hashing.

Implementation

static Uint8List getEventTopic(String signature) {
  return Keccak256.hash(Uint8List.fromList(utf8.encode(signature)));
}