import type { Account, Address, Chain, ChainContract } from 'viem'; export type Prettify = { [K in keyof T]: T[K]; } & {}; export type UnionEvaluate = type extends object ? Prettify : type; export type IsUndefined = [undefined] extends [T] ? true : false; export type ErrorType = Error & { name: name; }; export type GetAccountParameter = IsUndefined extends true ? required extends true ? { account: accountOverride | Account | Address; } : { account?: accountOverride | Account | Address | undefined; } : { account?: accountOverride | Account | Address | undefined; }; export type GetContractAddressParameter = (chain extends Chain ? Prettify<{ targetChain: Prettify>; } & { [_ in `${contractName}Address`]?: undefined; }> : never) | Prettify<{ targetChain?: undefined; } & { [_ in `${contractName}Address`]: Address; }>; export type TargetChain = { /** Required Properties of `Chain` */ id: chain['id']; name: chain['name']; nativeCurrency: chain['nativeCurrency']; rpcUrls: chain['rpcUrls']; /** Enforce the specific contract */ contracts: { [_ in contractName]: { [_ in chain['id']]: ChainContract; }; }; };