UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

20 lines 625 B
import { ChainType } from '@lifi/sdk'; import { useBytecode } from 'wagmi'; export const useIsContractAddress = (address, chainId, chainType) => { const { data: contractCode, isLoading, isFetched, } = useBytecode({ address: address, chainId: chainId, query: { refetchInterval: 300000, staleTime: 300000, enabled: chainType === ChainType.EVM && !!chainId && !!address, }, }); return { isContractAddress: !!contractCode, contractCode, isLoading, isFetched, }; }; //# sourceMappingURL=useIsContractAddress.js.map