Configure Ganache

Ganache is a blockchain simulator that runs locally on your desktop

Since the blockchain is immutable, developing and running tests directly on a blockchain is expensive and inefficient. Ganache is an Open Source tool that simulates the blockchain on your local desktop.

To Configure Ganache, we will follow 4 steps:

Step 1: Create a new Workspace in Ganache

Step 2: Add Project in Workspace Tab

Step 3: Add Mnemonic in Accounts & Keys Tab

Step 4: Configure Server Tab

Step 1: Create a new Workspace in Ganache

Launch the Ganache GUI, then create a new workspace with any name of your choice.

Select "New Workspace"

Step 2: Add Project in Workspace Tab

Make sure you have selected "Workspace" in the upper left corner in Ganache.

1. Select "Add Project".

Select "Add Project"

2. Select "truffle-config.js" from the same folder as the README.md file.

Select "truffle-config.js" from the same folder as the README.md file

‚Äč

Step 3: Add Mnemonic in Accounts & Keys Tab

1. Select "Accounts & Keys" in the upper left corner in Ganache.

Select "Accounts & Keys" in the upper left corner in Ganache.

2. Navigate to the README.md file generated for your project and find the Ganache Settings section.

Find the README.md file
Copy the mnemonic phrase.

3. Copy the mnemonic phrase. Your mnemonic will look something like this:

grid climb frame sugar fire ridge remember artwork hope kitchen outer general

4. Paste the mnemonic phrase from your README.md file into Ganache.

Paste the mnemonic phrase into Ganache.

These keywords are used to auto-generate accounts with private keys for development. If the keywords in "truffle-config.js" (which are the same as above) and Ganache don't match, you will not be able to deploy your Smart Contracts to Ganache.

Do not use this mnemonic for your application when you deploy to a public blockchain.

Step 4: Configure Server Tab

1. Check that "Port Number" is "7545" and "Network ID = 5777".

Check that "Port Number" is "7545" and "Network ID = 5777".