Introduction
In this article, we will try to set up the environment for blockchain development as simply as possible. 🙂
Step 1
For Windows, go to the link Download Ethereum and download GETH and run the geth.exe file to install Ethereum on your Windows system.
OR
brew install ethereum #for Mac run this command in terminal
Step 2
npm install -g truffle #run this command in terminal, if rpm not found in your pc, install Node.js from https://nodejs.org/en/download/
Step 3
truffle --version #run this command in terminal to make sure truffle installed
Step 4
truffle init #run this command in terminal to create project
Step 5
Install ganache from here. It will help you to deploy and test, and once installed, launch the ganache and click on the QUICKSTART button.
Important
In 4th step, we create a project. The project will be created with a few directories + truffle-config.js file. In that file, go to the network section and uncomment the code of the JSON part i.e.
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
After launching the ganache tool, ensure the RPC server port and port mentioned in the above network section are the same. It will usually not be the same. In the ganache tool, the RPC server will show port number 7545. So change the same in truffle-config.js like below
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
Summary
In this article, I hope it helps to set up the environment for blockchain development. In the following article, we will try to develop, deploy and test a smart contract.