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 23, 2018 in Blockchain by anonymous
352 views

2 answers to this question.

+1 vote
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 23, 2018 by Shashank
• 10,350 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
• 68,180 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,810 points
184 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
• 68,180 points
115 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,090 points

edited Aug 10, 2018 by Omkar 540 views
0 votes
4 answers
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,350 points
47 views
0 votes
1 answer