There are lots of tutorials on the Internet for developing decentralized applications, smart contracts and write unit test with Solidity on the Ethereum blockchain. Including a few of our own, for that matter.
BUT a large part of them lack the initial environment setup, that is needed for someone just arriving in the blockchain space with a bag full of questions, wondering where the heck to start from.
So, after a series of questions received regarding this topic, I’m writing this, hoping, to help you out setup your ethereum solidity development environment if you are completely new to this space.
Prerequisites
- Windows, macOS, Linux computer or laptop
- Internet connection
- patience … 馃檪
macOS se tup
For macOS, ensure that you have the latest version of Xcode installed. This contains the Clang C++ compiler, the Xcode IDE and other Apple development tools which are required for building C++ applications on OS X. If you are installing Xcode for the first time, or have just installed a new version then you will need to agree to the license before you can do command-line builds:
sudo xcodebuild -license accept
Ethereum Solidity OS X builds require you have Homebrew package manager installed for installing external dependencies.
Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
Install node and NPM (Node Package Manager) using brew – npm will be automatically installed with node:
brew install node
Then we can proceed with installing solc
which is the Solidity command-line compiler.
npm install -g solc
After that we install truffle
framework and ganache-cli
which will be our primary tools for compiling, testing and deployment.
npm install -g truffle
npm install -g ganache-cli
Windows setup
We need to install several things for a windows environment. The first one is git for windows – it’s a command-line tool for retrieving source code from Github.
After solc
truffle
ganache-cli
like shown in the macOS setup.
Then we can proceed with installingsolc
which is the Solidity command-line compiler.
npm install -g solc
After that we installtruffle
framework andganache-cli
which will be our primary tools for compiling, testing and deployment.
npm install -g truffle
npm install -g ganache-cli
Also published on Medium.