Forrest logo
back to the ganache-cli tool

ganache-cli:tldr:be910

ganache-cli: Run Ganache with accounts with a default balance.
$ ganache-cli --defaultBalanceEther=${default_balance}
try on your machine

This command is used to start the Ganache CLI, which is a popular testing tool for Ethereum development. Ganache CLI allows developers to create and manage local Ethereum networks, which helps with testing and development of smart contracts.

The command begins with ganache-cli, which is the command to start the Ganache CLI. After that, there is a flag --defaultBalanceEther, followed by ${default_balance}.

--defaultBalanceEther is a flag that allows you to set the default balance of any account created by Ganache CLI. The specified value will be used as the default balance for all accounts. This flag is useful when testing scenarios that involve specific account balances.

${default_balance} is a placeholder that represents the desired default balance value. It is expected that the actual value of default_balance will be provided when running the command. For example, if you want the default balance to be 10 Ether, you would replace ${default_balance} with 10.

So, when you run the command ganache-cli --defaultBalanceEther=${default_balance}, you are starting the Ganache CLI with a default account balance specified by the value of default_balance.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ganache-cli tool