Skip to content
On this page

Type alias: ParseAbi<TSignatures>

ParseAbi: <TSignatures> string[] extends TSignatures ? Abi : TSignatures extends readonly string[] ? TSignatures extends Signatures< 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

ParameterDescription
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