Last Updated on November 16, 2024 by sandeeppote

Ganache is the development tool used to run local blockchain for Ethereum development.

Ganache can be used to deploy the contract to local Blockchain. Its a simutated environemnt like Javascript VM when developing on Remix. It helps spin up a local Blockchain.

Ganache UI

Install the Ganache from following location-

https://trufflesuite.com/ganache/

Click the QUICKSTART to get started with Ethereum. By default Ethereum is selected. Ganache can also be used for Corda development

The next screen shows the local Blockchain with the Accounts having 100 ETH and ready to receive the contracts and transactions.

Options in Ganache in later post.

Ganache CLI-

Similar to Ganache UI the local Blockchain node can be setup using CLI.

Install nodejs – https://nodejs.org/en/download/

Check the version of node js

node -v

Install yarn

npm install --global yarn

Install Ganache CLI

yarn global add ganache-cli

Verify installation by checking the version

ganache-cli --version
Ganache CLI v6.12.2 (ganache-core: 2.13.2)

Use following command to see the Accounts, Transactions, Contracts etc in command line same as UI.

ganache-cli --deterministic

For more CLI options see –

https://www.npmjs.com/package/ganache-cli

Start deploying Contracts, signing and sending transactions to the local Blockchain.

To use Blockchain as a service use-

https://infura.io/

https://www.alchemy.com/