Overview
Item.format formats a single ABI item (function/event/error/etc.) as a readable signature string.
Quick Start
See Also
- Abi.format - Top-level formatter
- Item.formatWithArgs - Format with arguments
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Format a single ABI item to a human-readable string
Item.format formats a single ABI item (function/event/error/etc.) as a readable signature string.
import { Abi } from '@tevm/voltaire/Abi';
const fn = {
type: 'function',
name: 'balanceOf',
inputs: [{ type: 'address', name: 'owner' }],
outputs: [{ type: 'uint256' }],
stateMutability: 'view'
} as const;
const formatted = Abi.Item.format(fn);
// "function balanceOf(address owner) returns (uint256) view"
Was this page helpful?
