Iāve tried amending the mintTokens function like so
var abi = ({
"inputs": [
{
"internalType": "string",
"name": "tokenURI",
"type": "string"
}
],
"name": "mintToken",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
});
const MyNFTContract = new web3.eth.Contract(JSON.parse(abi).abi, contractAddress);
MyNFTContract.methods.mintToken({
"image" : "static/Images/4.Hobbit.jpg",
"name" : "Hobbit",
"description" : "A Hobbit"
}).send();
}
Iām getting this error
Uncaught (in promise) SyntaxError: Unexpected token o in JSON at position 1