1

it has happened to me many times, that after updating a contract and running truffle migrate it simply told me network up to date

in order to reproduce the behaviour I did the following:

  • create a folder metacoin
  • run truffle unbox metacoin
  • edit the truffle.js to include a testrpc node as the development network
  • run testrpc
  • run truffle migrate
  • edit the file contracts/Metacoin.sol and adding a global public variable
  • run truffle migrate again

I could verify that the address of the contract did not change. I know that I can force a deployment with --reset but this is not always a good option.

  • Which version of truffle is this. Seems this issue was fixed in 3.4.4 or something about 6 months back – 1sn0s Feb 9 '18 at 2:02
1

I don't have a proper answer. Many times it seems like it doesn't detect a file has changed and it will tell you its up to date.

Sometimes it doesn't say it's up to date but still the compilation and migration seem to be using old versions of the contract and I have to --reset.

Lately I find myself more and more having to also delete the build folder each time to make sure Its actually using the latest files.

  • I'm making the same experience. The issue is that you have to copy out the addresses of the deployments and put them back by hand – Micha Roon Nov 16 '17 at 14:58
1

I've had similar issues, even when I change code in the contracts.

Best solution is to rm -rf ./build folder, and then run truffle migrate.

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.