How to setup our environment for developing on Ethereum

Posted underTech Talks &Tutorials

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 setup

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. Next we need to have CMake installed, which is a cross-platform build file generator. And last we have to have a C++ compiler which we can get from Visual Studio Build Tools. The links for these three are below:

After that we can proceed with installing node and then solc , truffle , ganache-cli like shown in the macOS setup.


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


Also published on Medium.

In This Article


    Milen
    About the author:

    Milen

    Milen Radkov has experience building and delivering successful complex software systems and projects for both big enterprises and small startups. Being actively developing across different blockchain protocols, platforms and projects for the past 5 years, he has gained extensive experience in blockchain development, architectures, consensus algorithms and token economics. Milen is a well-known figure in the blockchain space.


    More Stories

    Cover Image for Real-World Assets and the Future of DeFi

    Real-World Assets and the Future of DeFi

    Real-world assets are blockchain-based digital tokens that represent physical and traditional financial assets. The first wave of decentralized finance (DeFi) […]

    Read more
    Cover Image for Navigating Upgradable Solidity Smart Contracts: A Practical Guide

    Navigating Upgradable Solidity Smart Contracts: A Practical Guide

    In the ever-evolving landscape of blockchain technology, the concept of upgradeable smart contracts has emerged as a crucial tool for […]

    Read more

    Have a project in mind?

    We have the expertise! Drop us a line and lets talk!