import { AbiType, AbiTypeToPrimitiveType as StaticAbiTypeToPrimitiveType } from "abitype"; /** * Like abitype's AbiTypeToPrimitiveType but adding support for arrays and using strings as input */ export type AbiTypeToPrimitiveType = T extends `${infer StaticAbiType}[${string}]` ? StaticAbiType extends AbiType ? StaticAbiTypeToPrimitiveType[] : never : T extends AbiType ? StaticAbiTypeToPrimitiveType : never;