I need to access some constant variables in a smart contract, but I'm not being able to. Here's my code:
decimals = await contractInstance.methods.decimals().call();
'decimals' is a constant in a ERC20 contract deployed in Ropsten. I thought the compiler generated getters for those automatically, but I'm getting this error:
TypeError: contractInstance.methods.decimals is not a function
Is there another way to fetch a constant except from it's default getter? Note: The contract is already published and it don't have an explicit method to get the 'decimals' constant.