I have a cloud function which worked before but now I get âinvalid functionâ when I call it from the console and I dont know why.
Moralis.Cloud.define("isContract", async request => {
if (!request.params.address) return;
try {
const result = await web3.eth.getCode(request.params.address);
if (result !== "0x") {
return true;
}
return false;
} catch (error) {
logger.info("Error: " + error);
}
});
console.log(await Parse.Cloud.run("isContract", {address:"0x738533F4Ead5Fd7B44C33FaF9DEd642a9f5c597c"}))