Skip to content
On this page

Type alias: ParseAbiParameters<TParams>

ParseAbiParameters: <TParams> TParams extends string ? TParams extends "" ? never : string extends TParams ? readonly AbiParameter[] : ParseAbiParameters$1< SplitParameters< TParams >, {Modifier: Modifier;} > : never | TParams extends readonly string[] ? string[] extends TParams ? 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 extends undefined ? never : Result : never : never : never : never

Parses human-readable ABI parameters into AbiParameters

Example

ts
type Result = ParseAbiParameters('address from, address to, uint256 amount')
//   ^? type Result: [{ type: "address"; name: "from"; }, { type: "address";...

Example

ts
type Result = ParseAbiParameters<
  // ^? type Result: [{ type: "tuple"; components: [{ type: "string"; name:...
  ['Baz bar', 'struct Baz { string name; }']
>

Type parameters

ParameterDescription
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