Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add ETH to a Ganache account

Tags:

ethereum

Is there a way to add ETH to a Ganache account? I am aware that I can typically refresh the accounts by restarting ganache cli, but I'm using the --db option, which means the accounts are persistent. Because of this, they've run dry pretty quickly.

like image 574
nullnullnull Avatar asked Mar 29 '18 19:03

nullnullnull


1 Answers

AFAIK, you can't add ether. Your best option is initialize your accounts with very large balances using either --defaultBalanceEther for all accounts or with --account="<PRIVATE_KEY>,<BALANCE>" for static accounts.

Example with 90,000 ETH

ganache-cli --defaultBalanceEther 9000000000000000000000

or

ganache-cli --account "0x70f1384b24df3d2cdaca7974552ec28f055812ca5e4da7a0ccd0ac0f8a4a9b00,9000000000000000000000"

This should at least minimize how frequently you have to deal with the issue.

like image 101
Adam Kipnis Avatar answered Sep 21 '22 07:09

Adam Kipnis