Getting started with blockchain dev ( Environment Setup )
There’s no better way to learn something than getting your hands dirty doing it. We’ll be doing this on a mock environment(Ganache) on the local machine and not on the actual Ethereum blockchain, because deploying to the actual blockchain requires gas fees.
Truffle
Truffle is a development framework for building decentralized apps using smart contracts. As we know, smart contracts basically execute transactions when the clauses in it are met ( much like real life contracts , but unlike them without needing any intermediary to enforce the contract ). With Truffle, we can compile and deploy smart contracts, inject them into other dapps, and also code the frontend of dapps.
To install Truffle, just open your command line ( for Windows and Linux) and run:
npm install -g truffle
npm is the default package manager of the JavaScript runtime environment Node.js and is the largest software registry in the world. If you don’t have npm, go ahead and download Node.js from its official site. The “-g” signifies that it will be a global installation.
Ganache
Ganache is a locally deployed blockchain network. It simulates a real blockchain and hence you do not need to connect to the actual network, and it also gives you free(fake) ether for gas fees. You can go ahead and download it from here.
And just like that we have set up the development environment on our local machine. In the next entry I will talk about the Metamask wallet(needed for eth transactions) and get started with Solidity, the language used in Ethereum.