1

my ganache -cli environment

I use ganache-cli --db to create a private test chain and save it on my computer, and the result is below: enter image description here

I use web3py w3.personal.newAccount('1') to add a new address, and I use print(len(w3.personal.listAccounts)) to show the amount of accounts, and the result is belowenter image description here

but when I shut down(ctrl +c) and turn on the ganache-cli again, I find there is no account saved.

0

You must specify a location to save and load the DB from.

Both times you run the command, simply specify a location, like so:

ganche-cli --db="~/my/DB/path"

  • I try add my location but no helps. Could you please give me some more details? – Lance li Apr 13 at 15:57

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.