As requested by the specs, the GetMostRated* functions behave in different way according to the number of parameter.
So, in the contract I've something like that:
- function getMostRatedByGenre(string _genre, uint8 _cat) external view returns (bytes32);
- function getMostRatedByGenre(string _genre) external view returns (bytes32);
The problem is that, when I invoke the 2. function from the frontend, I get the following error:"Error: Invalid number of arguments to Solidity function", while invoking the 1., works
I checked about overloading and I found that is admitted in solidity.
The interesting thing is that, if I invert the order of these function in the ABI, invoking the 1. function , I get no errors but also no value is returned. Invoking the 2. , works
Thanks in advance for any suggestions.
[web3js + ganache]