diff --git a/packages/nextjs/utils/scaffold-eth/contract.ts b/packages/nextjs/utils/scaffold-eth/contract.ts index ba9546a50..028c21c27 100644 --- a/packages/nextjs/utils/scaffold-eth/contract.ts +++ b/packages/nextjs/utils/scaffold-eth/contract.ts @@ -8,11 +8,20 @@ import { } from "abitype"; import type { ExtractAbiFunctionNames } from "abitype"; import { Address, Log, TransactionReceipt } from "viem"; -import { Prettify } from "viem/dist/types/types/utils"; import { UseContractEventConfig, UseContractReadConfig, UseContractWriteConfig } from "wagmi"; import contractsData from "~~/generated/deployedContracts"; import scaffoldConfig from "~~/scaffold.config"; +/** + * @description Combines members of an intersection into a readable type. + * @example + * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }> + * => { a: string, b: string, c: number, d: bigint } + */ +type Prettify = { + [K in keyof T]: T[K]; +} & unknown; + export type GenericContractsDeclaration = { [key: number]: readonly { name: string;