UNPKG

soso-widget

Version:

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

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