Skip to content

parseAbi

parseAbi<TSignatures>(signatures): ParseAbi<TSignatures>

Parses human-readable ABI into JSON [Abi]([object Object])

Type parameters

TSignatures extends readonly string[]

Parameters

signatures: TSignatures["length"] extends 0 ? ["Error: At least one signature required"] : Signatures<TSignatures> extends TSignatures ? TSignatures : Signatures<TSignatures>

Human-Readable ABI

Returns

Parsed [Abi]([object Object])

Example

const abi = parseAbi([
// ^? const abi: readonly [{ name: "balanceOf"; type: "function"; stateMutability:...
'function balanceOf(address owner) view returns (uint256)',
'event Transfer(address indexed from, address indexed to, uint256 amount)',
])

Source

node_modules/.pnpm/abitype@1.0.0_typescript@5.3.3_zod@3.22.4/node_modules/abitype/dist/types/human-readable/parseAbi.d.ts:37


Generated using typedoc-plugin-markdown and TypeDoc