I'm following this tutorial for a simple contract. https://blog.zeppelin.solutions/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05

After running testrpc, compiled with truffle compile and deploy with migrate, I open the truffle console and run these commands:

truffle(default)> var poe = ProofOfExistence1.at(ProofOfExistence1.address)
// and print its address 

truffle(default)> poe.address

// let's register our first "document"
truffle(default)> poe.notarize('An amazing idea')

but when I run this last command, instead of obtaining the output described there I get an error:

truffle(development)> poe.notarize('An amazing idea')
Error: VM Exception while processing transaction: invalid opcode
    at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
    at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
    at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
    at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
    at /usr/local/lib/node_modules/truffle/build/webpack:/~/truffle-provider/wrapper.js:134:1
    at /usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:86:1
    at Object.InvalidResponse (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/errors.js:38:1)

I tried to repeat all the procedure very carefully but got the same error. Any suggestion?

  • Perhaps you are using an old version of ethereumjs-testrpc now the equivalent project is ganache-cli. – Ismael Apr 22 '18 at 18:51
  • thank you very much! after installing it everything worked. Many Thanks! – D.Giunchi Apr 23 '18 at 11:55

Your Answer

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

Browse other questions tagged or ask your own question.