Function detectSignatureType

  • Determines whether a signature is an event or function signature based on its format.

    • 32-byte signatures (0x + 64 chars) that don't start with 28 zeros are event signatures
    • 4-byte signatures (0x + 8 chars) or 32-byte signatures with 28 leading zeros are function signatures

    Parameters

    • signature: `0x${string}`

      The signature to check

    Returns SignatureType

    The detected signature type