I'm trying to call using web3.js a read-only methods, but I'm having the following error:
Error: invalid type (argument="type", value="s", code=INVALID_ARGUMENT, version=abi/5.7.0)
This is the code I use to call the method:
signedContract.methods.getEnabledCurrencies().call().then(console.log)
While the following is the ABI of my method:
{ type: 'function',
name: 'getEnabledCurrencies',
constant: true,
stateMutability: 'view',
payable: false,
inputs: [],
outputs: [ [Object] ]
}
The function on the smart contract is the following:
function getEnabledCurrencies() public view returns (string[] memory) {
return currencyNames;
}
I can use the same signedContract object to call state changing methods without any problems.