Skip to main content

Overview

Item.getItem is the Item namespace version of Abi.getItem. It searches an ABI array by name and optional type.

Quick Start

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

const abi = [
  {
    type: 'function',
    name: 'transfer',
    inputs: [
      { type: 'address', name: 'to' },
      { type: 'uint256', name: 'amount' }
    ],
    outputs: [{ type: 'bool' }]
  }
] as const;

const transfer = Abi.Item.getItem(abi, 'transfer', 'function');

See Also