When I use the code I got this error “Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘Contract’) at flip” .
How can I solve it ? I new to coding. Can you please explain the answer for a newbie
async function flip(side){
let sideNumber;
if(side == “heads”)
sideNumber = 0;
else
sideNumber = 1;
let amount = document.getElementById("amount").value;
window.web3 = await Moralis.enableWeb3();
let contractInstance = new web3.eth.Contract(window.abi, "0xCDC5Dd9176A9D23eAE6d199E0ddDd77C4602B30B")
contractInstance.methods.flip(sideNumber).send({value: amount, from: ethereum.selectedAddress})
.on('receipt', function(receipt){
console.log(receipt);
})