[Ethereum] How to synchronise Ganache-CLI accounts with Ganache-UI

accountsganacheNetworksynchronization

When I launch ganache-cli for Port 7545, it will create 10 accounts by default.

ganache-cli -p 7545

However, when I then open the Ganache-Desktop-App, it will show different accounts and the accounts from the CLI can't be found.

This appears in the terminal from ganache-cli:

enter image description here

This is shown in Ganache Desktop-App:

enter image description here

Why aren't both in sync?

Best Answer

One thing you can try is to start ganache-cli with the same mnemonic seed as ganache-ui is using as argument. The command is:

ganache-cli -p 7545 -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"

Related Topic