Overview
Item.formatWithArgs formats an ABI item by inserting argument values into the call string.
Quick Start
See Also
- Item.format - Format without arguments
- Abi.formatWithArgs - Top-level formatter
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 with concrete argument values
Item.formatWithArgs formats an ABI item by inserting argument values into the call string.
import { Abi } from '@tevm/voltaire/Abi';
const transfer = {
type: 'function',
name: 'transfer',
inputs: [
{ type: 'address', name: 'to' },
{ type: 'uint256', name: 'amount' }
]
} as const;
const formatted = Abi.Item.formatWithArgs(transfer, [
'0x742d35Cc6634C0532925a3b844Bc9e7595f51e3e',
1000n
]);
// "transfer(0x742d35Cc6634C0532925a3b844Bc9e7595f51e3e, 1000)"
Was this page helpful?
