2

You cannot get the private key from web3.eth.getAccounts() directly, but there's a few workarounds to do this with ganache: Specify a mnemonic phrase with the -m option, e.g. ganache-cli -m "stereo consider quality wild fat farm symptom bundle laundry side one lemon", this will derive private keys from the mnemonic phrase (with the derivation path ...


1

Using ganache-cli, you can provide a mnemonic using the flag below, in order to produce the same pre-funded addresses and public keys every time you start ganache. The accounts flag just defines the number of accounts that you will create. -m or --mnemonic: Use a bip39 mnemonic phrase for generating a PRNG seed, which is in turn used for hierarchical ...


Only top voted, non community-wiki answers of a minimum length are eligible