Ganache

Ganache is a private Ethereum blockchain environment that allows to you emulate the Ethereum blockchain so that you can interact with smart contracts in your own private blockchain. Here are some features that Ganache provides:

  • Displays blockchain log output
  • Provides advanced mining control
  • Built-in block explorer
  • Ethereum blockchain environment
  • Ganache has a desktop application as well as a command-line tool

This is what the desktop version of Ganache looks like:

The command line uses the following format:

ganache-cli <options>

These are the frequently used options of the command-line tools:

Options

Description

-a or --accounts

The number of accounts to generate at startup.

-e or --defaultBalanceEther

Configure the default test account ether amount. The default is 100.

-b or --blockTime

Specify the block time in seconds as a mining interval. If this option is not specified, Ganache will instantly mine a new block when a transaction is invoked.

-h or --host or --hostname

Specify hostname to listen on. The default is 127.0.0.1.

-p or --port

Specify the port number. The default is 8545.

-g or --gasPrice

Specify the gas price in Wei (defaults to 20000000000).

-l or --gasLimit

The block gas limit (defaults to 0x6691b7).

--debug

Display VM opcodes for debugging purpose.

-q or --quiet

Run ganache-cli without any logs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.26.185