import { getBytecode } from '@wagmi/core';
export const preVerificationCheckQueryKey = (deterministicAddress, initCode, baseSalt, chainId) => {
    return [
        'preVerificationCheck',
        deterministicAddress,
        initCode,
        baseSalt,
        chainId,
    ];
};
export const preVerificationCheckQueryOptions = (wagmiConfig, { deterministicAddress, initCode, baseSalt, chainId, }) => {
    return {
        queryKey: preVerificationCheckQueryKey(deterministicAddress, initCode, baseSalt, chainId),
        queryFn: async () => {
            const bytecode = await getBytecode(wagmiConfig, {
                address: deterministicAddress,
                chainId,
            });
            return {
                isAlreadyDeployed: !!bytecode,
            };
        },
    };
};
