RESOLVED: Check my reply for solution.

I am using truffle and ganache to make a simple call to my smart contract. I enter into truffle console and I'm running into issues calling a very simple function. What am I doing wrong? I'm trying to call getValue()

Code Snipped

In truffle console I do:

let chx = await PillowChecking.deployed()

When I try the following:

let a = chx.getValue()

I get this error

Error: Returned error: VM Exception while processing transaction: revert\n

NOTE: I can define new addresses all day long and it does not crash. For example this works just fine:

let address = chx.getAddress()

1 Answer 1


In case this happens to you at some point I needed to redeploy my contracts. I used truffle deploy --reset and my functions worked after that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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