What to do when my smart contract passes all truffle’s tests, but fails in the network?

Alvaro Andres Pinzon Cortes
1 min readNov 24, 2018

--

Intro

When this problem happens it is possible that you did not deploy the right version of the contract. Therefore, you need to make sure that you are deploying the right version and deploy it again

Solution

  1. Delete the build folder.

2. Run the tests in Truffle and make sure that all pass. This will verify that the contract’s version is correct.

truffle test

3. Compile the contract again.

truffle compile

4. Deploy the contract again.

--

--

No responses yet