3

I have created an app using truffle and testrpc. I have verified the contract functions using truffle console..It worked. But while executing the transaction from front-end it is getting the following error in the console of testrpc. How can I resolve this error?Is it possible by updating the gasPrice field in truffle.js?

  Transaction: 0x59b171fbc29cf9f89506f3f1a37bd6010863ae773c264e4f349477f1f3a47b71
  Gas usage: 3000000
  Block Number: 25
  Block Time: Fri Sep 29 2017 11:30:31 GMT+0530 (IST)
  Runtime Error: invalid opcode

Any help is appreciated

2

'Invalid opcode' means your contract has throw an exception, for example a require or assert has failed, division by zero, reading from unassigned memory, calling to an invalid address, etc.

You have to check the function that is failing for conditions that can cause an error.

  • I have checked and updated my contract. It worked and resolved my error.@Ismael – Christa Oct 4 '17 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.