Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async getInit(): Promise {
if (this.status !== ContractStatus.Deployed) {
return Promise.resolve([]);
}
if (!this.address) {
throw new Error('Cannot get state of uninitialised contract');
}
const response = await this.provider.send(
RPCMethod.GetSmartContractInit,
this.address.replace('0x', '').toLowerCase(),
);
return response.result;
}
}
getSmartContractInit(addr: string): Promise> {
const address = validation.isBech32(addr) ? fromBech32Address(addr) : addr;
return this.provider.send(
RPCMethod.GetSmartContractInit,
address.replace('0x', '').toLowerCase(),
);
}