2

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

1 Answer 1

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"

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.