Ganache - Getting Started

Ganache

Ganache is a ‘personal’ Ethereum blockchain.

You can use your personal blockchain to deploy contracts, develop your applications, run tests, execute commands and inspect states.

Install Ganache

  1. Download the appropriate version of Ganache for your OS.

  2. On Mac, move downloaded file to Application folder.

  3. On Windows, double-click on the downloaded file, follow the prompts, and you’re up and running.

  4. Open Ganache, then click on QUICKSTART (or NEW WORKSPACE) for advanced options.

  5. You will get 10 external accounts with addresses on your local blockchain.

  6. Each account will have 100 test ethers.

Create a Workspace

  • Click NEW WORKSPACE to create new workspace. (OR click QUICKSTART to start one-click blockchain with default options).

  • Configure workspace.

    • Provide workspace name.

    • Change other configurations (Server, Accounts & Keys, Chain etc) as needed.

    • Click SAVE WORKSPACE.

Accounts

You will get 10 accounts with 100 Ethers each.

  • Accounts — shows accounts generated and their balances.

  • Blocks — shows each block as mined on the blockchain, along with gas used and transactions.

  • Transactions — lists all transactions run against the blockchain.

  • Contracts — lists the contracts contained in your workspace’s Truffle projects.

  • Events — lists all events that have been triggered since this workspace’s creation. Ganache will attempt to decode events triggered by contracts in your Truffle project. For more information on events.

  • Logs — shows the logs for the server.

Switching Workspaces

  • Click SWITCH button near the upper right of the screen.

  • Select from the list or create new one.

Linking Truffle Project

  • Click setting gear icon in the upper right.

  • Go to WORKSPACE. Under TRUFFLE PROJECTS, click on ADD PROJECT.

  • Navigate to the folder of your Truffle project, and select the truffle-config.js or truffle.js configuration file.

  • Click SAVE AND RESTART.