Ganache for Blockchain

Ganache is used for setting up a personal Ethereum Blockchain for testing your Solidity contracts. It provides more features when compared to Remix. You will learn about the features when you work out with Ganache. Before you begin using Ganache, you must first download and install the Blockchain on your local machine.

Downloading Ganache

You may download Ganache from the following URL −https://truffleframework.com/ganache

Ganache is available on several platforms. We developed and tested this entire tutorial on Mac. Thus, the screenshots below will show Mac installation. When you open the installation URL given above, it automatically detects your machine’s OS and directs you to the appropriate binary installation. The screenshot below shows the Mac installation.

Downloading Ganache

When you click on the DOWNLOAD button, it will begin downloading the DMG file for Mac installation.

Installing Ganache

Locate the “Ganache-2.0.0.dmg” in your Downloads folder and double-click on it to install Ganache. Upon successful installation, the following screen will appear −

Installing Ganache

Drag Ganache icon to the Application folder. Now, Ganache is available as an application on your Mac.

If you are using some other OS, follow the instructions provided for successful installation.

Starting Ganache

Now locate Ganache in your Application folder and double-click on its icon to start Ganache.

Ganache Desktop

When Ganache starts, the Ganache screen will appear as shown below −

Ganache Desktop

Click QUICKSTART to start Ganache. You will see Ganache console as shown below −

QUICKSTART

The console in the above screenshot shows two user accounts with balance of 100 ETH (Ether – a currency for transaction on Ethereum platform). It also shows a transaction count of zero for each account. As the user has not performed any transactions so far, this count is obviously zero.

We will now get an overview of a few important screens of Ganache that are of immediate relevance to us.

Similar Posts

  • Creating Wallet

    In this chapter, we will learn how to create Ethereum wallet. To create a new wallet, enter a password of your choice and then click on the “Create New Wallet” button. When you do so, a Wallet would be created. A digital wallet is essentially the generation of a public/private key pair that you need…

  • Deploying Contract

    To deploy the contract, select the Contracts menu option as shown in the screenshot below − You will need to enter the contract’s bytecode on this screen. Remember, when you compile your Solidity contract code, it generated a bytecode that runs on EVM. You will now need to obtain this bytecode from Remix IDE. Go to the Remix…

  • Solidity for Contract Writing

    Solidity is an object-oriented language especially developed for contract writing. It is a high-level language, which inherits traits from C++, Python, and JavaScript. The Solidity compiler compiles your source code into bytecode that runs on Ethereum Virtual Machine (EVM). For quick understanding of the Solidity syntax, look at the sample code in the IDE.pragma solidity…

  • A Quick Walkthrough

    We will now briefly understand what is available on the Ganache desktop. On the Desktop, at the top we have several menu options out of which a few are of immediate relevance to us. The menu bar is highlighted in the screenshot below − Clicking on the TRANSACTIONS menu shows all the transactions performed so far. You…

  • MyEtherWallet

    For client application, you will use MyEtherWallet. Download MyEtherWallet software from the following URL − If required, unzip the downloaded file and open index.html. You will see the following interface for creating a new wallet.