I'm trying to develop a voting application, I have successfully compiled the app and also deployed it to ethereum blockchain. Now I've closed the test rpc and node console, and when I restarted node console and test rpc my app was not performing as it should be, then I compiled it again and deployed again and it is now working good. So, I was asking do we have to compile and deploy our app every time we start the test rpc? If yes is there any way for my app to run all the time so I don't have to repeat the process of compiling and deploying it again and again.

  • where to, did you deploy your contract? to Ethereum's Main Net ? Or a simulated node? If it is simulated node, then your contract isn't stored anywhere. You should probably run your own private chain for testing. Or use the Test net
    – Nulik
    Jul 1, 2018 at 12:55
  • i m using ethereum test-net to deploymy contract. Jul 1, 2018 at 13:57
  • in that case, you have to deploy once. you should get the contract address on the first time you deployed, and reuse it
    – Nulik
    Jul 1, 2018 at 13:59

1 Answer 1


Short answer is Yes, but you can change it.

If you are using testrpc or ganache from truffle then default behavior is that your contract will be deleted every time you restart it. If you want to keep your contract then you have to install private node. For example geth.

You can also use ganache-cli and start it with --db option option

--db: Specify a path to a directory to save the chain database. If a database already exists, ganache-cli will initialize that chain instead of creating a new one.

Get more information here: https://github.com/trufflesuite/ganache-cli

Ganache and testrpc is the same thing.

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.