I was trying to use Moralis Web3βs executeFunction but it logged some error
code:
async function approve() {
if (props.isAuthenticated) {
const options = {
contractAddress: addresses.sgaj,
functionName: "approve",
abi: abis.erc20,
params: {
spender: addresses.migrate,
amount: props.Moralis.Units.Token("100000", "18")
},
};
const receipt = await props.Moralis.executeFunction(options);
console.log(receipt)
}
}
Error: