Type alias: ParseAbiParameters<TParams>
ParseAbiParameters: <
TParams
>TParams
extendsstring
?TParams
extends""
?never
:string
extendsTParams
? readonlyAbiParameter
[] :ParseAbiParameters$1
<SplitParameters
<TParams
>, {Modifier
:Modifier
;} > :never
|TParams
extends readonlystring
[] ?string
[] extendsTParams
?AbiParameter
:ParseStructs
<TParams
> extends infer Structs ?{ [K in keyof TParams]: TParams[K] extends string ? IsStructSignature<TParams[K]> extends true ? never : ParseAbiParameters$1<SplitParameters<TParams[K]>, Object> : never }
extends infer Mapped ?Filter
<Mapped
,never
>[0
] extends infer Result ?Result
extendsundefined
?never
:Result
:never
:never
:never
:never
Parses human-readable ABI parameters into AbiParameters
Example
type Result = ParseAbiParameters('address from, address to, uint256 amount')
// ^? type Result: [{ type: "address"; name: "from"; }, { type: "address";...
Example
type Result = ParseAbiParameters<
// ^? type Result: [{ type: "tuple"; components: [{ type: "string"; name:...
['Baz bar', 'struct Baz { string name; }']
>
Type parameters
Parameter | Description |
---|---|
TParams extends string | readonly string [] | readonly unknown [] | Human-readable ABI parameters |
Defined In
node_modules/.pnpm/abitype@0.7.1_typescript@4.9.5/node_modules/abitype/dist/index.d.ts:625
Generated using TypeDoc and typedoc-plugin-markdown