Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getContractForAddress (api: ApiPromise, address: StringOrNull): Contract | null {
if (!address) {
return null;
} else {
const abi = getContractAbi(address);
return abi
? new Contract(api, abi, address)
: null;
}
}