Type alias: ParseAbi<TSignatures>
ParseAbi: <
TSignatures
>string
[] extendsTSignatures
?Abi
:TSignatures
extends readonlystring
[] ?TSignatures
extendsSignatures
<TSignatures
> ?ParseStructs
<TSignatures
> extends infer Structs ?{ [K in keyof TSignatures]: TSignatures[K] extends string ? ParseSignature<TSignatures[K], Structs> : never }
extends infer Mapped ?Filter
<Mapped
,never
> extends infer Result ?Result
extends readonly [] ?never
:Result
:never
:never
:never
:never
:never
Parses human-readable ABI into JSON Abi
Example
ts
type Result = ParseAbi<
// ^? type Result = readonly [{ name: "balanceOf"; type: "function"; stateMutability:...
[
'function balanceOf(address owner) view returns (uint256)',
'event Transfer(address indexed from, address indexed to, uint256 amount)',
]
>
Type parameters
Parameter | Description |
---|---|
TSignatures extends readonly string [] | readonly unknown [] | Human-readable ABI |
Defined In
node_modules/.pnpm/abitype@0.7.1_typescript@4.9.5/node_modules/abitype/dist/index.d.ts:510
Generated using TypeDoc and typedoc-plugin-markdown