I want to use Moralis web3API to run a function of my contract and get back the data read.
I don’t understand what this error means
code: 141, error: " is required"}
I mean I understand it says it requires a parameter or something for the function but I included it in my function see below my function being called
const options = {
chain : "rinkeby",
address : contractID,
function_name : "mintedByTier",
abi : contractABI,
params: {value:0}
}
try{
let quantityMinted = await Moralis.Web3API.native.runContractFunction(options);
console.log(quantityMinted)
} catch(err) {
console.log(err);
}
Finally the ABI where the function is defined
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "mintedByTier",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
I read that naming the parameter in the abi could fix it but it did not work for me. I am not sure whether the error comes from me or moralis?
Best