I am having problems with the following code, I would appreciate any help.
//Init-----------------
const serverUrl = serverURL;
const appId = _appId;
Moralis.start({ serverUrl, appId });
login();
//--------------------
//-----------------------------------------Async function using Moralis.executeFunction(options);
async function _new() {
let _Number = str;
let options = {
contractAddress: “contractAddress”,
functionName: “new”,
abi:abi1,
params: {
number: _Number,
}
}
try {
const exec = await Moralis.executeFunction(options);
const result = await exec.wait();
window.location.href = ‘/New.html’;
}
catch(err) {
console.error(err);
}
}
Error: Missing web3 instance, make sure to call Moralis.enableWeb3() or Moralis.authenticate()