Skip to main content

Overview

Event.getSignature returns the canonical event signature string used to compute topic0.

Quick Start

import { Abi } from '@tevm/voltaire/Abi';

const Transfer = {
  type: 'event',
  name: 'Transfer',
  inputs: [
    { type: 'address', name: 'from', indexed: true },
    { type: 'address', name: 'to', indexed: true },
    { type: 'uint256', name: 'value' }
  ]
} as const;

const signature = Abi.Event.getSignature(Transfer);
// "Transfer(address,address,uint256)"

Canonical Types

Signatures require canonical type names (uint256, int256, bytes32, etc.). Parameter names and indexed flags are ignored.

See Also