Why is network already up to date while trying to deploy a contract on truffle

0 votes
I have just started writing smart contracts in solidity using truffle framework. For testing, I'm using ganache.
I executed the following steps as mentioned on truffle site

truffle deploy (for deploying my contract on the network
truffle test (to test my contract)
truffle deploy (if I run this command again, it says that "Network up to date"

However, on restarting the ganache, and then executing the same command, it worked.
Apr 24, 2018 in Blockchain by anonymous
4,089 views

2 answers to this question.

+2 votes
Best answer

I guess you have ganache running already in the background and you have deployed and migrated a contract already on the network, and if you'll try to deploy the same contract again without the changes, it won't let you do it, because you are deploying the same contract which is already deployed on the network.

However, if you want to deploy the same contract again,then you have two options:either, delete the json files from the build directory or you can forcefully redeploy the contract by executing : truffle deploy --reset

answered Apr 24, 2018 by Shashank
• 10,400 points

selected Aug 10, 2018 by Omkar
0 votes

If you want to only migrate all contracts without deploying, then you can run the following command

 truffle migrate --reset
answered Aug 13, 2018 by Omkar
• 69,210 points

Related Questions In Blockchain

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,655 views
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 69,210 points
1,229 views
0 votes
1 answer

How can I deploy a HelloWorld contract on my testrpc network?

The problem lies in the command: truffle migrate Your truffle migrate command ...READ MORE

answered Apr 27, 2018 in Blockchain by Perry
• 17,100 points

edited Aug 10, 2018 by Omkar 2,413 views
0 votes
4 answers

Unable to run truffle@2.1.2 migrate --network live. “Exceeds block gas limit”

A simple solution to avoid this is: module.exports ...READ MORE

answered Sep 28, 2018 in Blockchain by Ludo
1,293 views
0 votes
1 answer

Why is it downloading the blocks when I am trying to deploy the ethereum private network?

Once you have installed the Ethereum wallet, ...READ MORE

answered May 3, 2018 in Blockchain by Shashank
• 10,400 points
432 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP