Using the Moralis SDK, we attempt to make a call to our function like so.
await Moralis.enableWeb3();
let contractAddress = process.env.REACT_APP_INFO_ADDRESS;
const infoContract = {
abi: infoABI,
contractAddress: contractAddress,
functionName: 'exampleFunc',
params: {
_setRoyalty: false,
}
};
However, Moralis is unable to accept false as a parameter. Tested the contract with false and true in etherscan and the input works fine there. Our abi accepts the type like so:
{ "internalType": "bool", "name": "_setRoyalty", "type": "bool" },
When false, I receive an error that requires the parameter.
When set to true, Moralis will accept the parameter and execute the function. I have tried with integers as well as string inputs, neither of which have had any success in accepting a false parameter. (integers will return error above for 0, and work for true as 1, string inputs will return error for empty string, and accept any non-empty string as true)
Any input on this?