Installing Ganache CLI & Installing Ganache GUI

ganache-cli
source:https://raw.githubusercontent.com/trufflesuite/ganache-cli/develop/resources/icons/ganache-cli-128x128.png 

What is Ganache?

Ganache is part of truffle suit of Ethereum developers tools for you personal blockchain for Ethereum development.
Ganache allows you to run your own blockchain on your local machine so you can test your contracts or DApp on your local machine instead of using testnet or mainnet.
  • Ganache comes with two components to make it user-friendly.
  1. Ganache CLI
  2. Ganache GUI

What is Ganache CLI?

Ganache CLI allows you to create your own local blockchain environment using terminal commands.
You can use terminal or CMD to run your ganache CLI.
Ganache CLI also included in Truffle so do not need to install it separately. 

Installing Ganache CLI

ganache-cli is written in JavaScript and distributed as a Node.js package via npm.

Using npm:

npm install -g ganache-cli
or you can use yarn 

yarn global add ganache-cli

but while installing it make sure you have Node.js (>= v6.11.5) installed on your local machine.

Running Ganache-cli

user@ubuntu:~$ ganache-cli

ganache-cli running


As you can see the screenshot of output, our local Ethereum development environment is ready to write and test our code, We are getting 9 addresses with 100 ETH in every account.
 

for more commands you can check Official Github link.

What is Ganache GUI?

Ganache GUI is a User Interface for Ganache CLI. It has many features, but can be generally described as a blockchain explorer.


Installing Ganache GUI

For this, first open a terminal window, create a folder for ganache and clone the source code:

mkdir ~/ganache
git clone https://github.com/trufflesuite/ganache.git
It will download the latest version of ganache, also it will download the latest version from the development branch. If you want something more stable or different version then you can download it from their release version.

Now goto ganache folder and install dependencies by using npm command.

npm install

Running Ganache GUI:


You can run using again npm command.
 
npm start

Ganache-GUI


And when you click on Quickstart then it will come show our available wallets.

Ganache GUI

That's it, your local Etherum development environment is ready.
Enjoy coding ;)


Bonus: Linux: ./electron: error while loading shared libraries: libgconf-2.so.4


If you are using ubuntu then maybe you will get this error then you have to install libgconf.

sudo apt-get install libgconf-2-4 
and then install npm packages again.

Congratulations your Ganache is ready now !!!!


Please comment if you are getting any errors while installing.
 
Installing Ganache CLI & Installing Ganache GUI Installing Ganache CLI & Installing Ganache GUI Reviewed by JSDevLife on Friday, January 18, 2019 Rating: 5

No comments:

Powered by Blogger.