import { Address, PrepareTransactionRequestReturnType } from 'viem'; import { Prettify } from './utils'; type isEmptyObject = Args extends Record ? true : false; /** * Actions require contract address, but as part of decorators, the address might have been passed already to the decorator. * * If the address was passed to the decorator, it's now optional (we still allow overrides of the address per action). * If the action doesn't have any other parameters beside the contract address, then parameters can either be { contract: address } or void */ export type ActionParameters = Prettify extends true ? { [key in ContractName]: Address; } : { params: Args; } & { [key in ContractName]: Address; } : isEmptyObject extends true ? { [key in ContractName]: Address; } | void : { params: Args; } & { [key in ContractName]?: Address; }>; export type WithAccount = Args & { account: Address; }; export type WithUpgradeExecutor = Args & { upgradeExecutor: Address | false; }; export type PrepareTransactionRequestReturnTypeWithChainId = PrepareTransactionRequestReturnType & { chainId: number; }; export {};