I first attempted to useEvmRunContractFunction but after some reading figured it was read only. I then went to v1docs to âexecuteFunctionâ however I get the error moralis__WEBPACK_IMPORTED_MODULE_21__.default.executeFunction is not a function
Kindly find my code below and advise me on the way forward.
const sendOptions = {
contractAddress: tokenAddress,
functionName: "approve",
abi: tokenAbi,
params: {
spender: contractAddress,
amount: balance,
},
};
const transaction = await Moralis.executeFunction(sendOptions);
console.log(transaction.hash);