Skip to main content
1 of 2
goodvibration
  • 26.2k
  • 5
  • 49
  • 89

With contract = new web3.eth.Contract(abi, addr),

The one and only reason for contract.methods.decimals().call() to throw:

Error: Returned values aren't valid, did it run Out of Gas?

Is if the contract deployed at addr does not implement function decimals().

goodvibration
  • 26.2k
  • 5
  • 49
  • 89