I’ve been following the guide on the oz webpage for deploying contracts. It is stated that a local ganache blockchain does not persist it’s data throughout several runs. However, you can run ganache with the -db command and refer it to a directory where it can store and access data from:
npx ganache-cli -d --db home/user/Documents/Openzepp1/Openzeppelin1_git/Ganache_Data
I’ve restarted the ganache-cli and refered to it’s stored data in Ganache_Data with the --db command. Apparently the same Blockchain is used again (addresses are the same). However, the deployments apparently did not persist:
When I run npx oz call, it gives me choice of network name and then gives out a red line saying that I need to specify the contracts address:
A contract address must be specified.
I redeploy the Box.sol contract with npx oz deploy. Now I can call npx oz call again, and it gives me as a choice the same Box.sol contract address.
So apparently the deployment of the Box contract didn’t persist through my runs. Shouldn’t it have been stored in /Ganache_Data/? I refered my ganache-cli to that folder everytime I started it.